|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
(1)下面的程序执行后,ax 中的数值为多少?
- assume cs:code
- stack segment
- dw 8 dup (0)
- stack ends
- code segment
- start: mov ax,stack
- mov ss,ax
- mov sp,16
- mov ds,ax
- mov ax,0
- call word ptr ds:[0EH]
- inc ax
- inc ax
- inc ax
- mov ax,4c00h
- int 21h
- code ends
- end start
复制代码
最终ax的值为3,这么有趣的程序,我就不解释了,大家去玩吧。
(2)下面的程序执行后,ax 和 bx 中的数值为多少?
- assume cs:code
- data segment
- dw 8 dup (0)
- data ends
- code segment
- start: mov ax,data
- mov ss,ax
- mov sp,16
- mov word ptr ss:[0],offset s
- mov ss:[2],cs
- call dword ptr ss:[0]
- nop
- s: mov ax,offset s
- sub ax,ss:[0ch]
- mov bx,cs
- sub bx,ss:[0eh]
- mov ax,4c00h
- int 21h
- code ends
- end start
复制代码
ax=1,bx=0;
大家直接上程序,细心分析吧。
|
|