Closed nkeck720 closed 8 years ago
To have the carry flag set (or cleared) when returning from an interrupt you can't just write:
Code:
stc iret
The IRET instruction overwrites the flags with the copy that was pushed on the stack when the interrupt started! Use any of the following:
or [esp+4],1 ;Sets CF prior to exiting an interrupt iret ... and [esp+4], -2 ;Clears the CF prior to exiting an interrupt iret
To have the carry flag set (or cleared) when returning from an interrupt you can't just write:
Code:
The IRET instruction overwrites the flags with the copy that was pushed on the stack when the interrupt started! Use any of the following:
Code: