检测点10.1
补全程序,实现从内存1000:0000处开始执行指令
assume cs:code
stack segment
db 16 dup (0)
stack ends
code segment
start:mov ax,stack
mov ss,ax
mov,sp,16
mov ax,1000
push ax
mov ax,0
push ax
reft f
code ends
end start
分析:Mov ax,1000h:把段地址压入栈
Mov ax,[0] :把偏移地址压入栈
检测点10.2
程序执行后,AX中的数值为多少
ax 的值为6;
分析:call s,push ip ip的值为6,也就是把6压入栈中,然后jmp near prt s 转到标号处执行,
即s:pop ax 也就是pop ip 所以ip 的值是6;
检测点10.3
程序执行后,AX中的数值
Ax的值为1010h
分析:call far ptr s,就push cs ,push ip 即push 1000h,push 0008h
然后jmp far ptr s ,然后pop ax ,即pop 000h,add ax,ax 即ax=0008*0008=10h
Pop bx 即pop 1000h ,add ax,bx 即ax=ax+bx=1000h*10h=1010h;
检测点10.4
程序执行后,AX中的数值
Ax的值为:000BH
分析: mov ax,6,则ax为6
Call ax则push ip 即push 0005h,在jmp 16位寄存器;在执行
Mov bp,sp 则bp=0005h
继续执行add ax,[bp],则ax=ax+[bp]=0006+0005=000B;
检测点10.5
程序执行后,AX中的数值
(1)
Ax的值为3;
分析;
当执行call word ptr ds:[0EH],则push ds:[0EH]处的内容
再执行3 次inc ax ,则ax 为3;
(2)
程序执行后,AX.BX中的数值
Ax 的值为1,bx 的值为0;
分析:当执行mov word ptr ss:[0],offset s(是获得s处的偏移地址给ss:[0]这个字空间)
当执行call dword ptr ss:[0]则push cs,push ip ,在此之前,0E 空间存放offset s 处的偏移址,0C空间存入着CS ,sub ax,ss:[0ch]后,则AX=AX-call dword ptr ss:[0]即ax=offset s- call dword ptr ss:[0],则ax=1,同理bx=0;
- [游客] 10.4解释有误,误导我都搞不清楚了,后来琢磨了很久才弄明白。应该是(bp)=0005h; 09/27 10:58
- [游客] in al,71h ;执行完此条指令后al中的内容为0 ------------------ 06/24 10:57
- [tomato] 正确。 06/15 15:10
- [tomato] 正确。 06/15 15:10
- [游客] 正确。 06/10 16:23
- [mywiil] 没问题。加油。 06/08 10:14
- [mywiil] 正确。 06/08 10:13
- [mywiil] 正确。 06/08 10:12
- [tomato] 正确。 06/02 11:44
- [tomato] 很不错啊,完全正确。 06/02 07:57