马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
我只实现了题中前三行数据的实现(手打好累),不过21行也都是一样的套路,新手,如果有不对的地方请指教XD:
assume cs:code
data segment ;76a
db '1975','1976','1977','1978'
dd 16,22,382,1356
dw 3,7,9,13
data ends
table segment ;76d
db 4 dup('year summ ne ?? ')
table ends
stack segment
db 16 dup(0)
stack ends
code segment
start:
mov cx,4
mov ax,stack
mov ss,ax
mov sp,0ah
mov di,0 ;year,summ
mov si,32 ;ne
mov bp,0
mov ax,data
mov ds,ax
mov ax,table
mov es,ax
s: push 0[di]
push 0[di+2]
push 16[di]
push 16[di+2]
push [si]
add si,2
add di,4
pop es:[0ah+bp]
pop es:[7+bp]
pop es:[5+bp]
pop es:[2+bp]
pop es:[0+bp]
mov dx,es:[7+bp]
mov ax,es:[5+bp]
div word ptr es:[0ah+bp]
mov es:[0dh+bp],ax
add bp,10h
loop s
mov ax,4c00h
int 21h
code ends
end start
|