汇编网首页登录博客注册
zmt1975的学习博客
博客首页博客互动【做检测题】论坛求助

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
学习动态
最新留言
好友圈
文章收藏
友情链接

[2012-11-04 15:03] 检测点 10

assume cs:code
stack segment
 db 16 dup (0)
stack ends
10.1
code segment
start: mov ax,stack
       mov ss,ax
       mov sp,16
       mov ax,1000h
       push ax
       mov ax,0
       push ax
       retf
code ends
end start
10.2
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中的值为 0006
10.3
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
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中的值 0005
10.5
(1)
  assume cs:code
stack segment
   dw 8 dup(0)
stack ends
code segment
start: mov ax,stack
       mov ss,ax
       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中的值为CALL指令下一条指令(IP)
(2)
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
评论次数(1)  |  浏览次数(201)  |  类型(汇编作业) |  收藏此文  | 

[  fpamc   发表于  2012-11-05 08:53  ]

10.4  ax=11
10.5(1)ax=3

 
 请输入验证码  (提示:点击验证码输入框,以获取验证码