Instruction Set
4-77
IRET
IRET
Examples
This example interrupt-service routine resets the Timer 1 Count (T1CNT) register.
Tips
IRET always performs a far return, restoring both IP and CS, and then popping the
Processor Status Flags register from the stack.
Related Instructions
If you want to
See
Call a procedure
CALL
Clear the interrupt-enable flag and disable all maskable interrupts
CLI
Generate a software interrupt
INT
End a procedure and return to the calling procedure
RET
Set the interrupt-enable flag, enabling all maskable interrupts
STI
; reset Timer 1
ISR_T0:
PUSHA
; save general registers
; reset Timer 1
MOV
DX,TMR1_CNT_ADDR
; address of T1CNT register
MOV
AX,0
; reset count
OUT
DX,AX
; write count to register
; clear in-service bit
MOV
DX,INT_EOI_ADDR
; address of End-Of-Interrupt (EOI) register
MOV
AX,ITYPE_TMR0
; EOI type
OUT
DX,AX
; clear in-service bit
POPA
; restore general registers
IRET
Содержание 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...