Application Examples
;***********************************************************
;*
*
;*
TEST
CODE
*
;*
*
;***********************************************************
;
; INITIALIZE SEGMENT REGISTER AND STACK POINTER.
;
START:
MOV
AX,SEG DATA
MOV
DS,AX
MOV
AX,SEG STACK
MOV
SS,AX
MOV
SP,OFFSET STACK_TOP
;
; INITIALIZE INTERRUPT VECTORS
;
PUSH
DS
MOV
AX,0
MOV
DS,AX
MOV
DI,OFFSET TYPE_248
MOV
CX,1
; 1 VECTOR TO BE INITIALIZED
VECT:
MOV
WORD PTR [DI],OFFSET SERIAL_8250
ADD
DI,2
MOV
[DI],CS
ADD
DI,2
LOOP
VECT
POP
DS
;
; INITIALIZE THE VARIABLE TO INDICATE NO INTERRUPT AT PRESENT
;
MOV
INT_FLAG,0FFH
;
; INITIALIZE THE SERIAL PORT 0 AND THE 8259A INTERRUPT CONTROLLER
; ON THE ZT 8840 QUAD UART BOARD.
;
CALL
INIT_UART
CALL
INIT_PIC_8840
;
; INITIALIZE ZT 8809A 8259A INTERRUPT CONTROLLER.
;
CALL
INIT_PIC_8809A
;
; AT THIS POINT, ALL THAT IS NEEDED IS TO ENABLE THE INTERRUPTS
; AT THE UART AND THE PROCESSOR, AND TO GENERATE AN
; INTERRUPT. AS SOON AS THE INTERRUPT IS ENABLED AT THE UART,
; THERE WILL BE AN INTERRUPT REQUEST TO THE 8259A. UPON RECEIPT
; OF THE INTERRUPT, THE PROGRAM WILL CAUSE THE LED TO STROBE ON
; AND OFF ONE TIME, AND TERMINATE.
4-26