PDP11 PeripheralsHbk 1972 - Trailing-Edge
PDP11 PeripheralsHbk 1972 - Trailing-Edge
PDP11 PeripheralsHbk 1972 - Trailing-Edge
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
6.2.2 Interrupt<br />
During an interrupt, the interrupt monitor bit is at 1 (it had become a 1 either during<br />
the same line time clock transition that caused the interrupt, or during a previous<br />
transition.<br />
Shown below is a program using the LKS in the interrupt mode. Its purpose is to<br />
enter the routine TIME after every N interrupts. When the main program is interrupted,<br />
it is directed to the vector address LKV which is 100, and then to LKV + 2<br />
which is 102. The word in 100 is the adddress of the first instruction in the interrupt<br />
routine, and is consequently transferred into the processors program<br />
counter. The word in 102 is the new status register. The new status word contains<br />
the number 300 which indicates a priority level BR6 with all five condition codes,<br />
T, Z, N, V, and C equal to O.<br />
LKS 777546<br />
LKV 100<br />
MAIN: MaV # N, CNTR<br />
MaV # 100, LKS<br />
LKV: LK SERV<br />
300<br />
LKSERV: DEC CNTR<br />
BEQ TIME<br />
RTI<br />
TIME MaV # N, CNTR<br />
RTI<br />
ENB INTR<br />
6.2.3 Non Interrupt<br />
The LKS may be used in the non·interrupt mode as well as in the interrupt mode.<br />
Shown below is a routine using the LKS in the non·interrupt mode. The program<br />
is designed to alternate between two program routines, each lasting for appro·<br />
ximately the time periods between line clock changes which are either 16.67 or 20<br />
ms. Each routine contains a program loop which lasts for a considerably shorter<br />
time duration than the period between line clock changes.<br />
LKS = 777546<br />
START: CLRB LKS<br />
SYNC: TSTB LKS<br />
BPL SYNC<br />
CLRB LKS<br />
94