Assembly language-maskable interrupt

       Maskable interrupts are external interrupts that the CPU may not respond to. Whether the CPU responds to the maskable interrupt depends on the setting of the IF bit of the flag register.
When the CPU detects the maskable interrupt information, if IF=1, the CPU responds to the interrupt after executing the current instruction and initiates the interrupt process; if IF=0, it does not respond to the maskable interrupt.

The maskable interrupt information comes from outside the CPU, and the interrupt type code is sent to the CPU through the data bus; and the interrupt type code of the internal interrupt is generated inside the CPU.

The reason for setting IF to 0 during the interrupt process is that after entering the interrupt handler, other maskable interrupts are prohibited.
If you need to handle maskable interrupts in the interrupt handler, you can use instructions to set IF.

Instructions for setting IF provided by 8086CPU: sti, set IF=1; cli, set IF=0

 

 

Reference: <<Assembly Language>> Wang Shuang

Guess you like

Origin blog.csdn.net/ma2595162349/article/details/108556939