Trailing-Edge
-
PDP-10 Archives
-
bb-x130a-sb
-
galtrk.mac
There are 5 other files named galtrk.mac in the archive. Click here to see a list.
TITLE GALTRK
SEARCH GLXMAC
PROLOG (GALTRK)
.TEXT "/LOCALS/SYMSEG:LOW"
IB: $BUILD IB.SZ
$SET(IB.OUT,,T%TTY)
$SET(IB.PRG,,%%.MOD)
$EOB
STACK: BLOCK 100
CMD: BLOCK 10
PROGS: SIXBIT/QUASAR/
SIXBIT/ORION/
SIXBIT/BATCON/
SIXBIT/CDRIVE/
SIXBIT/SPROUT/
SIXBIT/SPRINT/
SIXBIT/PULSAR/
SIXBIT/LPTSPL/
SIXBIT/OPR/
PGMLEN==.-PROGS
SYSNAM: BLOCK 5
GALTRK: RESET
MOVE P,[IOWD 100,STACK]
MOVEI S1,IB.SZ
MOVEI S2,IB
PUSHJ P,I%INIT
MOVSI S2,-5 ;CREATE AN AOBJN AC
LOOP: MOVEI S1,11 ;GET THE GETTAB TABLE NUMBER.
HRLM S2,S1 ;CREATE THE GETTAB INDEX.
GETTAB S1, ;GET THE SYSTEM NAME IN ASCIZ.
SETZ S1, ;IGNORE ERRORS
MOVEM S1,SYSNAM(S2) ;SAVE THE SYSTEM NAME.
AOBJN S2,LOOP ;CONTINUE TILL DONE.
OUTSTR [BYTE(7) 12,15,0,0,0] ;PUT OUT A CRLF
OUTSTR [ASCIZ/Status of Galaxy Version 4 - /]
OUTSTR [BYTE(7) 12,15,0,0,0] ;PUT OUT A CRLF
OUTSTR [ASCIZ/System:/]
OUTSTR SYSNAM ;PUT OUT THE SYSTEM NAME
$TEXT (,<, Date:^H/[-1]/^J^M>) ;AND THE DATE AND TIME.
OUTSTR LINE1 ;PUT OUT HEADING LINE 1
OUTSTR [BYTE(7) 12,15,0,0,0] ;PUT OUT A CRLF
OUTSTR LINE2 ;PUT OUT HEADING LINE 2
OUTSTR [BYTE(7) 12,15,0,0,0] ;PUT OUT A CRLF
MOVSI 14,-^D200 ;CREATE THE SEARCH AOBJN AC.
GETINF: MOVX S1,.GTPRG ;GETTAB JOBNAME TABLE #
HRLM 14,S1 ;GETTAB JOB #
GETTAB S1, ;GET THE JOB NAME
JRST AGAIN ;ERROR,,SKIP THIS JOB
MOVSI T1,-PGMLEN ;IS THE PROGRAM 'QUASAR'
CHECK: CAME S1,PROGS(T1) ; OR 'LPTSPL' OR 'OPR'
JRST [AOBJN T1,CHECK ; OR 'BATCON' OR 'ORION' ???
JRST AGAIN ] ;NO,,SKIP THIS JOB
HRRZM 14,T2 ;YES,,SAVE THE JOB NUMBER
MOVX S1,.GTJLT ;GETTAB LOGIN TIME TABLE
HRL S1,T2 ;GETTAB JOB #
GETTAB S1, ;GET THE JOBS LOGIN TIME
JRST AGAIN ;ERROR,,SKIP THIS JOB
MOVEM S1,P2 ;SAVE THE JOBS LOGIN TIME.
MOVX S1,.GTIPA ;GETTAB IPCF STATS TABLE #
HRL S1,T2 ;GETTAB JOB #
GETTAB S1, ;GET THE IPCF STATS.
JRST AGAIN ;ERROR,,SKIP THIS JOB
MOVEM S1,P3 ;SAVE THE SEND/RECIEVE STATS.
$TEXT (<-1,,CMD>,<SYS ^D/T2/^M^J^0>);CREATE SYS COMMAND
MOVEI S1,CMD ;GET THE SYSTAT COMMAND ADDRESS.
PUSHJ P,SNDPTY ;SEND IT TO THE PTY.
JUMPF AGAIN ;NO GOOD,,TRY AGAIN JOB.
$TEXT (,<^T55L/0(S1)/^A>)
$TEXT (,< ^C8/P2/ ^D4/P3,LHMASK/ ^D4/P3,RHMASK/>)
AGAIN: AOBJN 14,GETINF ;TRY THE AGAIN JOB.
$HALT
JRST LOOP
LINE1: ASCIZ/Job PPN Line# Name Core Status Cpu Time Started Snds Rcvs/
LINE2: ASCIZ/--- -------- ------ ------ ------ ------ -------- -------- ---- ----/
SUBTTL PTY HANDLING ROUTINES
C==16
SNDPTY: SETZB T4,AREA
MOVE 0,[AREA,,AREA+1] ;ZAP THE DATA FIELDS
BLT 0,IBUF+2 ;CLEAR TO HERE
OPEN 0,.IOBLK ;OPEN A PTY
$RETF ;STOP ON AN ERROR
INPUT ;CREATE THE INPUT BUFFER RING
OUTPUT ;CREATE THE OUTPUT BUFFER RING
MOVE T1,[POINT 7,AREA] ;CREATE THE OUTPUT BYTE PTR
HRLI S1,(POINT 7,0) ;CREATE THE INPUT BYTE PTR
MOVEI S2,0
JOBSTS S2,
SETZ S2,
TXNN S2,JB.UDI ;READY FOR INPUT?
JRST .-4 ;NOT YET
PUSHJ P,PUTINP
PTYSTS: MOVX S2,HB.RPT+^D100
HIBER S2,
JFCL
MOVEI S2,0
JOBSTS S2,
SETZ S2,
TXNN S2,JB.UOA ;OUTPUT AVAILABLE?
JRST PTYSTS ;NO..WAIT ON IT
GETPTY: INPUT
GETLOP: SOSGE IBUF+2 ;ANY CHARS THERE ???
JRST GETPTY
ILDB C,IBUF+1 ;GET A BYTE FROM THE PTY.
JUMPE C,GETLOP ;IGNORE NULLS
CAIN C,12 ;IS IT A LINE FEED ???
JRST RETURN
CAIE C,15 ;OR A CARRIAGE RETURN ???
IDPB C,T1 ;SAVE IT IN THE OUTPUT AREA.
AOJA T4,GETLOP
RETURN: INPUT
SETZM S1 ;GET CHANNEL 0 IN S1
JOBSTS S1, ;GET THE PTY STATUS
JFCL ;IGNORE THE ERROR
TXNE S1,JB.UOA ;HAVE MORE AFTER READING SOME
JRST RETURN ;YES..BACK AND EAT IT
TXNN S1,JB.UDI ;WANTS US TO TYPE AT IT
JRST [MOVX S2,HB.RPT+^D500 ;GIVE IT 1/2 SECOND TO GEN MORE OUTPUT
HIBER S2, ;WAIT FOR IT
JFCL ;OH WELL
JRST RETURN] ;NO GO EAT UP ANY OUTPUT
SETZM S1 ;GET CHANNEL 0
RESDV. S1, ;RESET THE CHANNEL
JFCL
MOVEI S1,AREA ;GET THE STRING ADDRESS
$RETT ;AND RETURN
PUTINP: ILDB C,S1 ;GET A SOURCE BYTE
JUMPE C,PUTIN1 ;FINISH UP
SOSG OBUF+2 ;ANYMORE ROOM?
PUSHJ P,PUTIN1 ;NO..DUMP THE BUFFER
IDPB C,OBUF+1 ;YES..STORE THE CHARACTER
JRST PUTINP
PUTIN1: OUTPUT
$RETT
EXIT
AREA: BLOCK ^D100
OBUF: BLOCK 3
IBUF: BLOCK 3
.IOBLK: UU.PHS
SIXBIT/PTY/
OBUF,,IBUF
END GALTRK