Application Examples
;***********************************************************
;*
*
;*
INTERRUPT HANDLERS
*
;*
*
;***********************************************************
;
; ONLY ONE SERIAL INTERRUPT HANDLER IS ILLUSTRATED.
OTHER
;
HANDLERS CAN BE ADDED HERE AS NEEDED.
;
CODE
SEGMENT
PARA
;
ASSUME
CS:CODE,SS:STACK,DS:DATA,ES:NOTHING
;
LED_STROBE
PROC
;
; THIS PROCEDURE HANDLES THE INTERRUPT GENERATED BY THE
;
TIMER 2 ON THE ZT 8809A. FIRST THE PRINTER PORT BIT
;
THAT CONTROLS THE LED IS READ AND EXTRACTED, THEN
;
INVERTED AND OR’D BACK INTO THE BYTE READ. THE
;
BYTE IS THEN REWRITTEN TO THE PRINTER PORT.
;
; INPUTS:
NONE
; OUTPUTS:
NONE
; CALLS:
NONE
; DESTROYS:
NONE
;
PUSH
AX
; SAVE REGISTERS USED
PUSH
DX
GET
PRTR_CTRL
; READ THE CONTROL BYTE
MOV
AH,AL
; SAVE IT INTO AH
AND
AH,2
; EXTRACT THE BIT
NOT
AH
; INVERT IT
AND
AH,2
; ZERO ALL OTHERS
AND
AL,0FDH
; ZERO THE BIT IN CTRL BYTE
OR
AL,AH
; OR NEW ONE BACK INTO THE AL
PUT
PRTR_CTRL
; REPLACE INTO CONTROL BYTE
MOV
AL,OCW2_8809A
; SEND EOI FOR IR2
PUT
PORT_A_8809A
POP
DX
POP
AX
IRET
LED_STROBE
ENDP
;
4-10