检测点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
retf
code ends
end start
检测点10.2
下面的程序执行后,ax中的数值为多少?
内存地址 机器码 汇编指令
1000:0 b8 00 00 mov ax,0
1000:3 e8 01 00 call s
1000:6 40 inc ax
1000:7 58 s:pop ax
ax=6
检测点10.3
下面的程序执行后,ax中的数值为多少?
内存地址
内存地址 机器码 汇编指令
1000:0 b8 00 00 mov ax,0
1000:3 9a 09 00 00 10 call far ptr s
1000:8 40 inc ax
1000:9 58 s: pop ax
add ax,ax
pop bx
add ax,bx
ax=1010h
检测点10.4
下面的程序执行后,ax中的数值为多少?
内存地址 机器码 汇编指令
1000:0 b8 06 00 mov ax,6
1000:2 ff d0 call ax
1000:5 40 inc ax
1000:6 mov bp,sp
add ax,[bp]
ax=0bh
检测点10.5
(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
(call后,讲后面一句的段地址和ip压入了栈中,所以跳到的就是后一句。)
(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 ds,ax
mov ax,0
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。
- [nbfengyi] 图在相册 10/22 22:02
- [nbfengyi] 图片在相册里 10/21 15:43
- [chinatree] 书上有讲。 10/04 12:30
- [12345678911] 第三问的解答我不懂什么回事能解释下吗 10/04 11:45
- [chinatree] 写出来就行了,不用太纠结。 09/29 21:00
- [nbfengyi] 用了一整个下午写这个程序,一开始就想到了循环,开始想外循环必有一次,内循环有4字节和2字节的,是不要 09/29 20:20
- [nbfengyi] 开始没有注意是四个字母 09/27 20:06
- [nbfengyi] 开始时: -d ds:0 144C:0000 31 2E 20 64 69 73 70 6C- 09/27 20:06
- [chinatree] 你不要拿半成品来糊弄自己好不好?! 09/27 17:50
- [nbfengyi] 受教了, 09/24 09:59