- Assembly code
INT9: PUSH AX PUSH BX PUSH ES IN AL,60h PUSHF CALL DWord PTR DS:[0] CMP AL,1 JNE INT9ret MOV AX,0b800h MOV ES,AX INC BYTE PTR ES:[160*12+40*2+2] INT9ret: POP ES POP BX POP AX IRET
ds:[0]是系统原本的int 9程序.
为什么要pushf呢?调用原来的 int 9中断时不应该就自动pushf了么?
------解决方案--------------------------------------------------------
调用后会用iret返回吧,返回时会有标志出栈的,所以得入下
------解决方案--------------------------------------------------------
CALL DWord PTR DS:[0]
调用这个也相当于 一个中断的 它也有一个iret
so there needs a pushf