Sharp MZ-5500 Tehnical Manual page 36

Table of Contents

Advertisement

Programming example (for the circuit example- ):
'
CSEG
ORG
100H
CLI
XOR
AX, AX
Saving and setting
MOV
DS, AX
interrupt address
MOV
BX, 100H+4*13
MOV
AX, [BX]
MOV
CS=INTADR, AX
MOV
AX, OFFSET INT25
1
MOV
[BX], AX
ADD
BX, 2
MOV
AX, [BX]
MOV
CS: INTADR+2, AX
MOV
AX, CS
MOV
[BX], AX
PUSH
CS
J
8080 model
POp"
DS
IN
Al., 42H
]
Clear the .mask register
AND
AL, ODFH
OUT
42H, AL
STI
1
I
Interrupt enabled
INTADR
DB
0, 0, 0, 0
INT25:
PUSH
AX
Interrogate interrupt
1
1
PUSH
DX
MOV
DX, lCOH
IN
AX, DX
AND
AX, 1
i'
JNZ
INTA
POP
DX
POP
AX
JMPF
CS=INTADR
J
To next level interrupt
routlne
INTA:
OUT
DX, AX
J
Interrupt acknowledge
Interrupt processing
MOV
AL, 20H
EOI genera ted and return
l
OUT
40H,
AL.
OUT
30H, AL
POP
DX
POP
AX
IRET
3'3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mz-5600

Table of Contents