试验七.寻址方式在结构化数据访问中的应用
我只实现了题中前三行数据的实现(手打好累),不过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
push 0
push 16
push 16
push
add si,2
add di,4
pop es:
pop es:
pop es:
pop es:
pop es:
mov dx,es:
mov ax,es:
div word ptr es:
mov es:,ax
add bp,10h
loop s
mov ax,4c00h
int 21h
code ends
end start
页:
[1]