Instruction Set
4-73
INT
Generate Interrupt
INT
INTO
Generate Interrupt If Overflow
What It Does
INT generates an interrupt via software.
Syntax
Description
INT suspends execution of the current procedure, pushes the Processor Status Flags
(FLAGS) register and the segment (CS) and offset (IP) addresses of the next instruction
onto the stack, and begins executing an interrupt handler (also known as an interrupt service
routine).
The operand you specify is the interrupt type, which can range from 0 to 255. The
microcontroller computes the address of the appropriate vector in the interrupt vector table
by shifting
type left two times (in effect, multiplying it by 4). Then the microcontroller jumps
to the interrupt handler pointed to by that vector.
INTO is a conditional form of INT that is specifically used to handle arithmetic overflow
conditions. If the Overflow Flag (OF) is set to 1 when the microcontroller executes INTO,
then INTO generates a type 4 interrupt. This is equivalent to executing INT 4. If OF is
cleared to 0, INTO does nothing, and the microcontroller begins executing the instruction
following INTO.
Am186 and Am188 microcontrollers reserve some of the low-numbered interrupts for
software traps and exceptions, and for on-board peripheral devices. See the User’s Manual
for the specific device for more information.
IF is not cleared automatically when executing a software interrupt trap. No end-of-interrupt
(EOI) is required even if the interrupt type is the same as that for a peripheral.
Form
Opcode
Description
Clocks
Am186 Am188
INT 3
CC
Generate interrupt 3 (trap to debugger)
45
45
INT
imm8
CD
ib
Generate type of interrupt specified by immediate byte
47
47
INTO
CE
Generate interrupt 4 if Overflow Flag (OF) is 1
48,4
48,4
INT
type
INTO
To generate an unconditional interrupt, use this form
To generate an interrupt only if OF is set to 1, use this
form. When OF is 1, this form is the same as INT 4.
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...