問題描述:
(1)
閱讀下面的程序.執行程序後,以BUF2 BUF3 BUF4為首地址的3個字節存儲區中的存儲的數據.
stack segment stack
db 200 dup(0)
stack ends
data segment
buf1 db 0,1,2,3,4,5,6,7,8,9
buf2 db 10 dup(0)
buf3 db 10 dup(0)
buf4 db 10 dup(0)
data ends
code segment
assume cs: code,ds: data,ss:stack
start:mov ax,data
mov ds,ax
mov si,offset buf1
mov di,offset buf2
mov bx,offset buf3
mov bp,offset buf4
mov cx,10
lopa:mov al,[si]
mov [di],al
inc al
mov[bx],al
add al,3
mov ds:[bp],al
inc si
inc di
inc bp
inc bx
dec cx
jnz lopa
mov ah,4ch
int 21h
code ends
end start
解析:
buf2開始的單元:00H,01H,02H,03H,04H,05H,06H,07H,08H,09H
buf3開始的單元:01H,02H,03H,04H,05H,06H,07H,08H,09H,0AH
buf4開始的單元:04H,05H,06H,07H,08H,09H,0AH,0BH,0CH,0DH