Intel 80C186XL Computer Hardware User Manual


 
8-31
INTERRUPT CONTROL UNIT
5. Set the mask bit in the Interrupt Mask register for any interrupts that you wish to disable.
Example 8-1 shows sample code to initialize the Interrupt Control Unit.
Example 8-1. Initializing the Interrupt Control Unit for Master Mode
$mod186
name example_80C186_ICU_initialization
;
;This routine configures the interrupt controller to provide two cascaded
;interrupt inputs (through an external 8259A connected to INT0 and INTA0#)
;and two direct interrupt inputs connected to INT1 and INT3. The default
;priorities are used.
;
;The example assumes that the register addresses have been properly defined.
;
code segment
assume cs:code
set_int_ proc near
push dx
push ax
mov ax,0110111B ;cascade mode, priority seven
mov dx,I0CON ;INT0 control register
out dx,ax
mov ax,01001101B ;unmask INT1 and INT3
mov dx,IMASK
out dx,ax
pop ax
pop dx
ret
set_int_ endp
code ends
end