1、变量区msg1中存放有三个字节类型的变量。要求把三个数据顺序传送放入msg2,逆序放入msg3中。(3中方式)
1.POP – PUSH 方式
data segment
msg1 db "abc"
msg2 db 3 dup(3)
msg3 db 3 dup(3)
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
push word ptr msg1
2、 push word ptr msg1[1]
pop word ptr msg2[1]
pop word ptr msg2
ab: push word ptr msg1
bc: push word ptr msg1[1]
ba: pop word ptr msg3
pop word ptr msg3[1]
push word ptr msg3
ab: push word ptr msg1
bc: push word ptr msg1[1]
cb: pop word ptr msg3[1]
pop word ptr msg3
push word ptr msg3[1]
pop word ptr msg3
pop WORD PTR msg3
mov ax, 4c00h
int 21h
code ends
end start