Trailing-Edge
-
PDP-10 Archives
-
BB-FP64A-SB_1986
-
10,7/stopcd/stopcd.mac
There are 3 other files named stopcd.mac in the archive. Click here to see a list.
TITLE STOPCD Type out stopcd type information
SUBTTL Tarl Neustaedter
SEARCH UUOSYM,SCNMAC,MACTEN
.REQUE REL:SCAN
EXTERN .TYOCH
TWOSEG
RELOC 400000
RELOC
OPDEF CALL [PUSHJ P,]
T4=1+<T3=1+<T2=1+<T1=1>>>
P4=1+<P3=1+<P2=1+<P1=5>>>
P=17
GTBDST:
CONFIG: BLOCK 5
SYSDAT: BLOCK 2
UPTIME: BLOCK 1
SYSNDS: BLOCK 1 ;Number of debug stopcds
SYSNJS: BLOCK 1 ;number of job stopcds
SYSNCS: BLOCK 1 ;Number of CPU stopcodes
SYSNIS: BLOCK 1 ;Number of BUGINFs
CNFWHY: BLOCK 1 ;why reload
CNFDBG: BLOCK 1 ;debugf
SYSPC: BLOCK 1 ;stopcd pc
SYSCD: BLOCK 1 ;stopcd name
SYSJN: BLOCK 1 ;stopcd job
SYSTN: BLOCK 1 ;stopcd tty
SYSPN: BLOCK 1 ;stopcd program
SYSUU: BLOCK 1 ;stopcd uuo
SYSUP: BLOCK 1 ;stopcd PC
SYSPP: BLOCK 1 ;stopcd ppn
STACK: BLOCK 100 ;stack
RELOC
PDL: IOWD 100,STACK ;pointer to stack
GTBTAB: %CNFG0 ;CONFIG string
%CNFG1
%CNFG2
%CNFG3
%CNFG4
%CNDT0 ;SYSDAT string
%CNDT1
%CNSUP ;System uptime
%SYNDS ;Number of debug stopcds
%SYNJS ;Number of job stopcds
%SYNCS ;Number of CPU stopcodes
%SYNIS ;Number of BUGINF's
%CNWHY ;why reload
%CNDBG ;debugf
%SYSPC ;stopcd pc
%SYSCD ;stopcd name
%SYSJN ;stopcd job
%SYSTN ;stopcd tty
%SYSPN ;stopcd program
%SYSUU ;stopcd uuo
%SYSUP ;stopcd PC
%SYSPP ;stopcd ppn
GTBIOD: XWD GTBTAB-.,GTBTAB ;iowd to gettabs to do
TIMTAB: [ASCIZ \week\]
[ASCIZ \day\]
[ASCIZ \hour\]
[ASCIZ \minute\]
[ASCIZ \second\]
DBFTAB: [ASCIZ \System being debugged\]
[ASCIZ \Reload on debug stopcd's\]
[ASCIZ \Reload on job errors\]
[ASCIZ \No auto reloads\]
[ASCIZ \Stop system on cpu stopcd on any cpu\]
[ASCIZ \Don't do continuable stopcd dump on debug stopcds\]
[ASCIZ \Don't do continuable stopcd dump on job stopcds\]
[ASCIZ \Don't do continuable stopcd dump on cpu stopcds\]
[ASCIZ \Call CRSCPY on next clock tick on boot cpu\]
[ASCIZ \Call KDPLDR on next clock tick\]
[ASCIZ \Copy output to FRCLIN to system cty\]
[ASCIZ \Disable next CRSCPY request\]
[ASCIZ \Reload in progress (RECON. function .RCRLD)\]
[ASCIZ \Reload after dump (don't dump twice in MONBTS)\]
[ASCIZ \?illegal bit set\]
[ASCIZ \?illegal bit set\]
[ASCIZ \?illegal bit set\]
[ASCIZ \?illegal bit set\]
[ASCIZ \Can enter EDDT on CPU0 using xct .c0ddt\]
[ASCIZ \Can enter EDDT on CPU1 using xct .c1ddt\]
[ASCIZ \Can enter EDDT on CPU2 using xct .c2ddt\]
[ASCIZ \Can enter EDDT on CPU3 using xct .c3ddt\]
[ASCIZ \Can enter EDDT on CPU4 using xct .c4ddt\]
[ASCIZ \Can enter EDDT on CPU5 using xct .c5ddt\]
DBGIOD: XWD DBFTAB-.,DBFTAB
START: RESET ;Close down IO
MOVE P,PDL
MOVE P2,GTBIOD ;Gettab IOWD
MOVEI P3,GTBDST ;Place to store GETTAB info
GTCNFG: MOVE P1,(P2) ;Get gettab request
GETTAB P1, ;Get it
SETZ P1, ;not there, use default
MOVEM P1,(P3) ;Stash result
AOS P3 ;increment pointer
AOBJN P2,GTCNFG ;and loop
TYPOUT: CALL .TCRLF## ;Blank space
OUTSTR CONFIG ;Type out monitor name
OUTCHR [.CHTAB] ;seperate
OUTSTR SYSDAT ;Type out creation date
CALL .TCRLF##
CALL .TCRLF##
;uptime
MOVE P1,UPTIME ;Get uptime
IDIVI P1,^D60 ;convert to seconds
IDIVI P1,^D60 ;
PUSH P,P2 ;save seconds
IDIVI P1,^D60 ;
PUSH P,P2 ;save minutes
IDIVI P1,^D24 ;
PUSH P,P2 ;save hours
IDIVI P1,^D7 ;
PUSH P,P2 ;save days
PUSH P,P1 ;save weeks
MOVE P2,[XWD -5,TIMTAB] ;Pointer to names of times
SETO P3, ;number of numbers we have printed
OUTSTR [ASCIZ \Uptime: \]
UPTIM1: POP P,P1 ;restore a quantity
JUMPE P1,UPTIM2 ;if nothing, don't type this out
AOSE P3 ;printed anything yet?
OUTSTR [ASCIZ \, \] ;seperate
MOVE T1,P1 ;number
CALL .TDECW## ;type it out in decimal
OUTCHR [" "] ;space
OUTSTR @(P2) ;type out name
CAIE P1,1 ;was it singular?
OUTCHR ["s"] ;no, make it plural
UPTIM2: AOBJN P2,UPTIM1 ;and loop
CALL .TCRLF## ;eol
;Why reload
OUTSTR [ASCIZ /Reason for last reload: /]
MOVE T1,CNFWHY ;get it
CALL .TSIXN## ;and type it out
;stopcds
SKIPN SYSNDS ;any debug stopcodes?
SKIPE SYSNJS ; or job stopcodes?
JRST STPCOD ;yes, type it out
SKIPN SYSNCS ;any CPU stopcodes?
SKIPE SYSNIS ; or BUGINFs?
JRST STPCOD ;yes, type it out
;why reload comment
OUTCHR [" "] ;seperating space
MOVEI P1,.GTWHY ;Gettab table with why reload comment
WHYCM1: MOVE T1,P1 ;Copy gettab request
GETTAB T1, ;ask for the value
JRST WHYCM4 ;Must be end of comment
MOVEI P3,5 ;5 characters to output
MOVE P4,[POINT 7,T1] ;byte pointer to text
WHYCM2: ILDB P2,P4 ;Get a character
JUMPE P2,WHYCM4 ;Terminate string on zero character
OUTCHR P2 ;type it out
SOJG P3,WHYCM2 ;loop
ADD P1,[1,,0] ;Set up for next gettab request
JRST WHYCM1 ;loop
WHYCM4: CALL .TCRLF## ;eol
CALL .TCRLF##
OUTSTR [ASCIZ \No STOPCDs since last reload.\]
CALL .TCRLF##
JRST DEBUGF ;type out debugf bits
;last stopcd typeout
STPCOD:
CALL .TCRLF## ;terminate why reload line
SETO P2, ;No stopcodes yet
STPINF: SKIPN T1,SYSNIS ;Any debug stopcodes?
JRST STPCPU ;no, check job stopcodes
CALL .TDECW## ;type number out
OUTSTR [ASCIZ \ BUGINF\]
CAIE T1,1 ;was it singular?
OUTCHR ["s"] ;no, make it plural
AOS P2 ;Bump stopcode counter
STPCPU: SKIPN T1,SYSNCS ;Any debug stopcodes?
JRST STPDEB ;no, check job stopcodes
AOSE P2 ;Bump stopcode counter
OUTSTR [ASCIZ \, \] ;Yes, a seperator
CALL .TDECW## ;type number in decimal
OUTSTR [ASCIZ \ CPU stopcd\]
CAIE T1,1 ;was it singular?
OUTCHR ["s"] ;no, make it plural
STPDEB: SKIPN T1,SYSNDS ;any debug stopcds?
JRST STPJOB ;no, go to descriptor part
AOSE P2 ;Bump stopcode counter
OUTSTR [ASCIZ \, \] ;Yes, a seperator
CALL .TDECW## ;type number out
OUTSTR [ASCIZ \ DEBUG stopcd\]
CAIE T1,1 ;was it singular?
OUTCHR ["s"] ;no, make it plural
STPJOB: SKIPN T1,SYSNJS ;any job stopcds?
JRST STPDSC ;no, go to descriptor part
AOSE P2 ;Bump stopcode counter
OUTSTR [ASCIZ \, \] ;Yes, a seperator
CALL .TDECW## ;type out
OUTSTR [ASCIZ \ JOB stopcd\]
CAIE T1,1 ;was it singular
OUTCHR ["s"] ;no, make it plural
STPDSC: OUTSTR [ASCIZ \.\] ;terminate line.
CALL .TCRLF##
OUTSTR [ASCIZ \Last stopcd name was \]
SKIPN T1,SYSCD ;stopcode name
HLLZ T1,SYSPC ;If old monitor, might be here.
CALL .TSIXN## ;in sixbit
OUTSTR [ASCIZ \ called from exec PC \]
MOVE P1,SYSPC ;get the pc
TLZ P1,777740 ;blow away flag bits
SUBI P1,1 ;Decrement to point at XCT
CALL PCTYPE ;type it out as a PC
CALL .TCRLF## ;eol
;who did it
SKIPN P1,SYSJN ;job number - was there one?
JRST DEBUGF ;nope, skip over this stuff
OUTSTR [ASCIZ \Job \]
MOVE T1,P1 ;Job numer
CALL .TDECW## ;type job number
MOVE T1,SYSPP ;user PPN
CALL .TPPNW## ;in ppn format
OUTSTR [ASCIZ \ on \]
MOVE T1,SYSTN ;tty name
CALL .TSIXN## ;in sixbit
OUTSTR [ASCIZ \ running \]
MOVE T1,SYSPN ;program name
CALL .TSIXN##
CALL .TCRLF## ;eol
;what called it
OUTSTR [ASCIZ \UUO was \]
MOVE T1,SYSUU ;UUO
CALL .TXWDW## ;Type out as XWD
OUTSTR [ASCIZ \ at user PC \]
MOVE P1,SYSUP ;User pc
CALL PCTYPE ;type it out as a PC
CALL .TCRLF## ;eol
DEBUGF: SKIPN P1,CNFDBG ;Anything in DEBUGF?
JRST DONE ;Nope.
OUTSTR [ASCIZ \Debugging status:\]
CALL .TCRLF## ;put on a seperate line
MOVSI P2,400000 ;Bit 0
MOVE P3,DBGIOD ;iowd for debugf bit names
DEBUG0: TDNN P2,P1 ;Is this bit lit?
JRST DEBUG1 ;no, keep on going
OUTCHR [.CHTAB] ;indent
OUTSTR @(P3) ;type out the funny text
CALL .TCRLF## ;and new line
DEBUG1: ROT P2,-1 ;shift bit around...
AOBJN P3,DEBUG0 ;loop on all the bits
DONE: EXIT 1, ;exit
JRST DONE ;and loop on the toad.
PCTYPE: MOVE T1,P1 ;copy to usefull place
TLNN T1,-1 ;is it a fullword or a half word?
JRST PCTYP1 ;halfword
CALL .TXWDW## ;Fullword
TRNA ;and return
PCTYP1: CALL .TOCTW## ;type PC out in octal
POPJ P, ;and return
END START