*DECK LISTPPM
IDENT LISTPPM
SST
SYSCOM B1
B1=1
COMMENT LISTPPM - LIST PERIPHERAL PROCESSOR MEMORY DUMP.
SPACE 3
*** LISTPPM - LIST PERIPHERAL PROCESSOR MEMORY DUMP
*
* J.C. LEE CDC - SVLOPS 80/04/15
*
* ADAPTED FROM DSDI (EXPRESS DEADSTART DUMP INTERPRETER).
SPACE 3
*** LISTPPM IS A CONTROL CARD CALLABLE UTILITY WHICH
* PRODUCES LISTABLE OUTPUT FROM A PIP - PPU MEMORY DUMP FILE.
* THE PPU MEMORY DUMP FILE ZZZZZPP WAS CREATED BY NIP DURING
* NIP-S REPRIEVE PROCESSING WHEN IT DETECTED THE NPU DRIVER,
* PIP HAD DUMPED ITS MEMORY CONTENTS FOR SUBSEQUENT DEBUGGING.
* THE PPU MEMORY DUMP FILE MUST EXIST AS A LOCAL FILE WHEN
* LISTPPM IS CALLED.
*
* FORMAT OF THE PROGRAM CALL CARD
* -------------------------------
*
* LISTPPM [,P1] [,P2].
*
* WHERE PI IS A KEYWORD EQUATED TO A VALUE, IT CAN BE ONE OF
* THE FOLLOWING:
*
* B = LFNB, LFNB IS THE LOCAL FILE NAME OF THE PIP
* MEMORY DUMP FILE.
* OMITTED, ZZZZZPP IS THE LOCAL FILE NAME OF THE PIP
* MEMORY DUMP FILE.
*
* L = LFNO, OUTPUT IS PLACED ON FILE LFNO.
* OMITTED, OUTPUT IS PLACED ON FILE OUTPUT.
*
SPACE 3
*** DAYFILE MESSAGES ISSUED -
*
* * LISTPPM - INVALID DUMP FILE.*
* * LISTPPM - ARGUMENT ERROR.*
* * LISTPPM COMPLETE.*
*
OPL XTEXT COMCWOD
LIST F
ENTRY LISTPPM
EJECT
* LOCAL SYMBOLS
DBUFL EQU 2001B DUMP FILE BUFFER LENGTH
OBUFL EQU 2001B OUTPUT FILE BUFFER LENGTH
*CALL LPMCOM
* FETS
D BSS 0 DUMP FILE
ZZZZZPP FILEB DBUF,DBUFL,FET=6
O BSS 0 OUTPUT FILE
OUTPUT FILEB OBUF,OBUFL,FET=6
* LOCAL VARIABLES
PPORD DATA 1
NUMAPIP BSSZ 1 NUMBER OF PIP DUMP IN ZZZZZPP
* DUMP FILE HEADER
PDRHDR BSS 0
PDHDR BSSZ PDFHDRL
* OUTPUT FILE HEADER
OHDR BSS 0
DATA 10H1
CON 0
DUP 4,2
DATA 10H-
CON 0
DATA 10H
DATA 10HPIP DUMPS
CON 0
DATA 10H-
CON 0
DATA 10H
DATA 10HDATE -
OHDATE CON 0 DATE OF DUMP TAKEN IN DC
CON 0
DATA 10H0
CON 0
DATA 10H
DATA 10HTIME -
OHTIME CON 0 TIME OF DUMP TAKEN IN DC
CON 0
OHDRL EQU *-OHDR
* PIP DUMP RECORD HEADER
PPHDR DATA 10H1
CON 0
DATA 10H0
CON 0
DUP 5,1
DATA 10H
DATA 10HDUMP OF PI
PIPO DATA 10HP NUMBER N
CON 0
DATA 10H0
CON 0
PPHDRL EQU *-PPHDR
EJECT
* MAIN PROGRAM
LISTPPM BSS 0
SB1 1
RJ PRS PROCESS CONTROL CARD ARGUMENTS
*
REWIND D,R REWIND DUMP FILE
*
READ D,R READ FIRST RECORD OF DUMP FILE
*
READW D,PDHDR,PDFHDRL READ DUMP FILE HEADER
ZR X1,LPM1 JIF NOT EOR/EOF
*
LPM0 BSS 0
SA0 =C* LISTPPM - INVALID DUMP FILE.*
EQ LPM5 TERMINATE OUTPUT
*
LPM1 BSS 0 VALIDATE DUMP FILE HEADER
SA1 PDHDR
MX0 54
BX6 -X0*X1
SA6 NUMAPIP SAVE NUMBER OF PIP DUMP
ZR X6,LPM4 NO PIP ACTIVE IN DUMP FILE
BX1 X0*X1 PUT BLANK INTO X1
SX2 55B
BX1 X1+X2
SA2 PDFHDR
BX3 X1-X2
NZ X3,LPM0 JIF A VALID FILE HEADER
*
SA1 A1+B1 (X1) = DATE OF DUMP IN DC
BX6 X1
SA6 OHDATE
SA1 A1+B1 (X1) = TIME OF DUMP TAKEN IN DC
BX6 X1
SA6 OHTIME
*
WRITEW O,OHDR,OHDRL WRITE OUTPUT FILE HEADER
*
LPM2 BSS 0 PROCESS PIP DUMP RECORD
READW D,PDRHDR,PDRHDRL
NZ X1,LPM0 JIF EOR/EOF REACHED
*
SA1 PDRHDR PIP DUMP RECORD HEADER WORD
LX1 6
MX0 54
BX2 -X0*X1
SX3 X2-PDRID
NZ X3,LPM3 JIF NO PIP DUMP IN CURRENT RECORD
*
SA1 PPORD PIP NUMBER
SX6 X1+33B
SA1 PIPO
BX6 -X0*X6
BX1 X0*X1
BX6 X1+X6
SA6 A1 SET PIP NUMBER IN DUMP RECORD HEADER
WRITEW O,PPHDR,PPHDRL WRITE HEADER TO OUTPUT FILE
*
RJ FPD FORMAT PPU DUMP
*
SA4 NUMAPIP
SX6 X4-1 ONE ACTIVE PIP IS PROCESSED
ZR X6,LPM4 NO MORE TO PROCESS
SA6 X4 STILL SOME PIP TO BE PROCESSED
LPM3 BSS 0
SA1 PPORD ORDINAL OF NEXT PIP
SX6 X1+B1
SA6 A1 UPDATE NEXT PIP NUMBER
SA1 B1+D
SX6 X1
SA6 A1+B1
SA6 A6+B1 FIRST=IN=OUT
*
READ D,R READ NEXT DUMP FILE RECORD
EQ LPM2 CONTINUE
*
LPM4 BSS 0
SA0 =C* LISTPPM COMPLETE.*
LPM5 BSS 0
MESSAGE A0,7,R DAYFILE MESSAGE
WRITER O,R END OUTPUT FILE
ENDRUN
EJECT
** PRS - PROCESS CONTROL CARD ARGUMENTS
*
* ENTRY NONE
*
* EXIT NONE
*
* CALLS LAP, BAP
SPACE 2
PRS BSSZ 1 ENTRY/EXIT
SA1 ACTR
SX7 X1 (X7) = ARGUMENT COUNT
ZR X7,PRS RETURN IF NO ARGUMENTS SPECIFIED
*
SA1 ARGR (X1) = FIRST ARGUMENT
MX0 42
*
PRS1 BSS 0
BX2 X0*X1 (X2) = ARGUMENT KEYWORD
SA3 ARGTAB (A3) = FWA OF ARGUMENT TABLE
*
PRS2 BSS 0 SCAN ARGUMENT TABLE
ZR X3,PRS4 UNKNOWN KEYWORD, DAYFILE ERROR
*
BX4 X0*X3 VALID KEYWORD IN ARGUMENT TABLE
BX5 -X0*X3 ARGUMENT PROCESSOR ADDRESS
SB5 X5
SA3 A3+B1 (X3) = NEXT ENTRY IN ARGUMENT TABLE
BX5 X4-X2
NZ X5,PRS2 CONTINUE TABLE SCAN IF NO MATCH
*
PRS3 JP B5 PROCESS ARGUMENT
*
PRS4 SA0 =C* LISTPPM - ARGUMENT ERROR.*
EQ LPM5 DAYFILE ERROR
*
PRS5 BSS 0
SX7 X7-1 DECREMENT ARGUMENT COUNT
ZR X7,PRS RETURN IF ALL ARGUMENT PROCESSED
*
SA1 A1+B1 PROCESS NEXT ARGUMENT
EQ PRS1
SPACE 3
** ARGUMENT TABLE
SPACE 2
ARGTAB BSS 0
VFD 42/0LB,18/BAP DUMP FILE ARGUMENT
VFD 42/0LL,18/LAP OUTPUT FILE ARGUMENT
CON 0
EJECT
* DUMP FILE ARGUMENT PROCESSOR
SPACE 2
BAP BSS 0
BX2 -X0*X1 (X2) = SEPARATOR
SX2 X2-2
NZ X2,PRS4 ERROR IF NOT AN EQUIVALENCE
*
SX7 X7-1 DECREMENT ARGUMENT COUNT
ZR X7,PRS4 ERROR, MORE ARGUMEN0 SHOULD FOLLOW
*
SA1 A1+B1 SECOND WORD OF ARGUMENT
SA5 D
BX6 X0*X1 ARGUMENT VALUE
BX5 -X0*X5
BX6 X5+X6
SA6 A5 UPDATE PIP DUMP FILE NAME
EQ PRS5
SPACE 4
* OUTPUT FILE ARGUMENT PROCESSOR
SPACE 2
LAP BSS 0
BX2 -X0*X1 (X2) = SEPARATOR
SX2 X2-2
NZ X2,PRS4 ERROR IF NOT AN EQUIVALENCE
*
SX7 X7-1 DECREMENT ARGUMENT COUNT
ZR X7,PRS4 ERROR, MORE ARGUMENT SHOULD FOLLOW
SA1 A1+B1 SECOND WORD OF ARGUMENT
SA5 O
BX6 X0*X1 ARGUMENT VALUE
BX5 -X0*X5
BX6 X5+X6
SA6 A5 UPDATE OUTPUT FILE NAME
EQ PRS5
EJECT
** FPD - FORMAT PPU DUMP.
*
* ENTRY (HDR)= PPU HEADER WORD.
*
* EXIT NONE.
*
* USES B - 2,6,7.
* A - 0,1,3,4,6,7.
* X - ALL.
*
* CALLS WTW=,RDW=,WOD,WTS=,SFN,SOC.
FPD SUBR ENTRY/EXIT
READW D,FPDC,1 START FIRST WORD CONVERSION.
SB6 FPDC+1
SX5 PBUF INITIALIZE PPU MEMORY BUFFER
* STORE PPU MEMORY CONVERTED TO DISPLAY CODE.
* PUT OCTAL DISPLAY IN UPPER 24 BITS, BINARY IN LOW 12 BITS.
FPD1 SA1 B6-B1 CONVERT 5 BYTES
SB2 X5
RJ WOD
SA4 A1 GET ORIGINAL WORD AGAIN
MX0 4*6
BX1 X6
MX3 12
BX6 X0*X6 WORD 1
LX1 4*6
BX5 X3*X4 GET BINARY
LX5 12
IX6 X6+X5
LX4 12
SA6 B2
BX2 X7
BX6 X0*X1 WORD 2
LX1 4*6
BX5 X3*X4 GET BINARY
LX5 12
IX6 X6+X5
LX4 12
SA6 A6+B1
BX7 X3*X1 TOP OF WORD 3
BX6 X3*X2 BOTTOM OF WORD 3
LX2 2*6
LX6 -12
BX7 X7+X6
BX6 X0*X2 WORD 4
BX5 X3*X4 GET BINARY
LX5 12
IX7 X7+X5
LX4 12
SA7 A6+B1
LX2 4*6
BX5 X3*X4 GET BINARY
LX5 12
IX6 X6+X5
LX4 12
SA6 A7+B1
BX7 X0*X2 WORD 5
BX5 X3*X4
LX5 12
IX7 X7+X5
SA7 A6+1
SX5 B2+5 ADVANCE BUFFER ADDRESS
READW D,FPDC,1
ZR X1,FPD1 IF NOT EOR
SA1 STAR
BX7 X1
SB2 A7-DBUF+2
FPD1A SA7 A7+B1
SB2 B2+B1 USE ASTERISK FILL FOR REMAINDER OF BUFFER
NG B2,FPD1A
*
* LIST PPU
*
SA0 B0 PPU BYTE ADDRESS COUNTER
FPD2A BSS 0
SA6 ALIN-1 INITIATE LINE CHAR. STRING POINTER
SB2 B0 HALF LINE AND END OF LINE INDICATOR
SA7 FPDBF-1 INI. BUFFER FOR DISPLAY CODE
SA1 =6L PPU LIST * PPU *
RJ SOC
*
FPD2B BSS 0
SB3 10B HALF LINE PPU BYTE COUNTER
*
SX1 A0
RJ WOD PPU ADDRESS FOR DISPLAY CODE
MX0 4*6
LX7 -4*6
BX1 X0*X7
RJ SOC
SA1 =2L
RJ SOC 2 SPACES
* STRING OUT 8 PPU BYTES.
FPD2C SA1 =1L
RJ SOC 1 SPACE
SA1 A0+PBUF ONE BYTE
MX0 4*6
BX7 -X0*X1 GET BINARY INFO.
BX1 X0*X1 CLEAR BINARY INFO.
SA2 =4L0000
SA7 A7+B1
IX3 X2-X1
NZ X3,FPD2E IF NOT A ZERO BYTE
SA1 =4L----
FPD2E RJ SOC
SB3 B3-B1
SA0 A0+B1
NZ B3,FPD2C IF NOT DONE
SA1 =3L
RJ SOC 3 SPACES
*
NE B2,B0,FPD3 IF A FULL LINE HAS FORMATED
SB2 B1
EQ FPD2B OTHERWISE, BACK FOR THE SECOND HALF
FPD3 SB3 0 INIT. DISPLAY BUFFER INDEX
FPD3B SA1 FPDBF+B3 GET NEXT BYTE
MX0 9*6
BX2 X0*X1
NZ X2,FPD3E IF LEFT CHARACTER PRESENT
SX1 X1+5500B ADD IN BLANK
FPD3E BX2 -X0*X1
NZ X2,FPD3F IF RIGHT CHARACTER PRESENT
SX1 X1+1R ADD IN BLANK
FPD3F LX1 8*6
RJ SOC
SB3 B3+B1
SB2 B3-16
MI B2,FPD3B IF NOT DONE WITH LINE
*
* LIST ONE LINE
*
WRITES O,ALIN,A6-ALIN+1
SB2 A0-7777B
LT B2,B0,FPD2A IF NOT ALL LISTED YET
*
EQ FPDX RETURN
STAR VFD 60/4L****
SPACE 3
FPDC CON 0
BSSZ 1
FPDBF BSSZ 16
EJECT
** SOC - STRING OUT CHARACTERS.
* STOP AT 00 CHARACTER OR END OF WORD.
*
* ENTRY (A6)= ADDRESS OF DESTINATION - 1.
* (X1)= CHARACTERS TO STRING OUT.
*
* EXIT (A6)= LWA OF STRUNG OUT CHARACTERS.
*
* USES B - NONE.
* A - 6.
* X - 1,6,7.
*
* CALLS NONE.
SOC SUBR ENTRY/EXIT
SX7 77B CHARACTER MASK
SOC1 LX1 6 ADVANCE CHARACTER
BX6 X7*X1 EXTRACT CHARACTER
ZR X6,SOCX RETURN - IF END OF STRING
BX1 X1-X6 REMOVE CHARACTER
SA6 A6+B1 STORE CHARACTER
EQ SOC1 LOOP TO END OF STRING
EJECT
* BUFFERS
PBUF BSS 0 PPU BUFFER
DBUF EQU PBUF+4095+5 DUMP FILE BUFFER
OBUF EQU DBUF+DBUFL OUTPUT FILE BUFFER
ALIN EQU OBUF+OBUFL+1 PPU DUMP LINE STRING BUFFER
RFL= EQU ALIN+137 END OF MEMORY USED
ORG RFL=
END LISTPPM