
Instruction Set
4-74
INT
INT
Operation It Performs
Flag Settings After Instruction
If INTO does not take an interrupt, flags are not affected. Otherwise, flags for INT and INTO
are affected as shown below:
Tips
Before using INT, use MOV to copy the stack segment to SS and the stack offset to SP.
When the Interrupt-Enable Flag (IF) is cleared to disable all maskable interrupts, INT can
be used to generate an interrupt, even if it is masked by its interrupt control register.
INT operates like a far call except that the contents of the Processor Status Flags register
are pushed onto the stack before the return address.
Unlike interrupts generated by external hardware, INT does not set an interrupt’s in-service
bit in the In-Service (INSERV) register.
Use IRET to end an interrupt handler and resume the interrupted procedure.
/* save flags */
push(FLAGS);
/* clear trap and interrupt flags */
TF = IF = 0;
/* save address of next instruction */
push(CS);
push(IP);
/* begin execution at location indicated by vector */
/* in interrupt vector table */
CS = [
type << 2;]
/* CS value is fetched at address type shifted by 2 */
IP = [(
type << 2) + 2;] /* IP value is fetched at address type */
/* shifted by 2, plus 2 */
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Processor Status
Flags Register
reserved
OF DF
IF TF SF ZF
AF
PF
CF
? = undefined; – = unchanged
–
–
0
0
–
– res – res – res –
Summary of Contents for Am186 Series
Page 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Page 10: ...Table of Contents x...
Page 18: ...Programming 1 8...
Page 40: ...Instruction Set Listing 3 14...