
 .ABS
 .TITLE NRMNTR      /NON-RESIDENT MONITOR
 .LOC 7000
TWC=1720
TLBA=1715
NTB=772
PJ=1060
GTCHAR=1407
PTCHAR=1466
PG1=1722
PG2=1723
PRNT=1247
CRLF=1241
FT=316
MTRS=707352
MTGO=707344
MTLC=707304
MTCL=707302
MTSF=707301
DRDA=707004
DRRS=707212
DRSF=707001
DRCL=707201
ERCD=157
EXT=1050
TTY=1062
DATD=60
FTAD=314
MTA=1730
/
RESTRT LAC ERCD    /CHECK IF ENTRY FROM ERROR.
 AND (1000
 SZA
 JMP ERPROC
 CLA!CMA
 DAC 111     /SET NRMNTR IN CORE
 .INIT -2,1,RESTRT      /INIT DEV.
 707764
 .INIT -3,0,RESTRT
/
 .WRITE -3,2,CAPT,32
 .WAIT -3            /WRITE OUT CAPTION "$MONITOR V2A"
 LAC MBUF
 SNA
 JMP NMSG     /NO MESSEGE IF ZERO
 .WRITE -3,2,MBUF,32
 .WAIT -3  /PRINT THE MESSEGE
NMSG JMS CRLF
/
CLOOP 707764
 LAC (272
 JMS PRNT        /PRINT OUT ':'
 .READ -2,2,CBUF,32       /COMMAND LOOP
 .WAIT -2            /READ A COMMAND
/
 DZM TWC             /INITIALIZE GTCHAR ROUTINE
 777777
 DAC PG1
 777776
 DAC PG2
 LAC STBA     /SIX BIT BUF. PT.
 DAC BP2      /AD. MUST BE EVEN
 777770       /ZERO BUF.
 DAC LP
 DZM* BP2
 ISZ BP2
 ISZ LP
 JMP .-3
 LAC STBA
 DAC BP2
 LAC (CBUF+1
 DAC TLBA
 DZM ARGC      /# ARGUEMENTS
NARG 777776    /NEXT ARG.
 DAC LP        /2 PASSES (2x3=6 CHARS.)
 JMS GTCHK     /GET AND CHECK A CHAR.
 SAD (40
 JMP .-2       /IGNORE BLANKS
LPT SWHA
 CLL!RTL
 RAL
 DAC* BP2      /1st. CHAR. OF ARG. UPPER END.
 JMS GTCHK
 SAD (40
 JMP ENDARG    /ARG. FINISHED
 SWHA
 CLL!RTR
 RAR
 XOR* BP2      /2nd. (5th.) CHAR IN ARG.
 DAC* BP2
 JMS GTCHK
 SAD (40
 JMP ENDARG
 XOR* BP2
 DAC* BP2      /3rd. (6th.) CHAR. IN ARG.
 JMS GTCHK
 SAD (40
 JMP ENDARG   
 ISZ BP2         /PT. TO 2nd PART OF ARG OR NEXT ARG.
 ISZ LP          /TEST IF 2nd PART
 JMP LPT         /DO 2nd PART OF ARG.
 .WRITE -3,2,ER2,10     /ARG .GT. 6 CHARS.
 .WAIT -3
 JMS CRLF
 JMP CLOOP
/
ER2 011002
 772776
 .ASCII '***SYMBOLIC NAME EXEEDS 6 CHARACTERS'
/
GTCHK 0
 JMS GTCHAR
 SAD (54     /CHECK IF ','
 JMP ENDARG
 SAD (15       /CHECK IF CR.
 JMP ENDCOM
 SAD (56         /CHECK IF '.'
 JMP ENDCOM
 AND (77
 JMP* GTCHK
/
ENDARG ISZ ARGC     /INC. ARG. COUNT
 LAC BP2
 ADD (2
 AND (777776
 DAC BP2       /ADJUST FOR NEXT ARG ENTRY
 JMP NARG      /INTERPRET NEXT ARG
/
ENDCOM ISZ ARGC    /COMMAND INTERPRETER
 LAC STBA       /LOOK UP ARG.
 JMS TBLLK      /TABLE LOK UP ROUTINE
 CTAB           /COMMAND TABLE ADD.
 SZA
 JMP CDSPCH      /COMMAND FOUND;DISATCH
 LAC STBA
 JMS TBLLK
 FTAB            /FILE TABLE ADD.
 SZA
 JMP FLD         /IT IS A FILE; LOAD IT
 .WRITE -3,2,ER3,10      /FILE NOT FOUND NOR A COMMAND
 .WAIT -3
 LAC STBA
 JMS PRS         /PRNT 2 WD. NAME
 JMS CRLF
 JMP CLOOP
/
ER3 012002
 772776
 .ASCII '***NON-EXISTENT COMMAND OR FILE REFERENCED:'<15>
/
ERPROC .WRITE -3,2,IE1,10
 .WAIT -3
 LAC ERCD
 JMS WOCT
 LAC ERCD
 AND (777
 DAC ERCD
 JMS CRLF
 .WRITE -3,2,S1,10
 .WAIT -3
 LAC ERCD+3
 JMS WOCT
 JMS CRLF
 .WRITE -3,2,S2,10
 .WAIT -3
 LAC ERCD+4
 JMS WOCT
 JMS CRLF
 .WRITE -3,2,S4,10
 .WAIT -3
 LAC ERCD+5
 JMS WOCT
 JMS CRLF
 .WRITE -3,2,S6,10
 .WAIT -3
 LAC ERCD+2
 JMS WOCT
 JMS CRLF
 .WRITE -3,2,S7,10
 .WAIT -3
 LAC ERCD+1
 JMS WOCT
 JMS CRLF
 JMP RESTRT
IE1 004002
 774776
 .ASCII 'ERROR CODE= '<22>
S7 004002
 773776
 .ASCII 'PC ON INT.=   '<22>
S4 004002
 773776
 .ASCII 'MT. STATUS=   '<22>
S6 004002
 773776
 .ASCII 'CAL ADDRESS=  '<22>
/
TBLLK 0      /SEQ. TABLE LOOK-UP
 DAC LARGP   /ARG. PT.
 LAC* TBLLK
 DAC TADD    /TABLE ADD.
 LAC* TADD    /-#ENTRIES IN TABLE
 DAC NENT
 ISZ TADD    /PT. TO 1st. ENTRY
 ISZ TBLLK   /ADJUST FOR RETURN
 DZM EN      /ZERO ENTRY NO.
 LAC* LARGP
LKLP ISZ EN
 SAD* TADD
 JMP C2      /COMPARE 1st. PART
 ISZ TADD
 ISZ TADD
 ISZ NENT
 JMP LKLP
 CLA
 JMP* TBLLK   /ENTRY NOT FOUND
/
C2 ISZ TADD
 ISZ LARGP
 LAC* LARGP  /2nd. PART
 SAD* TADD      /COMPARE 2nd. PART
 SKP
 JMP PTBCK    /NOT CORRECT
 LAC EN
 JMP* TBLLK   /ENTRY FOUND
PTBCK LAC LARGP
 ADD (777776
 DAC LARGP
 LAC* LARGP
 JMP LKLP+4     /PT. RESET BACK; CHECK NEXT ENTRY
/
PRS 0       /PRINTS 6-BIT.
 DAC TADD
 777776
 DAC LP     /2 PASSES
PRSL LAC* TADD
 SWHA
 CLL!RTR
 RAR
 AND (77    /UPPER 6 BITS
 SNA
 JMP* PRS   /IF CHAR=0 - FINISHED
 JMS PRNT6
 LAC* TADD
 RTR
 RTR
 RTR
 AND (77
 SNA
 JMP* PRS
 JMS PRNT6
 LAC* TADD
 AND (77
 SNA
 JMP* PRS
 JMS PRNT6
 ISZ LP
 SKP
 JMP* PRS
 ISZ TADD
 JMP PRSL
PRNT6 0    /PRINT 6 BIT
 DAC CH1
 AND (40
 SZA
 JMP .+3
 LAC (300   /ALPHA
 JMP .+2
 LAC (200     /NON-ALPHA
 XOR CH1
 JMS PRNT
 JMP* PRNT6
CH1
/
CDSPCH TAD (JMP* DSPCH
 DAC DSPCH
 LAC STBA
 AAC+2
 DAC BP2    /MOVE ARG. PT.
DSPCH XX
 LOAD
 SYSMOD
 LOGIN
 REWIND
 MSG
 FILES
 CREATE
 COMLST
 PURGE
 STRMSG
 DEVLST
 ASSIGN
 ERPROC
 SYSTAT
 COPYCR
 INIT
 CLOSE
 SKIPR
 BKSPC
/
REWIND MTCL
 LAC (004000
 MTLC
 MTRS
 AND (020000
 SNA
 JMP .-3
 JMP CLOOP
/
STRMSG LAC 112    /STORE A MESSAGE TO BE DISPLAYED
 CMA
 SZA
 JMP NPERM    /SYS. PERSONEL ONLY
 LAC (275
 JMS PRNT
 LAC (276
 JMS PRNT
 .READ -2,2,MBUF,32
 .WAIT -2
 JMS CRLF
 JMP CLOOP
MBUF 0
 .BLOCK 25
/
LOGIN JMS TBLLK
 PSWD       /PASS WD. LIST
 SNA
 JMP ILPS   /ILLEGAL PASS WD.
 DAC 113
 TAD (JMP* PDSPCH
 DAC PDSPCH
 CLA
PDSPCH XX    /PASS WD. DISPATCH
 USER1
 USER2
 USER3
 SYS1
 SYS2
 SYSVK
 SYSTEM
/
SYSTEM NOP
SYSVK CMA
 JMP PROT
SYS1 NOP
SYS2 IAC
 JMP PROT
USER1 NOP
USER2 NOP
USER3 JMP PROT
/
PROT DAC 112     /ESTABLISH ACCESS LEVEL
 LAC (24
 JMS PRNT    /CLEAR SCREEN
 JMP CLOOP
/
ILPS .WRITE -3,2,ER4,10
 .WAIT -3
 JMS CRLF
 JMP CLOOP    /ILLEGAL PASS WD.
ER4 005002
 775776
 .ASCII '***ILLEGAL PASSWORD'
/
SYSMOD LAC 112
 SZA
 JMP 3760    /ODT
NPERM .WRITE -3,2,ER5,10   /NOT PERMITTED
 .WAIT -3
 JMS CRLF
 JMP CLOOP
ER5 011002
 772776
 .ASCII '***INSUFICIENT AUTHORIZATION'
/
INIT JMS CONVDAT
 DAC DATS
 JMS DATD   /CHECK DAT
 777000
 AND INITM XOR DATS   /ADD THE DAT
 DAC INITM
INITM .INIT -7,0,RESTRT
 JMP CLOOP
/
CLOSE JMS CONVDAT
 DAC DATS
 JMS DATD  /CHECK
 777000
 AND CLS
 XOR DATS
 DAC CLS
CLS .CLOSE 7
 JMP CLOOP
/
COPYCR JMS CONVDAT   /FETCH DAT
 DAC DATS  /SAVE DAT #
 777000
 AND RD
 XOR DATS
 DAC RD
 777000
 AND WT1
 XOR DATS
 DAC WT1
 JMS DATD   /CHECK DAT
 ISZ BP2
 ISZ BP2
 JMS CONVDAT   /READ NEXT ARG.
 DAC DATS
 777000
 AND WRT
 XOR DATS
 DAC WRT
 JMS DATD        /CHECK DAT
 777000
 AND WT2
 XOR DATS
 DAC WT2
 ISZ BP2
 ISZ BP2   /PT. TO NEXT ARG.
 JMS RNUM   /RD. # OF RECORDS.
 SNA
 IAC
 TCA
 DAC TEMP
RD .READ 7,2,CBUF,32   /USE CBUF FOR INTERMEDIATE BUFFERING
WT1 .WAIT 7
WRT .WRITE 7,2,CBUF,32
WT2 .WAIT 7
 ISZ TEMP
 JMP RD
 JMP CLOOP
DATS 0
/
SKIPR JMS CONVDAT
 DAC DATS
 JMS DATD   /CHECK DAT
 ISZ BP2
 ISZ BP2    /PT. TO NEXT ARG.
 777000
 AND RDS
 XOR DATS
 DAC RDS
 777000
 AND WTS
 XOR DATS
 DAC WTS
 JMS RNUM
 SNA
 IAC 
 TCA
 DAC TEMP
RDS .READ 7,2,CBUF,32
WTS .WAIT 7
 ISZ TEMP
 JMP RDS
 JMP CLOOP
/
BKSPC JMS RNUM    /NO NAME OR DAT NEEDED
 SNA
 IAC
 TCA
 DAC TEMP
BKLP LAC (CBUF-1
 DAC 17763
 -50
 DAC 17762
 LAC (100000     /READ BACK
 MTLC
 MTGO
 MTSF
 JMP .-1
 ISZ TEMP
 JMP BKLP
 JMP CLOOP
/
CONVDAT 0    /CONVERT INPUT ARG. INTO DAT #
 770000
 AND* BP2
 SAD (520000   /CHECK IF ARG. IS DEV. NAME,OR DAT.
 JMP CDEV      /IT IS A DEVICE
 SAD (530000   
 JMP CDAT      /ITS A DAT '+'
 SAD (550000   /          '-'
 JMP CDAT
 AND (400000
 SZA           /CHECK IF INTEGER
 JMP CDAT      /IT IS A DAT
 LAC BP2       /IT IS A FILE NAME
 JMS TBLLK
 FTAB
 SNA
 JMP NSF       /NO SUCH FILE
 RAL
 ADD (FADTAB-1
 DAC TEMP
 LAC* TEMP
 AND (7
 SNA
 JMP FNAS       /FILE NOT ASSIGNED
 CMA
 AND (7
 ADD JDR0
 JMS DATLK      /LOOK FOR THIS ENTRY IN DAT TABLE
 JMS CONV       /CONVERT TO ACTUAL DAT
 AND (777
 JMP* CONVDAT
FNAS .WRITE -3,2,MM2,10
 JMP NSF+4
MM2 005002
 773776
 .ASCII ?***FILE NOT ASSGN'D?<15>
CDAT JMS RNUM
 AND (777
 JMP* CONVDAT
CDEV LAC BP2
 JMS TBLLK
 DEVTAB    /LOOK FOR THIS DEV.
 SNA
 JMP NSD   /NO SUCH DEV.
 RAL
 ADD (DEVINF-2
 DAC TEMP
 LAC* TEMP
 JMS DATLK
 JMS CONV
 AND (777
 JMP* CONVDAT
DATLK 0    /SEARCH DAT TABLE
 DAC TEMP
 LAC DAT
 DAC LP
 -25
 DAC TST
 LAC TEMP
DDLP SAD* LP
 JMP* DATLK    /FOUND
 ISZ LP
 ISZ TST
 JMP DDLP
 DZM TST     /NOT FOUND
 JMP* DATLK
CONV 0
 LAC TST
 AAC+10
 SMA
 JMP* CONV
 AAC+16
 TCA
 JMP* CONV
WDAT 0   /WRITE OUT DAT
 DAC TEMP
 AND (400
 SNA
 JMP PLUS
 LAC (255
 JMS PRNT
 LAC TEMP
 TCA
 DAC TEMP
 JMP .+3
 LAC (240
 JMS PRNT
PLUS LAC TEMP
 AND (7
 XOR (260
 DAC T1
 LAC TEMP
 RTR
 RAR
 AND (7
 XOR (260
 JMS PRNT
 LAC T1
 JMS PRNT
 JMP* WDAT
T1 0
/
LOAD HLT
/
 .TITLE PURGE   /PURGE A FILE NAME
PURGE JMS TBLLK     /REMOVE A FILE COMPLETELY
 FTAB
 SNA
 JMP NSF    /NO SUCH FILE
 RAL      /x2
 DAC FNP
 ADD (FADTAB-2
 DAC FIP     /PT TO FILE DRUM ADD.
 IAC
 DAC LP      /AND DRn
 LAC* LP
 AND (7
 SZA        /CHECK IF ACTIVE (ie. n .NE. 0)
 JMP FACT
 LAC 112     /CHECK IF SYS LOGIN
 CMA
 SNA
 JMP .+5     /IF SO THEN NO PROT.
 LAC* LP
 AND (700
 SZA
 JMP NPERM    /A PROT FILE
 LAC FNP
 ADD (FTAB-1
 DAC FNP      /PT. TO NAME ENTRY
 777776
 TAD FNPT
 DAC FNPT     /RESET -1 FILE NAME PT.
 DAC TEMP
 SAD FNP
 JMP BTF       /IF FILE IS BOTTOM THEN JUST MOVE PT.
 LAC* TEMP    /MOVE UP LAST FILE NAME
 DAC* FNP       /TO FILL EMPTY SPACE
 ISZ TEMP
 ISZ FNP
 LAC* TEMP      /2nd. PART
 DAC* FNP
 LAC FTAB
 CMA
 RAL
 ADD (FADTAB-1
 DAC TEMP        /PT. TO LAST ENTRY IN INFO TAB.
 LAC* TEMP
 DAC* FIP        /BRING UP DR. AD.
 ISZ TEMP
 LAC* TEMP
 DAC* LP         /BRING UP DRn ect.
BTF ISZ FTAB        /ONE LESS FILE
 JMP CLOOP
/
NSF .WRITE -3,2,ER10,10     /NO SUCH FILE
 .WAIT -3
 LAC BP2
 JMS PRS
 JMS CRLF
 JMP CLOOP
ER10 006002
 772776
 .ASCII '***NON-EXISTENT FILE:'<15>
/
FACT .WRITE -3,2,ER11,10    /FILE IS ACTIVE
 JMP NSF+3  /WAIT ect.
ER11 004002
 773776
 .ASCII '***FILE ACTIVE'<15>
/
 .TITLE FLD   /LOAD & EXEC. A PRG.
FLD RAL   /x2
 TAD (LAC FADTAB-2      /LOAD AND EX. MODULE
 DAC FRET
 DAC TEMP
 ISZ TEMP
 LAC* TEMP
 RAL
 SNL   /SKP IF LOADABLE
 JMP NLDBL
FRET XX    /RETRIEVE FILE ADDRESS
 DAC FRET
 LAC (FINFO-1
 707764      /BANK MODE
 DAC 17765   /LOC. OF FILE INFO
 777774     / -4 WDS. OF FILE INFO
 DAC 17764
 LAC FRET
 IOF
 DRDA
 DRSF
 JMP .-1
 DRCL
 LAC* 17765
 DAC 17761    /ACCUMULATOR FOR AFTER LOAD
 LAC FINFO
 DAC 17764    /-#WDS.
 LAC FINFO+1
 DAC 17765      /CORE ADD. -1
 LAC FINFO+2
 DAC 17760      /PRG. ST. ADD.
 LAC FRET
 AAC+4          /ACTUAL PRG DRUM AD.
 707764       /BANK MODE
 JMP 17750       /START LOADING
/
NLDBL .WRITE -3,2,ER6,10
 .WAIT -3
 LAC STBA
 JMS PRS    /WRITE OUT FILE NAME
 JMS CRLF
 JMP CLOOP
ER6 007002
 772776
 .ASCII '***FILE NOT LOADABLE:'<15>
/
FINFO .BLOCK 4     /FILE INFORMATION FOR LOADING
/
 .TITLE SYSTAT      /PRINT OUT SYSTEM STATISTICS
SYSTAT  .WRITE -3,2,S5,10    /WRITE OUT SYSTEM STATS.
 .WAIT -3
 LAC FTAB
 TCA
 JMS WOCT
 JMS CRLF
 IORS
 DAC ERCD+3
 DRRS
 DAC ERCD+4
 MTRS
 DAC ERCD+5
 JMP ERPROC
S1 004002
 774776
 .ASCII 'I/O STATUS=  '<22>
S2 004002
 774776
 .ASCII 'DR. STATUS=   '<22>
S5 005002
 773776
 .ASCII '# OF FILES=    '<22>
/
 .TITLE COMLST    /PRINT OUT LIST OF COMMANDS
COMLST LAC CTAB      /WRITE OUT COMMAND LIST
 DAC LP1    /# OF COMMANDS
 .WRITE -3,2,M2,32   /WRITE OUT CAPTION
 .WAIT -3
 LAC CP    /COMMAND PT.
 DAC TEMP
ILOOP LAC TEMP
 JMS PRS
 LAC (11
 JMS PRNT
 ISZ TEMP
 ISZ TEMP
 ISZ LP1
 JMP ILOOP
 JMS CRLF
 JMP CLOOP
CP CTAB+1
M2 006002
 772776
 .ASCII <24>'COMMANDS AVAILABLE:'<6><15>
/
 .TITLE ASSIGN     /ASSIGN FILE OR DEVICE TO A DAT.
ASSIGN 770000     /ASSIGN A FILE OR DEVICE TO A DAT.
 AND* BP2
 SAD (520000    /CHECK IF A DEV. (*nnn)
 JMP DASS
 LAC BP2
 JMS TBLLK       /CHECK IF LEGAL FILE
 FTAB
 DAC TEMP
 SNA
 JMP NSF     /NO SUCH FILE
/
 ISZ BP2
 ISZ BP2     /PT TO NEXT ARG
 JMS RNUM    /INTERPRET AS A DAT.
 JMS DATD
 ADD DATM1
 DAC DATP
 LAC TEMP
 RAL
 ADD (FADTAB-2
 DAC TEMP    /PT TO DRn ect.
 IAC
 DAC LP
 LAC* LP
 AND (7
 CLL
 SZA
 JMP NFA     /NOT FIRST ASSIGN
 LAC DRPT
 AND (17777     /MASK OUT ADDRESS ONLY
 DAC FTAD
 ADD (100000
 SKP     /SHOULD READ SZL
 JMP DRFT    /TABLE FULL
 DAC DRPT
 RTL
 RTL
 AND (7
 XOR* LP
 DAC* LP
 LAC* TEMP
 AAC+4
 DAC* DRPT   /STORE DATA PT.
 ISZ DRPT
 770000
 DAC* DRPT    /# WDS. IN FILE
 ISZ DRPT
 DZM* DRPT   /ZERO NEXT SECTION
 ISZ DRPT    /PT TO BEGIN. ADD
 LAC* TEMP
 DAC* DRPT
 ISZ DRPT
 ISZ DRPT   /PT. FOR NEXT ENTRY
 LAC* TEMP
 IAC
 DAC PJ     /PT. FOR NTB (DRUM ADD.)
 JMS NTB    /WRITE KEY BLOCK ON FILE
NFA LAC* LP
 CMA
 AND (7
 ADD JDR0
 DAC* DATP
 JMP CLOOP
DRFT .WRITE -3,2,MM,10
 .WAIT -3
 JMP CLOOP
MM 006002
 773776
 .ASCII '***INTERNAL TABLE FULL'<15>
TEST 0
DASS LAC BP2    /ASSIGN DEV. TO DAT.
 JMS TBLLK
 DEVTAB         /CHECK IF LEGAL DEVICE
 DAC TEMP
 SNA
 JMP NSD        /NO SUCH DEVICE
 ISZ BP2
 ISZ BP2        /PT TO NEXT ARG.
 JMS RNUM         /INTERPRET AS DAT
 JMS DATD
 ADD DATM1
 DAC DATP
 LAC TEMP
 RAL
 ADD (DEVINF-2
 DAC LP
 LAC* LP
 DAC* DATP
 JMP CLOOP
/
RNUM 0
 DZM NUM       /ITERPRET ARG. AS SIGNED OCTAL
 DZM SIGN
 LAC* BP2
 JMS SH6
 RAL     /GET BIT OUT OF LINK
 AND (77
 SAD (55         / '-'
 JMP MIN      /IT IS NEG.
 SAD (53         / '+'
 JMP POS      /IT IS SPECIFIED AS POS.
 AND (7
 DAC NUM
POS LAC* BP2
 RTR
 RTR
 RTR
 JMS PT      /PACK INTO NUM
 LAC* BP2
 JMS PT       
 777775      /3 MORE PASSES
 DAC LP1
 ISZ BP2     /2nd. PART
 LAC* BP2
 DAC TEMP
RLOOP LAC TEMP
 JMS SH6
 DAC TEMP
 RAL
 JMS PT    /PACK IT
 ISZ LP1
 JMP RLOOP
FINR LAC SIGN    /FINISHED
 SZA
 JMP .+3
 LAC NUM
 JMP .+3
 LAC NUM
 TCA
 DAC NUM
 JMP* RNUM
MIN CLA!CMA
 DAC SIGN   /SET SIGN
 JMP POS
PT 0    /PACK LOWER 3 BITS
 AND (77
 SNA
 JMP FINR
 AND (7
 DAC LP
 LAC NUM
 CLL!RTL
 RAL
 XOR LP
 DAC NUM
 JMP* PT
NUM 0
SIGN 0
SH6 0    /SHIFT ACC. 6 LEFT
 RTL
 RTL
 RTL
 JMP* SH6
/
 .TITLE FILES      /LIST FILE TABLE
FILES LAC FTAB   /WRITE OUT FILE NAMES AND STATS.
 DAC LP1    /# OF FILES
 LAC (FTAB+1
 DAC FNP    /FILE NAME PT.
 LAC (FADTAB
 DAC FIP    /FILE INFO. PT.
 .WRITE -3,2,FHD,32    /WRITE OUT HEADING AND SET TABS
 .WAIT -3
FLOOP LAC FNP
 JMS PRS    /WRITE FILE NAME
 LAC (11
 JMS PRNT   /TAB OVER TO NEXT COL.
 LAC* FIP
 JMS WOCT     /WRITE OUT DRUM ST. AD.
 LAC (11
 JMS PRNT
 ISZ FIP
 LAC* FIP
 AND (7
 SZA
 JMP DETD    /DETERMINE DAT's
 .WRITE -3,2,M1,10
 .WAIT -3     /FILE INACTIVE
 JMP LDB
DETD LAC FNP
 DAC BP2
 JMS CONVDAT
 JMS WDAT
LDB LAC (11     /CHECK IF LOADABLE FILE
 JMS PRNT
 LAC* FIP
 RAL
 SNL      /SKP IF LOADABLE
 JMP .+3
 LAC (YES
 SKP
 LAC (NO
 JMS PRS   /PRINT YES OR NO
 LAC 112
 CMA
 SNA
 JMP .+5    /SYS. IS IN; PRINT ALL ID's
 LAC* FIP
 AND (700   /CHECK IF PROT. FILE
 SZA
 JMP ENDL   /IF SO DO NOT PRINT ID.
 LAC (11
 JMS PRNT
 LAC* FIP
 RTR       /SHIFT AND x2
 AND (16
 ADD (PSWD-1
 JMS PRS   /PRINT ID.
ENDL JMS CRLF
 ISZ FIP
 ISZ FNP
 ISZ FNP
 ISZ LP1
 JMP FLOOP
 JMP CLOOP
/
DATP 0   /DAT PT.
DTST 0   /DAT COUNT
FNP     /FILE NAME PT.
FIP      /FILE INFO. PT.
YES .SIXBT 'YES'
 0
NO .SIXBT 'NO'
 0
M1 003002
 774776
 .ASCII 'INACTIVE'<22>
FHD 014002
 762776
 .ASCII <24>'FILE NAME   '<6>'DR.ST.AD.'<6>' .DAT    '<6>'LOAD   '<6>'ID'<15>
JDR0 600276
DRPT 300340
DAT 251   /DAT TABLE ADD.
DATM1 250
/
WOCT 0    /WRITE OUT AN OCTAL INTEGER
 DAC OCT
 777772   /6 DIGITS
 DAC TST
WLOOP LAC OCT
 RTL
 RAL
 DAC OCT
 RAL      /GET BIT OUT OF LINK
 AND (7
 XOR (260
 JMS PRNT
 ISZ TST
 JMP WLOOP
 JMP* WOCT
OCT 0
TST 0
/
 .TITLE DEVLST    /LIST DEVICES & 1 DAT
DEVLST .WRITE -3,2,M3,10   /LIST ALL DEVICES
 .WAIT -3
 LAC DEVTAB
 DAC TEST     /# OF DEV.
 LAC (DEVTAB+1
 DAC LP1
DVLOOP LAC LP1
 JMS PRS    /PRINT NAME
 LAC (11
 JMS PRNT
 LAC LP1
 DAC BP2
 JMS CONVDAT
 JMS WDAT
 LAC (11
 JMS PRNT
 ISZ LP1
 ISZ LP1
 ISZ TEST
 JMP DVLOOP
 JMS CRLF
 JMP CLOOP
M3 006002
 772776
 .ASCII <24>'DEVICES AVAILABLE '<6>'.DAT'<15>
/
NSD .WRITE -3,2,ER12,10     /NO SUCH DEVICE NAME
 JMP NSF+3
ER12 006002
 772776
 .ASCII '***NON-EXISTENT DEVICE'<15>
/
 .TITLE MSG   /STORE A MESSAGE ON DAT -7
MSG LAC (275  /ENTER A MSG ONTO MSGFL
 JMS PRNT
 LAC (276
 JMS PRNT     /PRINT OUT PROMT '=>'
 .READ -2,2,CBUF,32   /USE CBUF AS INTERMEDIATE BUFF.
 .WAIT -2
 .WRITE -7,2,CBUF,32
 .WAIT -7       /MSGFL IS PERM. ASSIGNED TO -7
 JMS CRLF
 JMP CLOOP
/
CAPT 005002     /CAPTION BLOCK
 772776
 .ASCII '$MONITOR VA2'<15>
/
 .TITLE CREATE     /CREATE AND ENTER A FILE NAME
CREATE JMS TBLLK    /CHECK IF ENTRY PREVIOUSLY MADE
 FTAB
 SNA
 JMP NPM    /IT IS NOT
 .WRITE -3,2,ER7,10     /FILE ALREADY EXISTING
 .WAIT -3
 JMS CRLF
 JMP CLOOP
/
NPM LAC FTAB   /#WDS. IN LIST
 TAD (11
 SMA
 JMP NTFL        /TABLE NOT FULL
 .WRITE -3,2,ER8,10    /TABLE FULL
 .WAIT -3
 JMS CRLF
 JMP CLOOP
/
NTFL ADD (777776
 SZA
 JMP NTNFL    /STILL NOT FILLED
 .WRITE -3,2,ER9,10
 .WAIT -3     /TABLE NOW FILLED
 JMS CRLF
NTNFL LAC* BP2
 DAC* FNPT    /STORE FILE NAME
 ISZ BP2
 ISZ FNPT
 LAC* BP2
 DAC* FNPT    /2nd. PART
 ISZ FNPT     /ADJUST FOR NEXT ENTRY
/
 777776
 ADD FTAB
 DAC FTAB   /INCR. FILE COUNTER
 CMA
 RAL   /x2
 ADD (FADTAB-1
 DAC TEMP   /INFO TABLE PT.
 LAC EXT
 DAC* TEMP   /STORE DRUM ADD.
 ADD (-770000    /STANDARD FILE SIZE
 DAC EXT   /MOVE FOR NEXT FILE
 ISZ TEMP
 LAC 112     /PROTECT FILE
 AND (700
 DAC* TEMP
 LAC 113     /RECORD OWNER ID.
 CLL!RTL
 RAL
 XOR* TEMP
 DAC* TEMP
 JMP CLOOP
/
FNPT FTAB+15    /PT. TO NEXT EMPTY SLOT 
/ERROR MESSEGES FOR CREATE COMMAND
ER7 007002
 772776
 .ASCII '***EXISTING FILE REFRENCED'
ER8 005002
 774776
 .ASCII '***FILE TABLE FULL'
ER9 006002
 774776
 .ASCII 'WARNING: LAST FILE ENTRY'
/
/
/COMMAND BUFFER (IOPS ASCII)
CBUF .BLOCK 52
/
ARGC
LP
BP2
/SIX-BIT COMMAND BUFFER
 0   /SPARE STB
STB .BLOCK 16
/MAKE SURE STB IS AN EVEN ADDRESS
 .IFZER STB+1&777776-STB
STBA STB
 .ENDC
 .IFNZR STB+1&777776-STB
STBA STB-1
 .ENDC
/
TADD
FTAB -6
 .SIXBT 'EDITOR'
 .SIXBT 'MACRO'
 .SIXBT 'MSGFL'
 .SIXBT 'EDITI'
 .SIXBT 'EDITO'
 .SIXBT 'MACROO'
 .BLOCK 12
DEVTAB -3     /DEVICE NAME TABLE
 .SIXBT '*TTY'
 .SIXBT '*DRA'
 .SIXBT '*MT'
 0
 .BLOCK 16
DEVINF JMP TTY    /HANDLER ADD.
 3776     /DAT=-2,I/O POSSIBLE
 JMP 436    /DRUM HANDLER
 3010
 JMP MTA
 3777
 .BLOCK 16
/
CTAB -23
 .SIXBT 'LOAD'
 .SIXBT 'SYSMOD'
 .SIXBT 'LOGIN'
 .SIXBT 'REWIND'
 .SIXBT 'MSG'
 0
 .SIXBT 'FILES'
 .SIXBT 'CREATE'
 .SIXBT 'COMLST'
 .SIXBT 'PURGE'
 .SIXBT 'STRMSG'
 .SIXBT 'DEVLST'
 .SIXBT 'ASSIGN'
 .SIXBT 'ERROR'
 .SIXBT 'SYSTAT'
 .SIXBT 'COPYCR'
 .SIXBT 'INIT'
 .SIXBT 'CLOSE'
 .SIXBT 'SKIPR'
 .SIXBT 'BKSPCR'
/
PSWD -7
 .SIXBT 'USER1'
 .SIXBT 'USER2'
 .SIXBT 'USER3'
 .SIXBT 'SYS1'
 .SIXBT 'SYS2'
 .SIXBT 'SYS.VK'
 .SIXBT 'SYSTEM'
/
NENT
LP1 0    /JUST A TEMP. COUNTER
EN
TEMP
LARGP
FADTAB 600000       / FILE ADDRESS TABLE 
 400770
 640000      /ENTRIES CORESPOND TO ORDER OF FILE NAME TABLE (FTAB)
 400770
 660000
 000763
 600000
 000771
 610000
 000771
 620000
 000772
 .BLOCK 12
 .END
