hello.I have a problem about my code

this is my code:
assume cs:code
data segment
db '1975','1976','1977','1978','1979','1980','1981','1982','1983'
db '1984','1985','1986','1987','1988','1989','1990','1991','1992'
db '1993','1994','1995'
;

dd 16,22,382,1356,2390,8000,16000,24486,50065,97479,140417,197514
dd 345980,590827,803530,1183000,1843000,2759000,3753000,4649000,5937000
;money

dw 3,7,9,13,28,38,130,220,476,778,1001,1442,2258,2793,4037,5635,8226
dw 11542,14430,15257,17800
;people
data ends
table segment
db 21 dup('................')
table ends
stack segment
dw 0 ;save low byte
stack ends
;consider: if you want save this data to 'table'
;you need get every BYTE in data segment
;get year First:you need get '1975'
;use a reg to save this ADDRESS and use 'idata' or 'di' or 'si' to get year ADDRESS in BYTE
;And then get money ADDRESS in BYTE
;use the same way to get it
;you can use a loop to get addrss (in BYTE)
;At last ,you need to get 'people' ADDRESS in BYTE
;just like other's way!
code segment
start:
mov ax,data
mov ds,ax
mov ax,table
mov es,ax
mov si,0
mov di,0
mov bx,0
mov cx,1
mov ax,stack
mov ss,ax
mov sp,2
mov ax,0
Lop:
mov ax,ds:
mov WORD ptr es:,ax
add bx,2
mov ax,ds:
mov WORD ptr es:,ax
add bx,2
mov al,20h
mov BYTE ptr es:,al ;insert spacebar
inc si
mov ax,ds:.84
push ax ;push low BYTE
mov WORD ptr es:,ax
add si,2
mov dx,ax ;save hight BYTE
mov ax,ds:.84 ;get money data
mov WORD ptr es:,ax
add si,2
mov al,20h
mov WORD ptr es:,ax
inc si
mov ax,ds:.168
mov WORD ptr es:,ax ;get people data
add di,2
mov al,20h
mov BYTE ptr es:,al ;inser spacebar
inc di
mov ax,ds:.168
mov WORD ptr es:,ax ;inser people data
pop ax
div WORD ptr es:
push ax ;temporarily save to stack
add di,2
mov al,20h
mov BYTE ptr es:,al
inc di
pop es: ;pop average data
add di,2
mov al,20h
mov BYTE ptr es:,al ;insert last spacebar
loop Lop
mov ax,4c00h
int 21h
code ends
end start




please help me !
I can't find out error

When I use Debug to run program
and when run to "mov ax,ds:"
Debug told us "Porgram terminated normally"
help me !
thank you very much! thanks
Posted on 2008-11-08 22:13:28 by dapro
2 bytes is a little bit small for a stack, try using at least 256, if not 1024.
Posted on 2008-11-08 22:29:25 by sinsi