int n:

  1. get n
  2. pushf
  3. TF = 0, IF = 0
  4. push cs
  5. push IP
  6. (IP) = 4 * n, (CS) = 4 * n + 2

​ ; 中断处理程序

  1. pop IP
  2. pop CS
  3. popf

4,5,6可归为 call dword ptr ds:[0]

7,8,9可归为 iret

3的具体步骤为

1
2
3
4
5
pushf
pop ax
and ah, 11111100b
push ax
popf