English
Language : 

Z85233 Datasheet, PDF (157/317 Pages) Zilog, Inc. – The Zilog SCC Serial Communication Controller
Application Note
Interfacing Z80® CPUs to the Z8500 Peripheral Family
SOFTWARE CONSIDERATIONS - POLLED OPERATION
There are several options available for servicing interrupts
on the Z8500 peripherals. Since the vector of IP registers
can be read at any time, software can be used to emulate
the Z80 interrupt response. The interrupt vector read
reflects the interrupt status condition even if the device is
programmed to return to vector that does not reflect the
status change (SAV or VIS is not set). The code below is
a simple software routine that emulates the Z80 vector
response operation.
Z80 Vector Interrupt Response, Emulation by
Software
;This code emulates the Z80 vector interrupt
;operation by reading the device interrupt
;vector and forming an address from a vector
;table. It then executes an indirect jump to
;the interrupt service routine.
INDX: LD
OUT
IN
INC
RET
AND
LD
LD
LD
ADD
LD
INC
LD
LD
JP
VECTAB:
DEFW
DEFW
DEFW
DEFW
DEFW
DEFW
DEFW
DEFW
A,CIVREG
(CTRL), A
A, (CTRL)
A
Z
00001110B
E,A
D,0
HL,VECTAB
HL,DE
A, (HL)
HL
H, (HL)
L,A
(HL)
INT1
INT2
INT3
INT4
INT5
INT6
INT7
INT8
;CURRENT INT. VECT. REG
;WRITE REG. PTR.
;READ VECT. REG.
;VALID VECTOR?
;NO INT - RETURN
;MASK OTHER BITS
;FORM INDEX VALUE
;ADD VECT. TABLE ADDR.
;GET LOW BYTE
;GET HIGH BYTE
;FORM ROUTINE ADDR.
;JUMP TO IT
6-22
UM010901-0601