
 .TITLE RMNTR         / *** RESIDENT MONITOR ***
                      /WRITTEN BY V. KEZYS
                      /FOR EXPANDED PDP-15/20.
                      /FILE OPERATION ON
                      /68K DRUM.
 .ABS
SPFAL=703201
MTSF=707301
MTSE=707341
CLSF=705341
DRSF=707001
LSDF=706501	/DEC. STANDARD
RSF=700101
PSF=700201
KSF=700301
TSF=700401
IOF=700002
ION=700042
KRB=700312
TLS=700406
 .TITLE PICENT       /PROG. INT. ENTRY POINT
 .LOC 0
PIC 0	
 IOF
 JMP SKPCHN
 .TITLE MNTPRM          /MONITOR PARAMETERS
ARGPT
ARG
DAT
ERR. HLT
AC
 .TITLE RMC             /RESIDENT MONITOR CONTROL
 .LOC 20
CALPT 0
 IOF
 DAC AC
 LAC CALPT
 TAD (577777
 CLL
 DAC CALPT
 DAC ARGPT
 LAC* CALPT
 AND (774000	/CHECK FOR IND. CAL
 SZA
 JMP ER1
 ISZ ARGPT	/ *FUNC. TEST*
 LAC* ARGPT
 DAC ARG	/2ND ARG
 SPA        	/CHECK FOR +VE FUNC.
 JMP ER0
 SNA       	/CHECK FOR 0 FUNC.
 JMP ERR.	/ILLEGAL
 TAD (377760
 SPA        	/CHECK IF GT. 20
 JMP ER0	/IF SO - ERR. (0)
 LAC ARG
 TAD (377764	/CHECK IF MCR
 SPA
 JMP MCR
 LAC* CALPT
 AND (777
 DAC DAT	/ACTUAL .DAT
 AND (400	/-VE .DAT?
 SNA
 JMP PDAT	/+VE .DAT
 LAC DAT	/-VE .DAT
 TCA
 ADD (377762
 SPA        	/SKP IF .DAT LEGAL
 JMP ER2
 LAC DAT
 TCA
DSPCH TAD (JMP DTDSP	   /+ .DAT RE-ENTRY
 DAC DTDSP
 LAC* ARGPT
 ISZ ARGPT	/ADJ. FOR D.H.
 JMP DTDSP
 .LOC 120       /END OF .SCOM
PDAT LAC DAT
 SNA
 JMP ER2
 ADD (377767	/LEGAL .DAT ?
 SPA
 JMP ER2
 LAC DAT
 ADD (15	/APPEND TO DAT TABLE
 JMP DSPCH	/RET. 
ER0 CLA
 JMP ERR.	/ILLEGAL CAL FUNC.
ER1 CLA!IAC
 JMP ERR.	/CAL* ILLEGAL
ER2 LAC (2
 JMP ERR.	/.DAT SLOT ERR.
 .TITLE MCR	/MONITOR (NON-I/O) CONTROL
MCR AND (774000  /ADJUST FOR DISPACH
 TAD (JMP MCRDSP
 DAC MCRDSP
MCRDSP XX
 JMP TIMER
 JMP EXIT
 JMP TIMER
 JMP TIMER
 JMP TIMER
TIMER JMP NTAVLB
EXIT .TRAN 10,2,2000,1777,776000
 .TRAN 10,0,5000,2000,777600
 JMP NRM
NRM HLT
NTAVLB HLT
 .TITLE DATDSP           /.DAT DISPACHING
DTDSP XX            /.DAT DISPACH
  .REPT 24
 JMP TTY         /TTY HANDLER (TEMPORARY)
 .TITLE SKPCHN        / SKIP CHAIN
SKPCHN SPFAL	/POWER FAIL
 SKP
 HLT
 MTSF	/MAG. TAPE DONE
 SKP
 HLT
 MTSE	/MAT. TAPE ERR.
 SKP
 HLT
 DRSF	/DRUM DONE
 SKP
 HLT
 CLSF	/CLOCK OVERFLOW
 SKP
 HLT
 LSDF	/PRINTER DONE
 SKP
 HLT
 RSF	/PT. RD. DONE
 SKP
 HLT
 PSF	/PT. PUNCH DONE
 SKP
 HLT
 KSF	/KEYBOARD RDY.
 SKP
 JMP INTI      /KEYBOARD INT.
 TSF	/TELEPRINTER DONE
 SKP
 JMP INTO     /TLPRNT. INT.
 .REPT 17         /5 SKPCHN ENTRIES AVAILABLE
 HLT
TTY DAC TDSPCH
TDSPCH XX
 JMP TINIT
 JMP IGN
 JMP IGN
 JMP IGN
 JMP IGN
 JMP TCLS
 JMP IGN
 JMP TREAD
 JMP TWRT
 JMP TCLS
 LAC (6
TINIT LAC* ARGPT
 DAC CPRET
 JMS CRLF
 ISZ ARGPT
 .DEC
 LAC (34
 .OCT
 DAC* ARGPT
 ISZ ARGPT
 JMP* ARGPT
TCLS LAC IOUND
 SZA
J JMP J
 JMS CRLF
 JMP IGN1
TREAD LAC* ARGPT
 DAC LBA
 JMP IGN1
TWRT LAC* ARGPT
 TLS
 JMP IGN1
INTI KRB
 SAD (20
 JMP CP
 DAC* LBA
INTO JMP* 0
IGN1 ISZ ARGPT
IGN JMP* ARGPT
CRLF 0
 LAC (215
 JMS TO
 LAC (212
 JMS TO
 JMP* CRLF
TO 0
 IOF
 TSF
 JMP .-1
 TLS
 ION
 JMP* TO
CP LAC (136
 JMS TO
 LAC (120
 JMS TO
 JMP* CPRET
 .END
