home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG023.ARK
/
INTRRUPT.DOC
< prev
next >
Wrap
Text File
|
1984-04-29
|
2KB
|
63 lines
***************************************************************************
** COPYRIGHT (C) MASSACHUSETTS INSTITUTE OF TECHNOLOGY AND HARVARD **
** UNIVERSITY, BIOMEDICAL ENGINEERING CENTER 1977. ALL RIGHTS RESERVED. **
***************************************************************************
THE STOIC INTERRUPT HANDLER
J. SACHS 2/2/77
INTERRUPT SERVICE ROUTINES MUST BE WRITTEN IN
ASSEMBLER. THE FOLLOWING PROCEDURE MAY BE USED TO DEFINE
AN INTERRUPT SERVICE ROUTINE:
FOR DEVICES INTERRUPTING VIA RST 7:
. ASSEMBLER<
.
.
.
DISMISS JMP, >
DEVC INTERRPUT
THIS LEAVES A POINTER ON THE STACK TO AN
INTERRUPT ROUTINE WHICH TERMINATES IN A JMP DISMISS.
THE ADDRESS AND DEVICE CODE ("DEVC") ARE THEN USED
AS ARGUMENTS TO "INTERRUPT" WHICH STORES THE INTERRUPT
SERVICE ROUTINE ADDRESS IN THE INTERRUPT DISPATCH TABLE.
THE STOIC INTERRUPT HANDLER SAVES AND RESTORES ALL ACTIVE
REGISTERS.
NORMALLY, AN INTERRUPT SERVICE ROUTINE WILL EITHER PLACE
DATA INTO A CIRCULAR BUFFER, REMOVE DATA FROM A CIRCULAR
BUFFER OR MODIFY FLAGS.
TO SERVICE AN INTERRUPT HAVING ITS OWN RESTART,
THE FOLLOWING SEQUENCE IS USED:
. ASSEMBLER<
PSW PUSH, B PUSH, D PUSH, H PUSH,
.
.
.
DISMISS JMP, >
2001 RESTART# 3 * + !
WHERE RESTART# IS THE RESTART NUMBER.
WHEN THE INTERRUPT HANDLER IS LOADED, "RDCI" AND "WRCI"
WILL SAVE AND RESTORE THE RESTART LOCATIONS (2000 TO 2018 HEX).
IN ADDITION, THE TTY KEYBOARD IS RUN UNDER INTERRUPTS, WITH
A CIRCULAR BUFFER (SIZE GIVEN BY "TTISZ"). TYPING (CONTROL A)
WILL CAUSE AN UNCONDITIONAL JUMP TO "ABORT". "ABORT" IS
MODIFIED TO ENABLE INTERRUPTS AND KEYBOARD INTERRUPTS AND TO
RESET THE KEYBOARD CIRCULAR BUFFER.
***EOF***