Specifications

ReTurn fmm Interrupt instruction is used to reverse the action of the
interrupt sequence. The top two words on the stack are popped into the PC
and PS, returning control to the interrupted sequence.
PROGRAMMING EXAMPLE
A
paper tape reader interrupt service could appear as follows:
First the user must initialize the service routine by specifying an address
pointer and a word count
INIF MOV #BUFADR, #0
; set up address pointer
POINTR = . - 2
; in third word of MOV instruction.
MOV #CNTR, #0
; set up character count in
CRCNT=.-2
; third word of MOV instruction.
MOV
#lOl,
PRS ; read a character with interrupt
_ ; enabled.
When the interrupt request occurs and is acknowledged, the processor stores
the current PC and PS on the stack. Next it picks up the interrupt vector or
new PC and PS beginning at location 70~. The next instruction executed is
the first instruction of the device service routine at PRSER.
PRSER: TST
PRS
BMI ERROR
I
MOVB PRB, @POINTR ;
INC POINTR
DEC CRCNT
BEQ DONE
. INC PRS
DONE: RTI
;
test for error
branch to error routine if
bit 15 of PRS is set.
move character (byte)
from reader to buffer
increment pointer
\
decrement character count
branch when input done
start reader for next character
return from interrupt
51