INT
INTERRUPT
INT
Operation:
(SP)
+-
(SP) - 2
((SP)
+ 1 :(SP))
+-
FLAGS
(IF)
+-
a
(TF)
+-
a
(SP)
+-
(SP) - 2
((SP)
+ 1 :(SP))
+-
(CS)
(CS)
+-
(TYPE * 4 +
2)
(SP)
+-
(SP) - 2
((SP)
+ 1 :(SP))
+-
(IP)
(IP)
+-
(TYPE *
4)
Description:
INT interrupt-type
INT (Interrupt) activates the interrupt pro-
cedure specified by the interupt-type operand.
INT decrements the stack pointer by two,
pushes the flags
onto
the stack, and clears the
trap (TF) and interrupt-enable (IF) flags to
disable single-step and maskable interrupts.
The flags are stored in the format used by the
PUSHF instruction. SP
is
decremented again
by two, and the
CS register
is
pushed onto the
stack. The address
of
the interrupt pointer
is
calculated by multiplying interrupt-type by
four; the second word of the interrupt pointer
replaces
CS. SP again
is
decremented by two,
and
IP
is
pushed onto the stack and
is
replaced
2-82
Flags Affected:
IF, TF
by the first word of the interrupt pointer.
If
interrupt-type = 3, the assembler generates a
short
(1
byte) form of the instruction, known
as
the breakpoint interrupt.
Software interrupts can be used
as
"supervisor
calls,"
i.e., requests for service from an
operating system. A different interrupt-type
can be used for each type
of
service that the
operating system could supply for an applica-
tion program. Software interrupts also may be
used to check out interrupt service procedures
written for hardware-initiated interrupts.