鱼C论坛

 找回密码
 立即注册
查看: 2079|回复: 0

[汇编作业] 检测点 17.1

[复制链接]
发表于 2019-4-12 17:19:12 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
在int 16h中断例程中,一定有设置 IF = 1 的命令。这种说法对吗?

答:这种说法是错误的,应该不需要因为int 16会把标志寄存器、段地址、偏移地址入栈,当他们出站时标志寄存器会被从新还原所以这里面应该不需要将IF = 1


他的执行顺序是:
int 16h
  1.                 push ds
  2.                 push bx
  3.                 mov bx, 0040h
  4.                 mov ds, bx
  5.                 cmp ah, 10h
  6.                 call 07b9h
  7.                 push ds
  8.                 push ax
  9.                 mov ax, 0040h
  10.                 mov ds, ax
  11.                 lahf
  12.                 test word ptr [0314h], 2400h
  13.                 jnz 07d5
  14.                 cli
  15.                 jmp 07d0h
  16.                 sahf
  17.                 pop ax
  18.                 pop ds
  19.                 jmp 07d8
  20.                 ret
  21.                 jb 09d6
  22.                 or ah, ah
  23.                 jz 0a18h
  24.                 mov bx, [001a]
  25.                 cmp bx, [001c]
  26.                 jnz 0a35
  27.                 call 0bc8
  28.                 push bx
  29.                 push cx
  30.                 push ax
  31.                 lahf
  32.                 push ax
  33.                 mov al, [0017]
  34.                 and al, 70
  35.                 mov cl, 04
  36.                 shr al, cl
  37.                 and al, 07
  38.                 mov bl, [0097]
  39.                 xor bl, al
  40.                 and bl, 07
  41.                 jz 0c08
  42.                 pop ax
  43.                 sahf
  44.                 pop ax
  45.                 pop cx
  46.                 pop bx
  47.                 ret
  48.                 jnz 0a3f
  49.                 mov ax, [bx]
  50.                 call 0bbbh
  51.                 inc bx
  52.                 inc bx
  53.                 cmp bx, [0082]
  54.                 jnz 0bc7
  55.                 ret
  56.                 mov [001a], bx
  57.                 call 0b74
  58.                 push bx
  59.                 push ax
  60.                 lahf
  61.                 mov bx, ax
  62.                 pop ax
  63.                 push bx
  64.                 cmp ah, 0e0h
  65.                 jnz 0b8f
  66.                 cmp ah, 84
  67.                 ja 0bb2h
  68.                 cmp al, 0f0h
  69.                 jnz 0b9f
  70.                 cmp al, 0e0h
  71.                 jnz 0ba9
  72.                 mov bx, ax
  73.                 pop ax
  74.                 sahf
  75.                 mov ax, bx
  76.                 pop bx
  77.                 clc
  78.                 ret
  79.                 jb 0a2a
  80.                 call 0b4c
  81.                 mov word ptr cs:[09b8], 0000
  82.                 mov word ptr cs:[09bc], 0000
  83.                 ret
  84.                 jmp 09ee
  85.                 pop bx
  86.                 pop ds
  87.                 jmp 064c
  88.                 push ds
  89.                 push ax
  90.                 mov ax, 0040
  91.                 mov ds, ax
  92.                 test word ptr [0314], 2400
  93.                 jnz 06aa
  94.                 pop ax
  95.                 pop ds
  96.                 iret
  97.                
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-2 06:45

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表