256 THE x86 MICROPROCESSORS
to type number 2. e routine corresponding to this hardware interrupt can be tested by using
the instruction INT 2. In eff ect, a hardware interrupt on the NMI pin and the software instruc-
tion INT 2 takes us to the same absolute address. Similarly, the eff ect of a ‘divide by zero’ error
can be simulated by writing the instruction INT 0 which takes control to the ISR which has
been written for the ‘divide by zero’ error.
What Is the Size of an Interrupt Instruction?
e format of an interrupt instruction is INT n where n can only be a byte. e opcode for INT
is ‘CD’, again a byte – for example INT 5 has the opcode CD 05. us, an interrupt instruc-
tion is 2 bytes long, except the breakpoint interrupt INT 3 which ...