IDENT CPMEM,FETS
ABS
SST LA,FL,DMPL
ENTRY DED
ENTRY DEP
ENTRY DMB
ENTRY DMDECS
ENTRY DMPECS
ENTRY DMD
ENTRY DMM
ENTRY DMP
ENTRY LBC
ENTRY LOC
ENTRY PBC
ENTRY RBR
ENTRY WBR
ENTRY DMP=
ENTRY MFL=
ENTRY SSJ=
*COMMENT CPMEM - CONTROL POINT MEMORY DUMP.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
SYSCOM B1
TITLE CPMEM - CONTROL POINT MEMORY UTILITIES.
SPACE 4
*** CPMEM - CONTROL POINT MEMORY UTILITIES.
* J.C. BOHNHOFF. CPD. 72/12/10.
SPACE 4
*** CPMEM PROVIDES UTILITIES FOR LOADING, DUMPING, AND
* MODIFYING CONTROL POINT MEMORY.
*
* ALL NUMERIC ARGUMENTS SPECIFIED BELOW MAY BE IN EITHER OCTAL
* OR DECIMAL BASE. IF THE LAST CHARACTER OF THE ARGUMENT IS *B*,
* THEN THE NUMBER IS OCTAL - IF *D*, THE NUMBER IS DECIMAL. IF
* NO RADIX IS SPECIFIED, OCTAL IS ASSUMED.
TITLE LOCAL SYMBOLS.
* LOCAL SYMBOLS.
FBUFL EQU 2001B USER FILE BUFFER SIZE
DBUFL EQU 401B SYSTEM DUMP FILE BUFFER SIZE
PBUFL EQU 1301B *SFM* BUFFER LENGTH
MBUFL EQU 1301B MACHINE DUMP BUFFER LENGTH
PWDC EQU 135 PAGE WIDTH (DISPLAY CODE TRANSLATION)
PWNI EQU 130 PAGE WIDTH (NO DISPLAY CODE TRANSLATION)
NOREF .1,.2,.3,.4,.5,.6,.7,.8,.9 SCRATCH SYMBOLS
SPACE 4
* COMMON DECKS.
*CALL COMCMAC
*CALL COMCCMD
QUAL COMSSFM
*CALL COMSSFM
QUAL *
TITLE FET DEFINITIONS AND GLOBAL STORAGE.
* FETS.
ORG 120B
FETS BSS 0
F BSS 0 USER FILE
TAPE1 FILEB FBUF,FBUFL,(FET=8)
D BSS 0 SYSTEM DUMP FILE
DMPFIL RFILEB DBUF,DBUFL
DD EQU *
ORG D
VFD 42/3LDM*,18/3
ORG DD
S BSS 0 *SFM* FET
SFMCALL FILEB PBUF,PBUFL,(FET=6)
M BSS 0 MACHINE DUMP FILE
ZZZZDMM FILEB MBUF,MBUFL,(FET=8)
INFIL CON 0LINPUT+3 INPUT FILE NAME
OUTFIL CON 0LOUTPUT+3 OUTPUT FILE NAME
PNCHFIL CON 0LPUNCHB+3 PUNCH FILE NAME
TAPFIL CON 0LTAPE TAPE FILE NAME
TTYFIL CON 0LZZZDUMP+3 OUTPUT FILE NAME IF TTY
DMBFIL CON 0LZZZZDMB+3 BINARY DUMP FILE
SPACE 4
* GLOBAL STORAGE.
* MAINTAIN THIS ORDER.
P1 CON 0 FIRST OR ONLY ARGUMENT
P2 CON 0 SECOND ARGUMENT
LA CON 0 LINE ADDRESS
DB CON 0 DUMP BUFFER INDEX
DC VFD 6/36B,18/,18/2,18/4 DUMP CONTROL WORD
IND CON BUF2
DI CON 0 DUMP FILE PRU ADDRESS
CC CON 0 CURRENT COMMAND SCAN COLUMN - 1
FL CON 0 CURRENT FIELD LENGTH
AF CON 0 ABORT FLAG ("0 MEANS ABORT)
DF CON 0 DUMP FORMAT ("0 MEANS *WITH DISPLAY*)
DMPFL CON 0 DUMP FILE FL
TICF CON 0 TERMINAL INTERRUPT CONTROL FLAG
BA CON 0 BUFFER ADDRESS (USED BY ECS ROUTINES)
ECSFL CON 0 EXTENDED MEMORY FIELD LENGTH
DUPLIN DATA C* DUPLICATED LINES.*
DUPLINL EQU *-DUPLIN
PD CON 1LS PRINT DENSITY
PL CON 0 PAGE LENGTH
PW CON 0 PAGE WIDTH
UESC VFD 1/1,59/0 USER EM SHIFT COUNT
SPACE 4
* DUMP HEADER.
VERF CON VERS FWA OF DUMP HEADER
VERL CON LHDR-VERS LENGTH OF HEADER
VERS CON 10H1VERSION=
VERW CON 0
CON 0
DATE CON 10H YY/MM/DD.
TIME CON 10H HH.MM.SS.
VERE EQU *
CON 0 LINE TERMINATOR
LFMT CON 2LR PRINTER AUTO EJECT
BLNK CON 10H
CON 0
LHDR EQU *
SPACE 4,10
* MACHINE MEMORY RECORD HEADERS.
MMFH VFD 42/0LM00,18/0 FILE HEADER
MMDN VFD 12/0L00,48/1H DUMP NUMBER
MMCM VFD 42/3LCM ,18/0 MEMORY RECORD HEADER
CON 0,0,0
MMCML EQU *-MMCM
SPACE 4
* ERROR MESSAGES.
ADRERR DATA C* FWA .GE. LWA+1.*
ARGERR DATA C* ARGUMENT ERROR.*
CALERR DATA C* JOB NOT SYSTEM ORIGIN.*
RNGERR DATA C* FWA/LWA .GE. FL.*
EORERR DATA C+ DM* TOO SHORT.+
ECSERR DATA C* EXTENDED MEMORY READ ERROR.*
DMB TITLE DMB - DUMP IN BINARY FORMAT.
*** DMB(P1,P2)
* DUMP EXCHANGE PACKAGE, CM, AND EXTENDED MEMORY IN BINARY.
*
* CALL OPTIONS-
* DMB.
* DUMP EXCHANGE PACKAGE AND CM IN BINARY.
*
* DMB(P1)
* SAME AS *DMB* EXCEPT P1 IS PLACED IN THE DUMP RECORD NAME
* IN CHARACTER POSITIONS 2 THROUGH 7. P1 IS AN OCTAL
* NUMBER IN THE RANGE 0 - 777777B.
*
* DMB(P1,P2)
* P1 IS USED IN THE SAME WAY AS DESCRIBED ABOVE. A NON-ZERO
* VALUE FOR P2 WILL CAUSE ASSIGNED EXTENDED MEMORY TO BE DUMPED.
*
* IF P1 IS GREATER THAN 377777B, AN ABORT WILL BE DONE AT
* DUMP COMPLETION.
* IF EITHER P1 OR P2 IS NOT NUMERIC OR OUT OF RANGE, THE
* MESSAGE *ARGUMENT ERROR* WILL BE ISSUED TO THE DAYFILE
* AND AN ABORT WILL BE FORCED.
*
* THE DUMP FILE WILL BE NAMED *ZZZZDMB* AND IT WILL NOT BE
* REWOUND BEFORE OR AFTER THE DUMP. IF THE FILE IS
* ASSIGNED TO DEVICE *TT*, IT WILL BE RETURNED
* BEFORE THE DUMP AND A MASS STORAGE FILE
* WILL BE CREATED.
*
* BINARY DUMP FILE FORMAT-
* EACH DUMP CREATES ONE LOGICAL RECORD ON *ZZZZDMB*.
*
* PREFIX TABLE
*
*T W0 12/ 7700,12/ 0016,36/ 0
*T,W1 42/ *DNNNNNN*,18/ 0
*T,W2 60/ * YY/MM/DD.*
*T,W3 60/ * HH.MM.SS.*
*T,W4 60/ (PGNR) BLANK FILLED
*T,W5 60/ 0
*T,W6-7 60/ 0
*T,W10 60/ (PGNR) BLANK FILLED
*T,W11-16 60/ (CCDR) - (CCDR)+5
*
* DUMP TEXT HEADER.
*
*T 42/ *DNNNNNN*,18/ 0
*
*T 42/ *ID*,18/ 5
*T, W1 60/ VERSION
*T, W2 60/ VERSION
*T, W3 60/ * YY/MM/DD.*
*T, W4 60/ * HH.MM.SS.*
*T, W5 60/ MACHINE CHARACTERISTICS
*
*T 42/ *XP*,18/ 32B
*T, W1-20 60/ EXCHANGE PACKAGE
*T, W21 60/ ((A0 REGISTER))
*T, 60/ ...
*T, 60/ ...
*T, W30 60/ ((A7 REGISTER))
*T, W31 60/ (RA)
*T, W32 60/ (RA+1)
*
*T 42/ *CM*,18/ CMFL/100B
*T, W1-N 60/ CM WORDS
*
*T 42/ *ECS*,18/ ECFL/1000B
*T, W1-N 60/ EXTENDED MEMORY WORDS
*
*T 42/ *END*,18/ 0
*
* IF AN ECS ERROR OCCURS, THE BLOCK IN ERROR WILL BE FILLED
* WITH WORDS IN THE FOLLOWING FORMAT-
*
*T 48/ *ECSERROR*,12/ NNNN
* WHERE NNNN IS THE WORD NUMBER IN THE BLOCK (STARTING WITH 1).
DMB BSS 0 ENTRY
SB1 1
SB2 1 SET EXCHANGE OPTION
SB3 DMBC SET EXCHANGE ADDRESS
RJ SDC DISABLE TERMINAL CONTROL
RJ SHI SET HEADER INFORMATION
RJ SUE SET USER EM SHIFT
RJ ARG PROCESS ARGUMENTS
SA1 PGNR
ZR X1,DMB2 IF *SFP* CALL
ZR B7,DMB2 IF NO ARGUMENTS
SA5 P1 CONVERT FIRST ARGUMENT
ZR X5,DMB1 IF ABSENT
SB7 0
RJ DXB
SX2 ARGERR
NZ X4,ERR IF CONVERSION ERROR
MX1 42
BX1 X1*X6
NZ X1,ERR IF OUT OF RANGE
SA6 P1
DMB1 SA5 P2 CONVERT SECOND ARGUMENT
ZR X5,DMB2 IF ABSENT
SB7 0
RJ DXB
SX2 ARGERR
NZ X4,ERR IF CONVERSION ERROR
SA6 P2
DMB2 SA1 P1
MX2 -17
BX6 X2*X1 SET ABORT FLAG
SA6 AF
* PREPARE REMAINDER OF HEADER.
RJ WOD GENERATE RECORD NAME
MX2 -6*6
SA1 BHDW
BX2 -X2*X7
LX2 53-35
BX7 X1+X2
SA7 BHDW
GETMC DMBB
* PREPARE FET FOR DUMP FILE AND WRITE HEADER.
SA1 DMBFIL
SX2 F
BX6 X1
SA6 X2
RJ STF CHECK FOR *TT* FILE ASSIGNMENT
NZ X6,DMB3 IF NOT *TT* ASSIGNMENT
RETURN X2,R
DMB3 RJ WPT WRITE PREFIX TABLE
WRITEW X2,BHDW,BIDWE-BHDW
WRITEW X2,VERW,VERE-VERW
WRITEW X2,DMBB,B1
* DUMP EXCHANGE PACKAGE.
RJ PEP PREPARE EXCHANGE PACKAGE
WRITEW F,BXPW,B1 WRITE HEADER
WRITEW X2,EPB,32B WRITE PACKAGE DATA
* DUMP CM.
SA1 BCMW SET CM FL/100B IN HEADER
SX6 A0
AX6 6
BX7 X1+X6
SA7 A1
WRITEW F,BCMW,B1 WRITE CM DUMP HEADER
SX0 A0 DUMP LWA
BX5 X5-X5 DUMP FWA
ZR X0,DMB5 IF NO CM FL
RECALL D
SA2 D+1
RJ EBF EMPTY BUFFER
SX6 3 SET PRU OF FWA OF CM
SA6 D+6
READ D
DMB4 READW D,BUF,100B
NZ X1,DMB12 IF EOR
WRITEW F,BUF,100B
SX5 X5+100B
IX1 X0-X5
ZR X1,DMB5 IF END OF CM DUMP
SX1 X5-DMPL
NG X1,DMB4 IF NOT IN MEMORY
* DUMP FROM MEMORY.
IX2 X0-X5 REMAINING WORDS TO DUMP
SB7 X2-10B
NG B7,DMP5 IF END OF CM DUMP
WRITEW F,DMPL,B7
SX1 A0-10B-10B MOVE LAST WORDS TO *BUF*
SB6 BUF
SB7 10B
RJ RMW
WRITEW F,BUF,10B
* DUMP ECS.
DMB5 SA1 P2
ZR X1,DMB9 IF NO EXTENDED MEMORY DUMP WANTED
RECALL D
SA2 D+1 EMPTY BUFFER
RJ EBF
SX6 B1 READ FIRST PRU
SA6 D+6
RPHR D,R
SA1 DBUF+ECSW GET EXTENDED MEMORY FL
MX0 -12
BX6 -X0*X1
SA4 UESC USER EM SHIFT COUNT
SB4 X4+9
LX6 B4
SA6 ECSFL
ZR X6,DMB9 IF NO EXTENDED MEMORY
* WRITE EXTENDED MEMORY DUMP HEADER.
SA1 BEMW PLACE EXTENDED MEMORY FL/1000B IN HEADER
AX6 9
BX6 X1+X6
SA6 A1+
WRITEW F,BEMW,B1
* DUMP ECS.
SA0 DBUF SET CM ADDRESS
BX0 X0-X0 SET EXTENDED MEMORY FWA
SX5 B0
DMB6 SA1 ECSFL GET EXTENDED MEMORY LWA
ERRNG DBUFL-400B
SB3 400B
IX2 X1-X0 CURRENT FWA-LWA
SX4 B3+
IX4 X2-X4
ZR X2,DMB9 IF NO WORDS REMAINING
PL X4,DMB7 IF 400B WORDS REMAIN
SX5 B1 SET END OF DUMP FLAG
SB3 X2
DMB7 RE B3 READ ECS
- EQ DMB10 IF READ ERROR
DMB8 SX1 B3 ADVANCE FWA
IX0 X0+X1
WRITEW F,A0,B3
ZR X5,DMB6 IF NOT END OF DUMP
DMB9 WRITEW F,BENW,B1 TERMINATE DUMP FILE
WRITER X2,R
SA1 AF
ZR X1,END IF NO ABORT
SX2 ECSERR
NG X1,ERR IF EXTENDED MEMORY READ ERROR
ABORT
* PROCESS EXTENDED MEMORY READ ERROR.
DMB10 SA1 DMBA
SB2 B0
SX2 B1
SA3 AF SET EXTENDED MEMORY READ ERROR FLAG
MX7 1
BX7 X7+X3
SA7 AF
DMB11 BX7 X1+X2
SA7 A0+B2
SB2 B2+B1
SX2 X2+B1
LT B2,B3,DMB11 IF NOT END OF BUFFER
EQ DMB8 WRITE BUFFER
* PROCESS EOR ON DM* FILE.
DMB12 SX2 EORERR
EQ ERR TERMINATE DUMP
* EXTENDED MEMORY READ ERROR FLAG WORD.
DMBA VFD 48/8HECSERROR,12/0
* MACHINE CHARACTERISTICS.
DMBB CON 0
* PROCESS TERMINAL INTERRUPT.
DMBC BSS 20B EXCHANGE PACKAGE
EQ END TERMINATE PROGRAM
* FILE FORMAT HEADER WORDS.
BHDW VFD 42/0LD,18/0
BIDW VFD 42/0LID,18/5
BIDWE EQU *
BXPW VFD 42/0LXP,18/32B
BCMW VFD 42/0LCM,18/0
BEMW VFD 42/0LECS,18/0
BENW VFD 42/0LEND,18/0
DMXECS TITLE DMPECS/DMDECS - DUMP ECS WITH/WITHOUT DISPLAY.
*** DMDECS(FWA,LWA)
* DMPECS(FWA,LWA,F,LFN)
* DUMP EXTENDED CORE STORAGE (ECS) WITH DISPLAY.
*
* DMPECS(FWA,LWA)
* DUMP ECS.
*
*
* CALL OPTIONS -
*
* DMPECS(LWA) OR DMDECS(LWA).
* DUMP EXTENDED MEMORY FROM 0 TO LWA.
*
* DMPECS(FWA,LWA) OR DMDECS(FWA,LWA).
* DUMP EXTENDED MEMORY FROM FWA TO LWA.
*
* DMPECS(FWA,LWA,F,LFN).
* DUMP ECS FROM FWA TO LWA ON FILE LFN WITH PRINT FORMAT F.
* THE PRINT FORMAT PARAMETER IS IGNORED.
*
*
* NOTE - IN ALL CASES ABOVE THE *DMDECS* CALLS AND THE FOUR
* PARAMETER *DMPECS* CALL WILL INCLUDE THE DISPLAY
* REPRESENTATION OF EXTENDED MEMORY WORDS.
*
*
* THE DUMP WILL END AT FLE IF LWA IS .GT. FLE.
*
* IF FWA IS .GE. FLE, FWA IS SET TO FLE-10B.
*
* A DUMP TO A TERMINAL OUTPUT FILE WILL BE IN 72 COLUMN FORMAT.
*
* DAYFILE MESSAGES -
*
* *ARGUMENT ERROR.*
* BAD ADDRESS SPECIFIED.
* *ECS READ ERROR.*
* AN UNRECOVERABLE EXTENDED MEMORY READ ERROR OCCURED.
* *FWA .GE. LWA+1.*
* THE FIRST DUMP ADDRESS IS .GT. THE FINAL ADDRESS.
* *INCORRECT REQUEST.*
* NO ADDRESS GIVEN ON COMMAND.
* *NO EXTENDED MEMORY.*
* NO EXTENDED MEMORY FIELD LENGTH EXISTS.
*
* OUTPUT FILE MESSAGES -
*
* * EXCHANGE PACKAGE/MEMORY DUMP ON FILE ZZZDUMP.*
* INDICATES FILE *OUTPUT* IS ASSIGNED
* TO THE TERMINAL AND THAT THE DUMP
* WAS PRINTED ON FILE *ZZZDUMP*.
DMPECS BSS 0
SA1 ACTR CHECK FOR 4 PARAMETERS
SB6 X1-4
NZ B6,DEP IF NOT SPECIAL FORMAT
SA1 ARGR+3 SET OUTPUT FILE NAME
MX0 42
BX6 X0*X1
SX7 3
BX6 X6+X7
SA6 OUTFIL
DMDECS BSS 0
DED BSS 0
SX6 1 SET DISPLAY CODE INDICATOR
SA6 DF
DEP BSS 0
SB1 1
SB2 1 SET *DISTC* EXCHANGE OPTION
SB3 DMPG SET EXCHANGE ADDRESS
RJ SDC SET DISABLE TERMINAL CONTROL
RJ SHI SET HEADER INFORMATION
RJ SUE SET USER EM SHIFT
SA1 ACTR
ZR X1,DEP2 IF NOT A COMMAND
SB6 X1
MX0 42
SA1 ARGR FIRST ARGUMENT
SX2 DEPB * INCORRECT REQUEST.*
ZR B6,ERR IF NO LWA GIVEN
EQ B6,B1,DEP1 IF ONLY 1 ARGUMENT - IMPLIES FWA = 0
SB7 B0
BX5 X0*X1
RJ DXB CONVERT DISPLAY TO OCTAL
SX2 ARGERR * ARGUMENT ERROR.*
NZ X4,ERR IF BAD ADDRESS GIVEN
SA6 P1 FWA IN OCTAL
MX0 42
SA1 A1+B1 SECOND PARAMETER
DEP1 BX5 X0*X1
SB7 B0
RJ DXB CONVERT DISPLAY TO OCTAL
SX2 ARGERR * ARGUMENT ERROR.*
NZ X4,ERR IF BAD ADDRESS GIVEN
SA6 P2 LWA IN OCTAL
EQ DEP3 GET EXTENDED MEMORY FL
* PROCESS SYSTEM REQUEST CALL.
DEP2 MX0 -24 FWA / LWA
SA1 SPPR+1
BX6 -X0*X1 SAVE LWA
AX1 24
SA6 P2
BX7 -X0*X1 SAVE FWA
SA1 SPPR CLEAR STATUS BYTE
MX0 48
LX0 24
SA7 P1
BX7 X0*X1
SA7 A1
* ENTRY FROM THE COMMAND.
DEP3 SX7 B1
SA1 P1 FWA
IX6 X6+X7 LWA+1
SX2 ADRERR * FWA .GE. LWA+1.*
IX6 X1-X6
PL X6,ERR IF FWA .GE. LWA+1
SA7 D+6 READ FIRST PRU
RPHR D,R
SA1 DBUF+ECSW GET EXTENDED MEMORY FL
MX0 -12
SX2 DEPC * NO EXTENDED MEMORY.*
BX1 -X0*X1
BX6 X1 SET EXTENDED MEMORY FL
ZR X1,ERR IF NO EXTENDED MEMORY FIELD LENGTH
SA3 DEPA NEW FIRST HEADER LINE
SA4 UESC USER EM SHIFT COUNT
SB4 X4+9
LX6 B4
BX7 X3
SA6 ECSFL
SA7 SHLA
RJ COF CHECK FILE ASSIGNMENT
* DUMP ECS.
RJ DEC DUMP ECS
WRITER F,R WRITE END OF RECORD ON OUTPUT FILE
EQ END END DUMP
DEPA DATA 10H EM DUMP
DEPB DATA C* INCORRECT REQUEST.*
DEPC DATA C* NO EXTENDED MEMORY.*
DMX TITLE DMP/DMD - DUMP CM WITH/WITHOUT DISPLAY.
*** DMD(FWA,LWA)
* DUMP CENTRAL MEMORY WITH DISPLAY.
*
* DMP(FWA,LWA)
* DUMP CENTRAL MEMORY.
*
*
* CALL OPTIONS -
*
* DMD. OR DMP.
* DUMP THE EXCHANGE PACKAGE AND CM FROM P-40B TO P+40B.
*
* DMD,LWA. OR DMP,LWA.
* DUMP CENTRAL MEMORY FROM 0 TO LWA.
*
* DMD,FWA,LWA. OR DMP,FWA,LWA.
* DUMP CENTRAL MEMORY FROM FWA TO LWA.
*
*
* NOTE - IN ALL CASES ABOVE THE *DMD* CALLS WILL INCLUDE
* THE DISPLAY REPRESENTATION OF CENTRAL MEMORY WORDS.
*
*
* DUMPING WILL ALWAYS STOP AT FL IF LWA IS .GT. FL.
*
* IF FWA IS .GE. FL, FWA IS SET TO FL-10B.
*
* IF FWA .GE. 400000B, FWA IS SET TO FWA - 400000B
* AND AN ABORT IS FORCED AFTER THE DUMP IS COMPLETE.
*
* IF EITHER FWA OR LWA IS NON-NUMERIC, THE REQUEST
* IS INTERPRETED AS *DMD.* OR *DMP.*.
*
* IF A JOB HAS A TIME-SHARING ORIGIN, THE DUMP IS
* FORMATTED FOR A 72-COLUMN TERMINAL PRINTER.
*
* DAYFILE MESSAGES -
*
* * FWA .GE. LWA+1.*
* IF FIRST DUMP ADDRESS IS > THE TERMINAL ADDRESS.
*
* OUTPUT FILE MESSAGES -
*
* * EXCHANGE PACKAGE/MEMORY DUMP ON FILE ZZZDUMP.*
* INDICATES FILE *OUTPUT* IS ASSIGNED
* TO THE TERMINAL AND THAT THE DUMP
* WAS PRINTED ON FILE *ZZZDUMP*.
DMD BSS 0 ENTRY
SX6 1 SET DISPLAY REPRESENTATION FORMAT
SA6 DF
DMP BSS 0
SB1 1
SB2 1 SET *DISTC* EXCHANGE OPTION
SB3 DMPG SET EXCHANGE ADDRESS
RJ SDC SET DISABLE TERMINAL CONTROL
RJ SHI SET HEADER INFORMATION
RJ ARG PROCESS ARGUMENTS
* CHECK ARGUMENTS.
SA1 PGNR CHECK THE COMMAND
ZR X1,DMP3 IF *SFP* CALL
NE B7,B1,DMP1 IF NOT ONLY 1 ARGUMENT
SA1 P1 SET ARGUMENT 1 AS LWA
BX6 X6-X6
LX7 X1
SA6 A1
SA7 A1+B1
DMP1 SA5 P1 CONVERT FWA
ZR X5,DMP2 IF ABSENT
SB7 0
RJ DXB
SX0 377777B EXTRACT ABORT FLAG
BX7 -X0*X6
BX6 X0*X6 CLEAN FWA
SA7 AF
SA6 A5+ STORE FWA
ZR X4,DMP2 IF NO ADDRESS ERROR
SX6 0 SET EXCHANGE PACKAGE DUMP
SA6 P1
SA6 P2
SA6 AF CLEAR ABORT FLAG
JP DMP5 DUMP
DMP2 SA5 P2 CONVERT LWA
ZR X5,DMP3 IF ABSENT
SB7 0
RJ DXB
SA6 P2
ZR X4,DMP3 IF NO ADDRESS ERROR
SX6 0 SET EXCHANGE PACKAGE DUMP
SA6 P1
SA6 P2
JP DMP5 DUMP
* CHECK DUMP LIMITS.
DMP3 SA1 P1
SA3 P2
IX6 X3-X1
SX4 A0
IX7 X3-X4 LWA-FL
IX5 X1-X4 FWA-FL
NG X5,DMP4 IF FWA < FL
SX0 A0+ CHECK FOR NO FL
ZR X0,DMP4 IF NO FL
SX6 A0-10B SET FWA=FL-10B
SA6 P1
BX1 X6
IX6 X3-X1
DMP4 SX2 ADRERR * FWA .GE. LWA+1.*
NG X6,ERR IF FWA > LWA
NG X7,DMP5 IF LWA .LE. FL
SX6 A0 SET LWA = FL
SA6 A3
DMP5 SX5 B0
RJ COF CHECK FILE ASSIGNMENT
* DUMP.
DMP6 SA2 P1 CHECK EXCHANGE PACKAGE DUMP
SA3 P2
BX7 X2+X3
NZ X7,DMP7 IF NOT EXCHANGE PACKAGE
RJ DXP DUMP EXCHANGE PACKAGE
SX6 BLNK SET SO VERSION WILL NOT PRINT
SA6 VERF
SX6 LHDR-BLNK
SA6 VERL
DMP7 RJ DCM DUMP CENTRAL MEMORY
WRITER F,R TERMINATE LIST RECORD
* CHECK POST-DUMP ABORT REQUESTED.
SA1 AF
ZR X1,END IF NO ABORT
ABORT
* PROCESS TERMINAL INTERRUPT.
DMPG BSS 20B EXCHANGE ADDRESS BEGINS EXCHANGE PACKAGE
BX6 X6-X6 CLEAR FET ADDRESS AND FET
SA6 B1+B1
SA6 F
EQ END TERMINATE PROGRAM
DMM TITLE DMM - DUMP MACHINE MEMORY.
*** DMM,N.
* DUMP MACHINE MEMORY IN *DSDI* FORMAT.
*
* N = DUMP NUMBER IN OCTAL. DEFAULT = 0.
* N MUST BE IN THE RANGE 0 - 77B. THE VALUE
* OF N IS CONVERTED TO DISPLAY CODE AND PLACED
* IN DUMP HEADER ONE.
*
* THE DUMP FILE WILL BE NAMED ZZZZDMM AND WILL NOT
* BE REWOUND BEFORE OR AFTER THE DUMP. IF THE FILE
* IS ASSIGNED TO DEVICE *TT*, IT WILL BE RETURNED
* BEFORE THE DUMP AND A MASS STORAGE FILE WILL
* BE CREATED.
*
* MACHINE MEMORY DUMP FILE FORMAT.
* EACH DUMP WILL BE ONE LOGICAL FILE ON ZZZZDMM.
*
* DUMP HEADER ONE.
*
*T 18/ *MNN*,42/ 0
*T, 60/ * YY/MM/DD.*
*T, 60/ * HH.MM.SS.*
*T, 12/ *NN*,48/ (BLANKS)
* -EOR-
*
* DUMP HEADER TWO.
*
*T 18/ *CM *,42/ MEMORY SIZE/1000B
*T, 60/ 0
*T, 60/ 0
*T, 60/ 0
* -EOR-
*T 60/ CONTENT OF MACHINE MEMORY
*T, 60/ ...
* -EOR-
* -EOF-
DMM BSS 0 ENTRY
SB1 1
SB2 1 SET EXCHANGE OPTION
SB3 DMMA SET EXCHANGE ADDRESS
RJ SDC DISABLE TERMINAL CONTROL
RJ SHI SET HEADER INFORMATION
SA1 JOPR
SX2 CALERR
AX1 24
SX1 X1-SYOT
NZ X1,ERR IF NOT SYSTEM ORIGIN
RJ ARG PROCESS ARGUMENTS
SA1 PGNR
ZR X1,DMM1 IF *SFP* CALL
ZR B7,DMM1 IF NO ARGUMENTS
SA5 P1 CONVERT ARGUMENT
ZR X5,DMM1 IF ABSENT
SB7 0
RJ DXB
SX2 ARGERR
NZ X4,ERR IF CONVERSION ERROR
SX1 X6-100B
PL X1,ERR IF OUT OF RANGE
SA6 P1
DMM1 SA1 P1 GENERATE DUMP HEADER
RJ WOD
SX2 1RM*10000B
MX3 -12
BX6 -X3*X7
BX7 X2+X6
LX7 59-17
SA7 MMFH
MX3 -48
SA2 MMDN
LX6 59-11
BX2 -X3*X2
BX6 X6+X2
SA6 A2+
SX2 M
RJ STF CHECK FILE ASSIGNMENT
NZ X6,DMM2 IF NOT *TT*
RETURN X2,R
DMM2 WRITEW X2,MMFH,B1 WRITE FILE HEADER ONE
WRITEW X2,DATE,2
WRITEW X2,MMDN,B1
WRITER X2
* GET MEMORY SIZE.
SX2 S CALL *SFM*
SX7 /COMSSFM/MDFF
RJ SFM READ NEXT BLOCK
SA1 S+5
MX3 -21
LX1 24-3 CONVERT CM/100 TO CM/1000
BX6 -X3*X1
SA2 MMCM
BX7 X2+X6
SA7 A2
* WRITE FILE HEADER TWO.
RECALL M
WRITEW X2,MMCM,MMCML
WRITER X2,R
SX2 S
EQ DMM4 DUMP FIRST BLOCK
* DUMP MEMORY BLOCKS.
DMM3 SX2 S
SA1 X2+B1 RESET IN = OUT = FIRST
SX6 X1
SA6 A1+B1
SX7 /COMSSFM/MDFF
SA6 A6+B1
RJ SFM
DMM4 SA1 X2+2 IN
SA3 A1+B1 OUT
IX0 X1-X3
ZR X0,DMM5 IF END OF DUMP
WRITEW M,X3,X0
AX0 6
SA1 S+5 INCREMENT FWA
MX3 24
IX6 X1+X0
BX4 X1*X3
LX4 24 LIMIT VALUE
SA6 A1 CURRENT FWA
MX3 -24
BX6 -X3*X6
IX6 X6-X4
NG X6,DMM3 IF NOT END OF DUMP
DMM5 WRITEF M
EQ END TERMINATE DUMP
* PROCESS INTERRUPT.
DMMA BSS 20B EXCHANGE PACKAGE
EQ END TERMINATE DUMP
LBC TITLE LBC - LOAD BINARY DATA.
*** LBC,A.
*
* LOAD THE NEXT RECORD FROM FILE *INPUT* TO MEMORY STARTING AT
* LOCATION A. IF A IS ABSENT, LOAD STARTING AT 0.
*
* DAYFILE MESSAGES -
*
* * ARGUMENT ERROR.*
* LOAD ADDRESS IS NOT NUMERIC.
* * FWA/LWA .GE. FL.*
* LOAD ADDRESS IS \ FIELD LENGTH.
* *RECORD TOO LONG.*
* THE RECORD IS TOO LONG TO FIT IN MEMORY. MEMORY IS
* FILLED AND THE EXCESS DATA ON THE RECORD IS SKIPPED.
*E
LBC BSS 0 ENTRY
SB1 1
SB2 0 SET *DISTC* FLAG OPTION
RJ SDC SET DISABLE TERMINAL CONTROL
RJ ARG PROCESS ARGUMENT
SA5 P1 CONVERT FWA
ZR X5,LBC1 IF NOT SPECIFIED
SB7 0
RJ DXB
SX2 ARGERR * ARGUMENT ERROR.*
NZ X4,ERR IF ADDRESS ERROR
SX5 X6+
LBC1 SX6 A0 CHECK FWA \ FL
IX7 X5-X6
SX2 RNGERR * FWA/LWA .GE. FL.*
PL X7,ERR IF ERROR
SA1 INFIL INPUT FILE NAME
SX0 X5 SET LOAD ADDRESS
BX6 X1
SA6 F
READ F INITIATE READ
RJ LDF LOAD FILE
JP END TERMINATE PROGRAM
LOC TITLE LOC - LOAD OCTAL CORRECTIONS.
*** LOC,N,M.
*
* LOAD OCTAL CORRECTIONS INTO MEMORY AS SPECIFIED ON THE NEXT
* RECORD ON FILE *INPUT*.
*
* CALL OPTIONS -
*
* LOC,N,M.
*
* LOC,M.
*
* LOC.
*
* IF N AND M ARE PRESENT AND NOT BOTH ZERO, CLEAR (ZERO)
* STORAGE FROM LOCATION N TO LOCATION M BEFORE LOADING
* CORRECTIONS. IF JUST M IS SPECIFIED CLEAR STORAGE FROM
* LOCATION 0 TO LOCATION M BEFORE LOADING CORRECTIONS.
*
* ONE CORRECTION WORD IS SPECIFIED ON EACH INPUT LINE AS -
*
* ADDRESS DATA
*
* ADDRESS SPECIFIES THE LOCATION TO BE CORRECTED AND DATA
* SPECIFIES THE DATA TO BE PLACED INTO THIS LOCATION. THE
* ADDRESS FIELD IS SEPERATED FROM THE DATA FIELD BY A NON-OCTAL
* CHARACTER OR 6 DIGITS OF ADDRESS. THE DATA FIELD IS TERMINATED
* BY A NON-BLANK, NON-OCTAL CHARACTER OR 20 DIGITS. BOTH FIELDS
* MAY START IN ANY COLUMN AS LONG AS THE ADDRESS PRECEDES
* THE DATA.
*
* DAYFILE MESSAGES -
*
* * ARGUMENT ERROR.*
* AN ARGUMENT IS NOT NUMERIC.
* * FWA .GE. LWA+1.*
* N .GE. LWA+1.
* * FWA/LWA .GE. FL.*
* M .GE. FL.
* *ADDRESS OUT OF RANGE, AAAAAA*
* THE ADDRESS AAAAAA ON A CORRECTION CARD IS \ FL. THE
* CARD IS IGNORED AND LOC CONTINUES.
*E
LOC BSS 0 ENTRY
SB1 1
SB2 0 SET *DISTC* FLAG OPTION
RJ SDC SET DISABLE TERMINAL CONTROL
RJ ARG PROCESS ARGUMENTS
* CHECK ARGUMENTS.
SA5 P1 CONVERT FWA
ZR X5,LOC1 IF FWA ABSENT
SB7 0
RJ DXB
SX2 ARGERR * ARGUMENT ERROR.*
NZ X4,ERR IF ADDRESS ERROR
SA6 P1
LOC1 SA5 P2 CONVERT LWA
ZR X5,LOC2 IF LWA ABSENT
SB7 0
RJ DXB
SX2 ARGERR * ARGUMENT ERROR.*
NZ X4,ERR IF ADDRESS ERROR
SA6 P2
EQ LOC3 CHECK PARAMETER VALIDITY
LOC2 SA3 P1 SET LWA = P1, FWA = 0
MX6 0
SA6 A3
SX6 X3+
SA6 P2
LOC3 SA5 P1 CHECK ARGUMENTS
SA3 P2
SA2 INFIL INPUT FILE NAME
SX4 A0
IX7 X3-X5
BX6 X2
SX2 ADRERR * FWA .GE. LWA+1.*
BX1 X5-X3
SA6 F
NG X7,ERR IF FWA > LWA
IX7 X3-X4
BX1 X1+X5
SX2 RNGERR * FWA/LWA .GE. FL.*
PL X7,ERR IF LWA > FL
ZR X1,LOC5 IF FWA = LWA = 0
* CLEAR MEMORY.
LOC4 SX6 0 ZERO WORDS
RJ LDW
SA1 P2
SX5 X5+B1 ADVANCE LOAD ADDRESS
IX6 X1-X5
PL X6,LOC4 IF NOT DONE CLEARING MEMORY
READ F START READ OF CORRECTION FILE
* LOAD CORRECTION DATA.
LOC5 RJ RNC READ NEXT CORRECTION
NZ X1,LOC6 IF EOR
RJ ACA ASSEMBLE CORRECTION ADDRESS
SX6 A0
IX7 X5-X6 CHECK ADDRESS
PL X7,LOC7 IF ADDRESS .GE. FL
RJ ACD ASSEMBLE CORRECTION DATA
RJ LDW LOAD WORD
JP LOC5 LOOP TO EOR
* EMPTY DUMP PRU BUFFER.
LOC6 SA5 DI CHECK PRU BUFFER ACTIVE
ZR X5,END IF NOT ACTIVE
RECALL D
BX6 X5 REWRITE PRU
SX7 B0 INDICATE BUFFER INACTIVE
SA6 D+6
SA7 A5
WRITEW D,PBF,100B
REWRITE D
JP END TERMINATE PROGRAM
* ISSUE DIAGNOSTIC MESSAGE TO DAYFILE.
LOC7 BX1 X5 CONVERT ADDRESS
RJ COD
SA1 LOCB
LX6 6*2
BX7 X1-X6
SA7 LOCA+1
MESSAGE LOCA,3,R
JP LOC5 CONTINUE
LOCA DATA 20H ADDRESS OUT OF RANG
BSSZ 2
LOCB VFD 12/2LE,&2L ,36/0,12/2R
PBC TITLE PBC - PUNCH BINARY CARDS.
*** PBC,FWA,LWA.
*
* CALL OPTIONS -
*
* PBC,FWA,LWA.
*
* PBC,LWA.
*
* PBC.
* WRITE ONE RECORD FROM MEMORY TO THE FILE *PUNCHB* AS SPECIFIED
* BY FIRST WORD ADDRESS FWA AND LAST WORD ADDRESS LWA.
* IF JUST LWA IS SPECIFIED THEN FWA IS SET TO 0. IF BOTH
* ARGUMENTS ARE ABSENT OR ZERO, THEN FWA IS TAKEN TO BE 0 AND
* LWA IS FOUND IN BITS 0-17 OF LOCATION 0. IF BITS 48-59
* LOCATION 0 CONTAIN 7700, THEN THIS IS ASSUMED TO BE THE FIRST
* WORD OF A 77 TABLE AND THE RECORD LENGTH IS DERIVED FROM BITS
* 0-17 OF THE WORD FOLLOWING THIS TABLE.
*
* DAYFILE MESSAGES -
*
* * ARGUMENT ERROR.*
* AN ARGUMENT IS NON-NUMERIC.
* * FWA .GE. LWA+1.*
* THE FIRST WRITE ADDRESS IS > THE TERMINAL ADDRESS.
* * FWA/LWA .GE. FL.*
* LWA \ FL.
*E
PBC BSS 0 ENTRY
SB1 1
SB2 0 SET *DISTC* FLAG OPTION
RJ SDC SET DISABLE TERMINAL CONTROL
RJ ARG PROCESS ARGUMENTS
SA5 P1 CONVERT FWA
SB7 0
ZR X5,PBC1 IF FWA ABSENT
RJ DXB
SX2 ARGERR * ARGUMENT ERROR.*
NZ X4,ERR IF ADDRESS ERROR
SA6 P1
PBC1 SA5 P2 CONVERT LWA
ZR X5,PBC2 IF NO SECOND ARGUMENT
RJ DXB
SX2 ARGERR * ARGUMENT ERROR.*
NZ X4,ERR IF ADDRESS ERROR
SA6 P2
EQ PBC3 FIND LENGTH OF RECORD
PBC2 SA1 P1 SET LWA TO FIRST ARGUMENT
MX6 0 SET FWA = 0
SA6 A1
SX6 X1+
SA6 P2
PBC3 SA1 P1 CHECK RANGE SPECIFIED
SA2 P2
BX6 X1-X2
IX7 X6+X1
NZ X7,PBC5 IF EXPLICIT RANGE
RECALL D
SX6 3 READ (0)
SA6 D+6
RPHR D,R
READW D,BUF,B1 CHECK 77 TABLE
SA2 BUF
MX5 -12
LX2 12
BX6 -X5*X2
SB7 X6-7700B
LX2 -12
NZ B7,PBC4 IF NOT 77 TABLE
LX2 24 READ WORD FOLLOWING TABLE
BX5 -X5*X2
READW D,BUF,X5+B1
SA2 BUF+X5 SET NUMBER OF WORDS
SX2 X2+B1
IX2 X2+X5
PBC4 BX0 X0-X0
SX5 X2 SET LENGTH
JP PBC6 CHECK DUMP LENGTH
PBC5 IX6 X2-X1 CHECK LWA \ FWA
SX0 X1 SET FWA
SX2 ADRERR * FWA .GE. LWA+1.*
NG X6,ERR IF ERROR
SX5 X6+1 SET NUMBER OF WORDS
PBC6 IX6 X0+X5 CHECK DUMP TOO LONG
SX1 A0
SA3 PNCHFIL PUNCH FILE NAME
IX7 X1-X6
SX2 RNGERR * FWA/LWA .GE. FL.*
BX6 X3
NG X7,ERR IF LWA+1 > FL
SA6 F
RJ WTF WRITE MEMORY
JP END TERMINATE PROGRAM
RBR TITLE RBR - READ BINARY RECORD.
*** RBR,N,NAME.
*
* LOAD ONE RECORD INTO MEMORY STARTING AT LOCATION 0 FROM THE
* FILE SPECIFIED BY N. IF N IS LESS THAN 4 CHARACTERS AND IS
* NUMERIC, THEN N IS APPENDED TO *TAPE* TO OBTAIN THE FILE NAME.
* IF N CONTAINS A NON-NUMERIC CHARACTER OR IS 4 OR MORE
* CHARACTERS LONG, THEN N ITSELF IS USED AS THE FILE NAME. IF N
* IS ABSENT, *TAPE* IS USED. IF NAME IS PRESENT, A RECORD PREFIX
* IS PLACED IN MEMORY STARTING AT LOCATION 0 AND THE RECORD
* FOLLOWS. THE FORMAT OF THE PREFIX IS -
*
*T WD0 12/ 7700B,12/ 16B,18/ 0,18/ LENGTH
*T WD1 42/ NAME,18/ 0
*T WD2 60/ DATE ( YY/MM/DD.)
*T WD3-17 60/ 0
*T WD20 12/ 5200B,30/ 0,18/ LENGTH1
*
* WHERE - LENGTH= RECORD LENGTH INCLUDING PREFIX.
* LENGTH1= RECORD LENGTH MINUS WORDS 0-17.
*
* THE RECORD WITH PREFIX ADDED MAY THEN BE WRITTEN TO A FILE BY
* NEXT CALLING -
* WBR,N.
* -OR-
* PBC.
*
* DAYFILE MESSAGES -
*
* *RECORD TOO LONG.*
* THE RECORD IS TOO LONG TO FIT IN MEMORY. MEMORY IS
* FILLED AND THE EXCESS DATA ON THE RECORD IS SKIPPED.
*E
RBR BSS 0 ENTRY
SB1 1
SB2 0 SET *DISTC* FLAG OPTION
RJ SDC SET DISABLE TERMINAL CONTROL
RJ ARG PROCESS ARGUMENT
SA5 P1 CHECK NUMERIC ARGUMENT
RJ DXB
SA1 P1
NZ X4,RBR1 IF NON-NUMERIC
MX0 6*3 CHECK \ 4 CHARACTERS
BX6 -X0*X1
NZ X6,RBR1 IF \ 4 CHARACTERS
SA2 TAPFIL TAPE FILE NAME
LX1 -6*4
BX1 X2+X1
RBR1 MX2 42 SET FILE NAME
SX7 3
BX6 X2*X1
MX0 0 ASSUME FWA= 0
SA3 P2 CHECK 52 TABLE DESIRED
IX6 X6+X7
SA6 F
ZR X3,RBR2 IF NO 52 TABLE
SX0 RBRBL
RBR2 READ A6 START READ OF LOAD RECORD
RJ LDF LOAD FILE
SA1 P2
ZR X1,END IF NO 52 TABLE DESIRED
* PLACE 77 TABLE AND 52 TABLE AT 0-17.
MX2 42
SA3 RBRB SET RECORD LENGTH IN 77 TABLE
BX6 X2*X1 SET RECORD NAME IN 77 TABLE
BX7 X2*X3
SA6 A3+B1
SX1 X0-RBRBL+1 SET LENGTH IN 52 TABLE
BX7 X7+X0
SA3 RBRB+RBRBL-1
SA7 A6-B1
BX6 X2*X3
BX6 X6+X1
SA6 A3+
DATE RBRB+2 SET DATE IN 77 TABLE
SA5 RBRB LOAD TABLES
BX6 X5
MX5 0
RBR3 RJ LDW LOAD WORD
SX0 X5+B1 ADVANCE LOAD ADDRESS
SA5 A5+B1
SX1 X0-RBRBL
BX6 X5
LX5 X0
NG X1,RBR3 LOOP TO END OF TABLES
SA5 DI EMPTY DUMP PRU BUFFER
ZR X5,END IF BUFFER INACTIVE
RECALL D
BX6 X5
SX7 B0
SA6 D+6
SA7 A5
WRITEW D,PBF,100B
REWRITE D
JP END TERMINATE PROGRAM
RBRB VFD 12/7700B,12/16B,36/0
BSSZ 16B
VFD 12/5200B,48/0
RBRBL EQU *-RBRB
WBR TITLE WBR - WRITE BINARY RECORD.
*** WBR,N,L.
*
* WRITE ONE RECORD FROM MEMORY TO THE FILE SPECIFIED BY N. IF N
* IS LESS THAN 4 CHARACTERS AND IS NUMERIC, THEN N IS APPENDED
* TO *TAPE* TO OBTAIN THE FILE NAME. IF N CONTAINS A NON-NUMERIC
* CHARACTER OR IS 4 OR MORE CHARACTERS LONG, THEN N ITSELF IS
* USED AS THE FILE NAME. IF N IS ABSENT, THE FILE NAME IS
* *TAPE*. THE NUMBER OF WORDS TO WRITE IS SPECIFIED BY L. IF L
* IS 0 OR ABSENT, THE LENGTH IS TAKEN FROM BITS 0-17 OF
* LOCATION 0.
*
* DAYFILE MESSAGES -
*
* * ARGUMENT ERROR.*
* THE L ARGUMENT IS NON-NUMERIC.
* *RECORD TOO LONG.*
* THE WRITE LENGTH IS \ FL.
*E
WBR BSS 0 ENTRY
SB1 1
SB2 0 SET *DISTC* FLAG OPTION
RJ SDC SET DISABLE TERMINAL CONTROL
RJ ARG PROCESS ARGUMENTS
SA5 P1 CHECK NUMERIC ARGUMENT
RJ DXB
SA1 P1
NZ X4,WBR1 IF NON-NUMERIC
MX0 6*3 CHECK \ 4 CHARACTERS
BX6 -X0*X1
NZ X6,WBR1 IF \ 4 CHARACTERS
SA2 TAPFIL TAPE FILE NAME
LX1 -6*4
BX1 X2+X1
WBR1 MX2 42 SET FILE NAME
SX7 3
BX6 X2*X1
SA5 P2 CONVERT LENGTH
BX6 X6+X7
SB7 B0
SA6 F
ZR X5,WBR2 IF LENGTH ABSENT
RJ DXB
SX2 ARGERR * ARGUMENT ERROR.*
NZ X4,ERR IF ERROR
NZ X6,WBR3 IF EXPLICIT LENGTH
WBR2 SX6 3 READ (0)
SA6 D+6
RPHR D,R
READW D,BUF,B1
SA1 BUF SET LENGTH
SX6 X1+
WBR3 SB7 A0 CHECK LENGTH
BX0 X0-X0
SX2 WBRA * RECORD TOO LONG.*
SB6 X6
BX5 X6
GT B6,B7,ERR IF LENGTH .GT. FL
RJ WTF WRITE MEMORY
JP END TERMINATE PROGRAM
WBRA DATA C* RECORD TOO LONG.*
TITLE SUBROUTINES.
ACA SPACE 4,15
** ACA - ASSEMBLE CORRECTION ADDRESS.
*
* ENTRY CORRECTION IN BUF.
*
* EXIT (X5)= ADDRESS.
* (CC)= NEXT CHARACTER POSITION.
*
* USES X - 2, 4, 5, 6.
* A - 2, 6.
* B - 2, 7.
*
* CALLS ACS.
ACA SUBR ENTRY/EXIT
MX4 6 SET DIGIT COUNTER
SA2 BUF READ FIRST CHARACTER
SB2 B0 SPECIFY *NO IGNORE CHARACTER*
JP ACA2 SKIP LEADING BLANKS
ACA1 SA2 A2+1 READ NEXT CHARACTER
ZR X2,ACA3 IF END OF LINE
ACA2 SB7 X2-1R
ZR B7,ACA1 IF BLANK
ACA3 RJ ACS ASSEMBLE CHARACTER STRING
BX5 X6
SX6 A2-BUF+1 SET CURRENT CHARACTER POSITION
SA6 CC
JP ACAX RETURN
ACD SPACE 4,15
** ACD - ASSEMBLE CORRECTION DATA.
*
* ENTRY (CC)= CURRENT CHARACTER POSITION.
*
* EXIT (X6)= DATA.
*
* USES X - 2, 4.
* A - 2.
* B - 2.
*
* CALLS ACS.
ACD SUBR ENTRY/EXIT
SA2 CC READ CURRENT POSITION
SB2 -1R SPECIFY BLANK TO BE IGNORED
SA2 X2+BUF READ FIRST CHARACTER
MX4 20 SET DIGIT COUNTER
RJ ACS ASSEMBLE CHARACTER STRING
JP ACDX RETURN
ACS SPACE 4,15
** ACS - ASSEMBLE CHARACTER STRING.
*
* ENTRY (A2)= ADDRESS OF FIRST CHARACTER.
* (X2)= FIRST CHARACTER.
* (X4)= DIGIT COUNT.
* (B2)= -CHARACTER TO BE IGNORED. =0 IF NONE.
*
* EXIT (X6)= CONVERTED DIGITS.
* (A2)= LAST+1 CHARACTER ADDRESS.
*
* USES X - 1, 2, 3, 4, 6.
* A - 1, 2.
* B - 6, 7.
ACS SUBR ENTRY/EXIT
SA1 ACSA READ OCTAL CHARACTER MASK
SX6 0 CLEAR ASSEMBLY
JP ACS2 ENTER LOOP
ACS1 SA2 A2+1 READ NEXT CHARACTER
ACS2 SB7 X2+B2 CHECK IGNORE
ZR X2,ACSX IF END OF LINE, RETURN
SB6 X2
ZR B7,ACS1 IF IGNORE, SKIP
LX3 X1,B6
SX2 X2-1R0
PL X3,ACSX IF NOT OCTAL, RETURN
LX6 3 INSERT DIGIT
NO
LX4 1 COUNT DIGIT
BX6 X6+X2
NG X4,ACS1 IF ASSEMBLY NOT FULL
JP ACSX RETURN
ACSA BSS 0
POS 60-1R0
VFD 8/377B
VFD $/0
BSS 0
ARG SPACE 4,15
** ARG - PROCESS ARGUMENTS.
*
* ENTRY NONE.
*
* EXIT (P1)= FIRST ARGUMENT.
* (P2)= SECOND ARGUMENT.
* (B7)= ARGUMENT COUNT.
* (A0)= FL OF DUMP FILE.
* (FL)= CURRENT FL.
* (AF)= BIT 17 OF FIRST ARGUMENT IF *SFP* CALL, SIGN
* EXTENDED.
*
* USES X - 0, 1, 2, 6, 7.
* A - 0, 1, 2, 6, 7.
* B - 6, 7.
*
* CALLS EBF.
*
* MACROS RPHR.
ARG1 SA1 SPPR EXTRACT ARGUMENTS
SX6 X1
AX1 18
MX0 -17
SA6 P2
BX7 -X0*X1
BX1 X0*X1 SET ABORT FLAG
SB7 2
SX6 X1
SA7 P1
SA6 AF
MX0 48 CLEAR STATUS BYTE
SA1 SPPR
LX0 24
BX7 X0*X1
SA7 A1
ARG2 SX6 B1 READ DUMP FILE FL
SX0 B7 SAVE ARGUMENT COUNT
SA6 D+6
RPHR D,R
SA1 DBUF+2
SX6 A0 SET CURRENT FL
AX1 36
SB7 X0
SA6 FL
SA0 X1
SX6 X1 SAVE DUMP FILE FL
SA6 DMPFL
SA2 D+1 EMPTY BUFFER
RJ EBF
ARG SUBR ENTRY/EXIT
SA1 ACTR READ ARGUMENT COUNT
ZR X1,ARG1 IF NOT A COMMAND
MX0 42
SB7 X1
ZR B7,ARG2 IF NO ARGUMENTS
SA2 ARGR READ FIRST ARGUMENT
BX6 X0*X2
SB6 B7-B1
SA6 P1
ZR B6,ARG2 IF NOT A SECOND ARGUMENT
SA2 A2+B1 READ SECOND ARGUMENT
BX6 X0*X2
SA6 P2
JP ARG2
CMP SPACE 4,10
** CMP - COMPARE WORD PAIRS.
*
* ENTRY (B6) = ADDRESS OF BUFFER WORD TO COMPARE WITH (B6-B7).
* (B7) = NUMBER OF WORDS TO COMPARE.
*
* EXIT (X7) = ACCUMULATED DIFFERENCES.
*
* USES X - 1, 2, 3, 4, 7.
* A - 1, 2, 3, 4.
* B - 3, 7.
CMP SUBR ENTRY/EXIT
SB3 B0
BX7 X7-X7
CMP1 SA1 B6-B7
SA2 A1+B1
SA3 B6+B3 WORD TO COMPARE WITH X1
SA4 A3+B1 NEXT WORD TO COMPARE WITH X2
BX1 X1-X3
SB7 B7-2 DECREMENT WORD PAIRS STILL TO PROCESS
BX7 X7+X1 ACCUMULATE DIFFERENCES
BX2 X2-X4
SB3 B3+2
BX7 X7+X2 ACCUMULATE DIFFERENCES
NZ B7,CMP1 IF MORE WORD PAIRS TO PROCESS
EQ CMPX RETURN
CFO SPACE 4,15
** COF - SET OUTPUT FILE NAME AND CHECK FILE ASSIGNMENT.
*
* ENTRY (X5) = 0 IF CM DUMP REQUEST.
*
* EXIT IF FILE *OUTPUT* IS ASSIGNED TO
* THE TERMINAL, THEN DUMP WILL BE WRITTEN
* ON FILE *ZZZDUMP* RATHER THAN FILE *OUTPUT*.
*
* USES X - 1, 2, 3, 4, 6, 7.
* A - 1, 2, 3, 4, 6, 7.
*
* CALLS STF.
*
* MACROS GETPP, WRITER, WRITEW.
COF1 GETPP COFD,PL,PD,PW GET PAGE PARAMETERS
SA1 DF GET DISPLAY CODE FLAG
SX2 PWDC SET WIDTH FOR DISPLAY CODE TRANSLATION
NZ X1,COF2 IF DISPLAY CODE WIDTH IS REQUIRED
SX2 PWNI SET WIDTH FOR NO DISPLAY CODE TRANSLATION
COF2 SA1 PW GET JOB PAGE WIDTH
IX4 X1-X2
PL X4,COF3 IF PAGE WIDE ENOUGH
SX7 BUF1+2
SA3 COFB
SA7 IND RESET BUFFER POINTER
BX6 X3
SA6 DC SET NARROW PAGE WIDTH CONTROL WORD
COF3 WRITEW F,PD,B1 WRITE PRINT DENSITY
COF SUBR ENTRY/EXIT
SA1 OUTFIL OUTPUT FILE NAME
SX2 F
BX6 X1
SA6 X2
RJ STF CHECK FILE ASSIGNMENT
NZ X6,COF1 IF OUTPUT NOT ASSIGNED TO TERMINAL
* WRITE DUMP OUTPUT ON FILE *ZZZDUMP* IF TTY.
WRITEW F,COFC,COFCL
WRITER F,R
SA1 TTYFIL GET DUMP FILE FOR TTY
BX6 X1
SA6 X2 STORE NEW FILE NAME
SA4 COFB TERMINAL DUMP CONTROL WORD
SA1 COFA
BX6 X4
SA2 A1+B1 CLEAR AUTO EJECT
SA3 VERS
BX7 X2
SA6 DC NEW DUMP CONTROL WORD
SA7 LFMT
IX6 X3+X1 CLEAR PAGE EJECT
SA6 A3
NZ X5,COFX IF EXTENDED MEMORY DUMP REQUEST
SX7 BUF1+2
SA3 SHLB CLEAR PAGE EJECT
SA7 IND
IX7 X1+X3
SA7 A3
EQ COFX RETURN
COFA VFD 6/1R -1R1,54/0
CON 1L
COFB VFD 6/30B,18/0,18/1,18/2 TERMINAL DUMP CONTROL WORD
COFC DATA C* EXCHANGE PACKAGE/MEMORY DUMP ON FILE ZZZDUMP.*
COFCL EQU *-COFC LENGTH OF MESSAGE
COFD BSSZ 2 GETPP RESPONSE BLOCK
DCK SPACE 4,15
** DCK - STRING OUT DATA.
*
* ENTRY (X6) = FIRST CONVERTED WORD OF DUMP.
* (X7) = SECOND CONVERTED WORD OF DUMP.
* (B3) = INDEX OF SPACE.
* (A7) = LOCATION IN DESTINATION LINE.
* (B7) = WORD COUNT.
*
* EXIT WORDS PACKED AND INTERPRETED INTO BUFFER.
*
* USES X - 2, 3, 4, 6, 7.
* A - 3, 6, 7.
* B - 2, 3, 4, 5.
DCK SUBR ENTRY/EXIT
SB4 B3
SB5 1
BX3 X6 SAVE (X6)
DCK1 SA4 B4+SBUF+19 MOVE DATA
SB4 B4-B1
BX6 X4
SA6 B4+SBUF
PL B4,DCK1 IF NO MORE WORDS TO MOVE
NG B7,DCK2 NO SPACE PRESENT
SX6 1R
SA6 B3+SBUF
SB3 B3+1
DCK2 SB2 10
MX2 6
DCK3 BX6 X2*X3
LX6 6
SA6 B3+SBUF
SB2 B2-B1 SHIFT COUNT
LX3 6
SB3 B3+1
NZ B2,DCK3 COMPLETE STRING
BX3 X7
SB5 B5-B1
ZR B5,DCK2 PROCESS SECOND WORD
SB5 B1
SB3 B0
DCK4 SB2 10
SX7 0
DCK5 SA3 B3+SBUF
NZ X3,DCK6 IF NOT A 0 CHARACTER
SX3 1R
DCK6 LX7 6
BX7 X7+X3
SB3 B3+B1
SB2 B2-B1
NZ B2,DCK5 COMPLETE STRING
SA7 A7+B1
SB5 B5-B1
ZR B5,DCK4 DO SECOND WORD
JP DCKX RETURN
DCM SPACE 4,20
** DCM - DUMP CENTRAL MEMORY.
*
* ENTRY (P1)= FWA OF DUMP.
* (P2)= LWA OF DUMP.
* (DMPFL) = DUMP FILE FL.
*
* EXIT NONE.
*
* USES X - 0, 1, 2, 3, 4, 5, 6, 7.
* A - 0, 1, 2, 3, 4, 5, 6, 7.
* B - 6, 7.
*
* CALLS COD, OCT, EBF, SHL, RDW=, RMW.
*
* MACROS READ, READW, RECALL, WRITEW.
DCM12 SA1 LA CONVERT ADDRESS
RJ COD
SA1 DB SET BLOCK INDEX
LX6 2*6
SA0 BUF1+X1
SA6 BUF
SB7 X5 LIST OCTAL
RJ OCT
DCM SUBR ENTRY/EXIT
RECALL D
SA2 D+1 EMPTY BUFFER
RJ EBF
RJ SHL SET HEADER LINE
SA4 DMPFL CHECK FL
ZR X4,DCMX IF NO FL, RETURN
SA1 P1 SET FIRST ADDRESS
SA3 P2
SX6 X3
BX5 X3-X1 LWA-FWA
IX2 X1-X4 FWA-FL
IX7 X3-X4 LWA-FL
SX2 X2+4 FWA-FL+4
ZR X5,DCM1 IF FWA = LWA
SX6 X3-1 SET LWA = LWA-1
DCM1 NG X7,DCM2 IF LWA < FL
SX6 X4-4 SET LWA = FL-4
DCM2 SA6 A3
SA5 DC SET DUMP CONTROL WORD
NG X2,DCM3 IF FWA < FL-4
SX7 X4-8 SET FWA = FL-8
SA7 A1
DCM3 SA1 A1 RESET X1 TO FIRST ADDRESS
BX0 X1
SX6 X1 SET LINE ADDRESS
SB7 X1-DMPL CHECK FWA IN MEMORY
SA6 LA
PL B7,DCM5 IF FWA IN MEMORY
* POSITION TO FWA.
SX6 X0+300B READ PRU CONTAINING FWA
AX6 6
SA6 D+6
READ D
MX6 -6
BX7 -X6*X0
ZR X7,DCM4 IF FWA IS XXXX00
READW D,BUF,X7
* READ FIRST BLOCK.
DCM4 READW D,BUF1,X5 READ FIRST BLOCK
JP DCM6
DCM5 SA2 LA COPY WORDS FROM MEMORY
SX3 X5
IX1 X2-X3
SA2 DCMB USE MEMORY AS WORD SOURCE
SB6 BUF1
BX6 X2
SB7 X5
SA6 DCMA FORCE DUMP FROM MEMORY
RJ RMW
* DUMP MEMORY.
DCM6 SA1 LA CONVERT ADDRESS
RJ COD
SA1 DB SET BLOCK INDEX
LX6 2*6
SA0 BUF1+X1
SA6 BUF
SB7 X5 LIST OCTAL
RJ OCT
SA5 DC SET DUMP CONTROL WORD
SA1 DB TOGGLE DUMP BLOCK
SX2 X5
BX6 X1-X2
SA6 A1
BX0 X1-X2
DCM7 SB6 BUF1+X0 READ NEXT BLOCK
SB7 X5
DCMA SX2 D (DUMP FROM FILE)
RJ =XRDW= ( READW D,BUF1+X0,X5 )
* SA1 LA (DUMP FROM MEMORY)
* RJ RMW
DCM8 SA3 LA ADVANCE LINE ADDRESS
NZ X1,DCM11 IF EOR
SA2 IND
SA1 BUF1 LOAD FIRST WORD PAIR
SA2 X2
LX4 X5,B1 SET WORD COUNT
SB2 X5
BX7 X7-X7 CLEAR DIFFERENCES
SX6 X3+B2
DCM9 BX3 X1-X2 COMPARE WORDS
LX4 1 COUNT WORD
SA1 A1+B1
BX7 X7+X3 ACCUMULATE DIFFERENCES
SA2 A2+B1
NG X4,DCM9 IF NOT END OF BLOCK
SA1 A3-B1 CHECK LIMIT
IX2 X6-X1
SA6 A3 STORE ADDRESS
PL X2,DCM10 IF LIMIT REACHED
NZ X7,DCM6 IF DIFFERENT WORD DETECTED
NG X7,DCM6 IF DIFFERENT WORD DETECTED
NG X5,DCM7 IF DUPLICATE LINE SET
WRITEW F,DUPLIN,DUPLINL
MX1 1 SET DUPLICATE LINE
BX5 X5+X1
JP DCM7 PROCESS NEXT BLOCK
DCM10 NZ X7,DCM12 IF NOT DUPLICATE LINE
NG X7,DCM12 IF NOT DUPLICATE LINE
NG X5,DCMX IF DUPLICATE LINE SET
WRITEW F,DUPLIN,DUPLINL
JP DCMX RETURN
DCM11 SA1 DCMB SET MEMORY COPY ENTRY
BX6 X1
SA6 DCMA FORCE DUMP FROM MEMORY
DCMB SA1 LA READ MEMORY WORDS
RJ RMW
JP DCM8
DEC SPACE 4,15
** DEC - DUMP EXTENDED CORE STORAGE (ECS).
*
* ENTRY (P1) = FWA OF DUMP.
* (P2) = LWA OF DUMP.
* (DC) = DUMP CONTROL WORD.
* (ECSFL) = EXTENDED MEMORY FIELD LENGTH.
*
* USES X - 0, 1, 2, 3, 4, 5, 6, 7.
* A - 0, 1, 2, 3, 4, 5, 6, 7.
* B - 3, 6, 7.
*
* CALLS CMP, COD, OCT, RMW, SHL.
*
* MACROS ENDRUN, MESSAGE, WRITEW.
DEC SUBR
RJ SHL WRITE HEADER LINE
SA5 DC DUMP CONTROL WORD
SA4 ECSFL
SA1 P1 FWA
SA3 A1+B1 LWA
IX2 X1-X4 FWA - FL
SX0 X5+ BLOCK SIZE
IX7 X3-X4 LWA - FL
IX2 X2+X0 FWA - FL + BLOCK SIZE
NG X7,DEC1 IF LWA .LT. FL
IX6 X4-X0 LWA = FL - BLOCK SIZE
SA6 A3
DEC1 BX7 X1
NG X2,DEC2 IF FWA .LT. FL - BLOCK SIZE
IX7 X4-X0 FWA = FL - (2 * BLOCK SIZE)
IX7 X7-X0
DEC2 SA7 P1 NEW FWA
SA2 A7+1 LWA
IX6 X2+X0
SA6 A2
SA7 LA LINE ADDRESS
* DUMP NEXT BLOCK.
DEC3 SA1 LA CURRENT FWA
SA2 P2 LWA
BX0 X1
IX3 X2-X1 LWA - CURRENT FWA
SX5 400B SIZE OF EXTENDED MEMORY BLOCK TO READ
SA0 DBUF FWA OF EXTENDED MEMORY BUFFER
SB3 X5+
IX4 X3-X5
LX5 30
PL X4,DEC4 IF 400B WORDS REMAINING
SB3 X3+ NUMBER OF WORDS TO TRANSFER
LX3 30
BX5 X3
DEC4 RE B3 READ ECS
- EQ DEC9 IF READ ERROR
SX6 DBUF FWA OF EXTENDED MEMORY BUFFER
BX6 X5+X6
SA6 BA INITIALIZE BUFFER ADDRESS WORD
DEC5 SA5 DC DUMP CONTROL WORD
SA1 DECA SET FIRST READ FLAG
SX6 B1
SA6 A1
ZR X1,DEC7 IF FIRST READ
SA2 BA
SB7 X5 NUMBER OF WORDS TO COMPARE
SB6 X2 FWA OF EXTENDED MEMORY BUFFER
RJ CMP
NZ X7,DEC6 IF NOT DUPLICATED LINES
NG X7,DEC6 IF NOT DUPLICATED LINES
NG X5,DEC8 IF *DUPLICATED LINES.* ALREADY WRITTEN
MX1 1
BX6 X5+X1 SET INDICATOR
SA6 DC NEW DUMP CONTROL WORD
WRITEW F,DUPLIN,DUPLINL
EQ DEC8 CONTINUE PROCESSING BUFFER
DEC6 PL X5,DEC7 IF DUPLICATED LINES INDICATOR NOT SET
MX1 1 CLEAR DUPLICATE LINES INDICATOR
BX6 -X1*X5
SA6 DC NEW DUMP CONTROL WORD
DEC7 SA1 LA LINE ADDRESS
RJ COD
SA1 BA BUFFER ADDRESS
LX6 2*6
SA0 X1
SA6 BUF
SB7 X5+ NUMBER OF WORDS TO PROCESS
RJ OCT
DEC8 SA2 LA LINE ADDRESS
SA5 DC DUMP CONTROL WORD
SA4 BA BUFFER ADDRESS
SX1 X5+
SA3 P2 LWA
IX6 X2+X1
IX7 X4+X1
BX3 X3-X6 LWA - LA
ZR X3,DECX IF NO MORE TO LIST - RETURN
AX4 30
SX3 X7+
SX4 X4+DBUF LWA + 1 OF BUFFER
SA6 LA NEW LINE ADDRESS
BX3 X3-X4
SA7 BA NEW BUFFER ADDRESS
NZ X3,DEC5 IF BUFFER NOT EMPTY
BX2 -X1
LX1 1 MOVE PREVIOUS LINE TO COMPARE BUFFER
SB6 DBUF+X2 DESTINATION ADDRESS
SB7 X5 WORD COUNT
IX1 X4-X1 SOURCE ADDRESS - WORD COUNT
RJ RMW
EQ DEC3 READ ANOTHER BUFFER FROM ECS
DEC9 MESSAGE DECB * EXTENDED MEMORY READ ERROR.*
WRITEW F,DECC,DECCL
WRITER X2
ENDRUN
DECA CON 0 FIRST READ FLAG
DECB DATA C* EXTENDED MEMORY READ ERROR.*
DECC DATA C*0 EXTENDED MEMORY READ ERROR - DUMP TERMINATED.*
DECCL EQU *-DECC
DXP SPACE 4,10
** DXP - DUMP EXCHANGE PACKAGE.
*
* ENTRY (VERF) = FWA OF DUMP HEADER.
* (VERL) = LENGTH OF DUMP HEADER.
*
* USES A - 0, 1, 2, 3, 5, 6, 7.
* B - 2, 3.
* X - ALL.
*
* CALLS COD, OCB, PEP.
*
* MACROS GETMC, WRITEW.
DXP SUBR ENTRY/EXIT
GETMC DXPG
SA1 DXPG SAVE CYBER 176 FLAG
MX6 -2
AX1 18
BX6 -X6*X1
SA6 A1
RJ PEP PREPARE EXCHANGE PACKAGE
SA1 VERF GET HEADER FWA
SA3 VERL GET HEADER LENGTH
WRITEW F,X1,X3
WRITEW X2,DXPA,DXPAL WRITE HEADER
SA0 0 CLEAR REGISTER INDEX
SA5 EPB
* LIST (A), (B) REGISTERS AND ((A)).
DXP0 SA1 DXPB+A0 SET REGISTER NAME
SA2 DXPG
ZR X2,DXP1 IF NOT A CYBER 176
LX1 30 SET CYBER 176 REGISTER NAME
DXP1 SA2 DXPC
MX0 5*6
SB2 36 SET SHIFT COUNT
BX3 X0*X1
LX3 5*6
IX6 X2+X3
MX0 -18
SA6 BUF
NG X1,DXP4 IF BLANK FIELD
SB3 A0-1
ZR B3,DXP2 IF RA
SB3 A0-3
NG B3,DXP3 IF NOT TO EXIT MODE LINE
NZ B3,DXP2 IF PAST EXIT MODE LINE
SA1 DXPG
NZ X1,DXP3 IF CYBER 176 PSD REGISTER
SB2 48 SET SHIFT COUNT FOR EM
MX0 -12
EQ DXP3 EXTRACT VALUE
DXP2 SB3 A0-6
PL B3,DXP3 IF PAST FLE
MX0 -21
DXP3 AX2 X5,B2 EXTRACT VALUE
BX1 -X0*X2
RJ COD CONVERT
DXP4 LX6 4*6
SB3 A0-1
ZR B3,DXP5 IF RA
SB3 A0-4
EQ B3,B1,DXP5 IF PROCESSING FLE
NZ B3,DXP6 IF NOT RAE
DXP5 SA1 BUF SET UPPER CHARACTER IN PREVIOUS WORD
MX0 -6
BX7 -X0*X6
SX2 1R INSURE BLANK IN LOWER POSITION
BX6 X0*X6
BX1 X0*X1
BX6 X6+X2
BX7 X1+X7
SA7 A1+
DXP6 SX3 A0+2RA0-2R SET A-REGISTER NUMBER
IX6 X6+X3
SA6 A6+B1
* LIST (A) REGISTER.
LX5 -18 CONVERT A REGISTER
SX0 1RB-1R
MX2 -18
BX1 -X2*X5
RJ COD
LX6 3*6
IX6 X6+X0
SA6 A6+B1
* LIST (B) REGISTER.
LX5 18 CONVERT B REGISTER
SX0 1R0-1R +A0
MX2 -18
BX1 -X2*X5
LX0 54
RJ COD
LX6 2*6
IX6 X6+X0
* LIST ((A)).
SA6 A6+1
SA1 EPB+20B+A0
RJ OCB
MX0 24
SA1 A6-B1 GET SECOND WORD
BX5 X0*X6 SAVE THIRD WORD CARRY
LX5 24
BX4 X0*X1 SAVE SECOND WORD CARRY
BX1 -X0*X1
LX1 24
SA2 A1-B1 GET FIRST WORD
BX6 X5+X1
SA6 A6 SET SECOND WORD + THIRD WORD CARRY
BX5 X0*X2 SAVE FIRST WORD CARRY
LX4 24
BX2 -X0*X2
LX2 24
SA1 DXPD CONVERT (AX)
IX7 X4+X2
SA7 A6-B1 SET FIRST WORD + SECOND WORD CARRY
SX3 A0
LX3 6*6
LX5 24
IX4 X3+X1
IX7 X5+X4
SA7 A7-B1 SET (AX) + FIRST WORD CARRY
WRITEW F,BUF,A6-BUF+2
SA0 A0+1 ADVANCE REGISTER
SB2 A0-10B
SA5 EPB+A0
NZ B2,DXP0 IF NOT AS FAR AS X REGISTERS
WRITEW F,(=C* *),1
* LIST (X) REGISTERS.
DXP7 SA2 DXPE CONVERT X REGISTER
SX3 A0-10B
LX3 3*6
IX6 X2+X3
SA1 EPB+A0
SA6 BUF
RJ OCB
MX1 36 SET EOL IN LAST WORD
BX6 X1*X6
SA6 A6
WRITEW F,BUF,A6-BUF+1
SA0 A0+1
SB2 A0-20B
NZ B2,DXP7 IF NOT END OF X REGISTERS
WRITEW F,(=C* *),1
* LIST (RA - RA+1).
SA2 DXPF
SA1 EPB+30B
BX6 X2
SA6 BUF
RJ OCB
MX1 36 SET EOL IN LAST WORD
BX6 X1*X6
SA6 A6
WRITEW F,BUF,A6-BUF+1
SA2 DXPF+1
SA1 EPB+31B
BX6 X2
SA6 BUF
RJ OCB
MX1 36 SET EOL IN LAST WORD
BX6 X1*X6
SA6 A6
WRITEW F,BUF,A6-BUF+1
WRITEW F,(=C* *),1
WRITEW F,(=C* *),1
* PREPARE PROGRAM AREA DUMP.
SX6 B0+ DEFAULT DUMP 0 TO 74B
SX7 74B
SA1 EPB CHECK (P)
SA2 EPB+2
AX1 36
AX2 36
SX3 X1-2
PL X3,DXP8 IF (P) GREATER THAN 1
SA1 EPB+30B (P) = ERROR ADDRESS
AX1 30
DXP8 SX1 X1
PL X1,DXP8.1 IF (P) .GE. 0
MX3 -17 REMOVE 400000B BIAS
BX1 -X3*X1
DXP8.1 SX3 X1-40B
SX4 X1+40B
PL X3,DXP9 IF (P-40B) .GT. 0
SX3 B0+
EQ DXP10 DUMP 0 TO (P+40B)
DXP9 IX5 X3-X2
PL X5,DXP11 IF (P-40B) .GE. FL
IX5 X4-X2
NG X5,DXP10 IF (P+40B) .LT. FL
SX4 X2+ DUMP (P-40B) TO FL
DXP10 SX6 X3+
SX7 X4+
DXP11 SA6 P1
SA7 P2
EQ DXPX RETURN
DXPA DATA C* EXCHANGE PACKAGE.*
DXPAL EQU *-DXPA
DXPB VFD 30/0HP,30/0HP
VFD 30/0HRA,30/0HRA
VFD 30/0HFL,30/0HFL
VFD 30/0HEM,30/0HPSD
VFD 30/0HRAE,30/0HRAE
VFD 30/0HFLE,30/0HFLE
VFD 30/0HMA,30/0HMA
VFD 30/1H ,30/0HEEA
DXPC DATA 5L
DXPD VFD 6/1H ,24/0H(A0),6/1H ,24/0
DXPE DATA 5AX0
DXPF DATA 8A(RA)
DATA 8A(RA+1)
DXPG CON 0 CYBER 176 FLAG
EBF SPACE 4,15
** EBF - EMPTY BUFFER.
*
* ENTRY (A2)= ADDRESS OF *FIRST*.
* (X2)= (FIRST)
*
* EXIT (IN)= (OUT)= (FIRST)
*
* USES X - 6.
* A - 6.
*
* CALLS NONE.
EBF SUBR ENTRY/EXIT
SX6 X2+
SA6 A2+B1 STORE IN
SA6 A6+B1 STORE OUT
JP EBFX RETURN
END SPACE 4,10
** END - PROCESS END.
*
* ENTRY NONE.
*
* MACROS ENDRUN.
END BSS 0 ENTRY
ENDRUN
ERR SPACE 4,10
** ERR - PROCESS ERROR.
*
* ENTRY (X2)= ADDRESS OF ERROR MESSAGE.
*
* EXIT NONE.
*
* MACROS ABORT, MESSAGE.
ERR BSS 0 ENTRY
MESSAGE X2,3,R ISSUE DAYFILE MESSAGE
ABORT
LDF SPACE 4,15
** LDF - LOAD MEMORY FROM FILE.
*
* ENTRY (X0)= FWA OF LOAD.
*
* EXIT (X0)= LWA+1 LOADED.
*
* USES X - 0, 1, 5, 6, 7.
* A - 6.
* B - 7.
*
* MACROS MESSAGE, READW, RECALL, REWRITE, RPHR, WRITEW.
LDF5 SX0 X1+
LDF SUBR ENTRY/EXIT
LDF1 SB7 X0-DMPL
PL B7,LDF2 IF MEMORY LOAD
RECALL D
SA2 D+1 EMPTY BUFFER
RJ EBF
SX6 X0+300B UPDATE 1 PRU
MX5 -6
AX6 6
SA6 D+6
RPHR D,R
SA1 D SET EOR STATUS TO PREVENT READ-AHEAD
SX6 20B
BX6 X1+X6
SA6 A1
READW D,BUF,100B
SX6 X0+300B
BX7 -X5*X0 FIND LOAD ADDRESS WITHIN PRU
AX6 6
IX5 X5+X7 -(NUMBER OF WORD TO READ) + 1
SA6 D+6
BX5 -X5
READW F,BUF+X7,X5+B1 LOAD PRU
NG X1,LDFX IF EOF/EOI
SX6 X5+B1
BX5 X1 SAVE READ STATUS
IX0 X0+X6 ADVANCE LOAD ADDRESS
WRITEW D,BUF,100B REPLACE PRU
REWRITE D
ZR X5,LDF1 IF EOR NOT REACHED
SX5 X5-BUF-100B ADJUST LWA+1
IX0 X0+X5
JP LDFX RETURN
LDF2 SA1 FL FIND NUMBER OF WORDS TO FILL FL
IX5 X1-X0
SB7 X5-2
NG B7,LDF3 IF < 2 WORDS LEFT
READW F,X0,B7 LOAD ALL BUT LAST 2 WORDS
IX0 X0+X5 SET NEW LOAD ADDRESS
NZ X1,LDF5 IF EOR
SX5 2
IX0 X0-X5
LDF3 READW F,X0,X5 LOAD LAST WORDS
IX0 X0+X5
NZ X1,LDF5 IF EOR
MESSAGE LDFA,3,R *RECORD TOO LONG.*
LDF4 READW F,BUF,100B SKIP REST OF RECORD
ZR X1,LDF4
JP LDFX RETURN
LDFA DATA C* RECORD TOO LONG.*
LDW SPACE 4,15
** LDW - LOAD ONE WORD.
*
* ENTRY (X5)= ADDRESS.
* (X6)= WORD.
*
* EXIT NONE.
*
* USES X - 0, 1, 2, 6, 7.
* A - 1, 6, 7.
* B - 7.
*
* MACROS READW, RECALL, REWRITE, RPHR, WRITEW.
LDW3 SA6 X5+ STORE WORD
LDW SUBR ENTRY/EXIT
SB7 X5-DMPL
PL B7,LDW3 IF ADDRESS IN MEMORY
SA1 DI CHECK ADDRESS IN BUFFER
SX7 X5+300B
AX7 6
BX2 X1-X7
ZR X2,LDW2 IF ADDRESS IN BUFFER
SA7 A1+ SET NEW DUMP INDEX
SA6 LDWA SAVE DATA
ZR X1,LDW1 IF BUFFER EMPTY
BX0 X1 REWRITE PRU
RECALL D
BX6 X0
SA6 D+6
WRITEW D,PBF,100B
REWRITE D
LDW1 RECALL D
SA1 DI READ PROPER PRU
BX6 X1
SA6 D+6
RPHR D,R
SA1 D SET EOR STATUS TO PREVENT READ-AHEAD
SX6 20B
BX6 X1+X6
SA6 A1
READW D,PBF,100B
SA1 LDWA
BX6 X1
LDW2 MX7 -6 STORE WORD
BX7 -X7*X5
SA6 PBF+X7
JP LDWX RETURN
LDWA CON 0
OCB SPACE 4,15
** OCB - CONVERT OCTAL BY BYTES.
*
* ENTRY (X1) = WORD TO CONVERT.
* (A6) = BUFFER ADDRESS.
*
* EXIT (A6) = BUFFER ADDRESS ADVANCED.
* (X6) = LAST WORD CONVERTED.
*
* USES X - 0, 1, 2, 3, 4, 5, 6, 7.
* A - 1, 6, 7.
*
* CALLS WOD.
OCB SUBR ENTRY/EXIT
RJ WOD CONVERT WORD (ABCDEFGHIJ KLMNOPQRST)
SA1 OCBA
MX2 -2*6
BX5 -X2*X6 ........IJ
MX0 4*6
BX3 X0*X6 ABCD......
LX0 -4*6
IX4 X1+X3 ABCD*....*
BX2 X0*X6
LX2 -6 .....EFGH.
BX6 X4+X2 ABCD*EFGH*
LX7 -4*6 QRSTKLMNOP
SA6 A6+B1
MX0 4*6
BX6 X0*X7 QRST......
LX5 8*6 IJ........
BX7 -X0*X7 ....KLMNOP
LX7 2*6 ..KLMONP..
IX2 X5+X7 IJKLMNOP..
BX3 X0*X2 IJKL......
LX0 -4*6
IX4 X1+X3 IJKL*....*
BX5 X0*X2 ....MNOP..
SA1 A1+B1 ....******
LX5 -6 .....MNOP.
IX7 X4+X5 IJKL*MNOP*
BX6 X1+X6 QRST******
SA7 A6+B1
SA6 A7+B1
JP OCBX RETURN
OCBA VFD 24/0,6/1R ,24/0,6/1R
VFD 24/0,36/6H
OCT SPACE 4,20
** OCT - LIST OCTAL OR OCTAL WITH DISPLAY.
*
* ENTRY (B7) = WORD COUNT.
* (A0) = WORD ADDRESS.
* (A6) = DESTINATION ADDRESS - 1.
* (DF) = 1 IF DISPLAY DUMP.
*
* EXIT NONE.
*
* USES X - 0, 1, 2, 3, 4, 5, 6, 7.
* A - 1, 2, 3, 6, 7.
* B - 2, 3, 6, 7.
*
* CALLS DCK, WOD.
*
* MACROS WRITEW.
OCT SUBR ENTRY/EXIT
SA1 A0 READ FIRST WORD
SB6 B7
SA2 DF
NZ X2,OCT2 IF DISPLAY DUMP
OCT1 RJ WOD CONVERT WORD
MX5 5*6 BLOCK LINE INTO 15-BIT PARCELS
BX3 X5*X6 ABCDE.....
SA2 OCTA
LX3 -4*6 ....ABCDE.
BX1 -X5*X6 .....FGHIJ
IX6 X2+X3 ****ABCDE*
SA2 A2+B1
LX1 5*6 FGHIJ.....
BX4 -X5*X7 .....PQRST
MX3 -4*6
IX2 X2+X1 FGHIJ*....
SA6 A6+B1
LX7 -6*6 OPQRSTKLMN
BX0 -X3*X7 ......KLMN
SA3 A2+B1
IX6 X2+X0 FGHIJ*KLMN
MX5 1*6
SA6 A6+B1
IX4 X3+X4 ***.*PQRST
SB7 B7-B1
BX3 X5*X7 O.........
SA1 A1+B1 NEXT DUMP BLOCK WORD
LX4 3*6 .*PQRST***
IX6 X3+X4 O*PQRST***
SA6 A6+B1
NZ B7,OCT1 IF MORE WORDS TO CONVERT
MX6 0
SA6 A6+B1
WRITEW F,BUF,A6-BUF+1
JP OCTX RETURN
* LIST MEMORY WITH DISPLAY CODE INTERPRETATION.
OCT2 RJ WOD CONVERT WORD TO OCTAL DISPLAY CODE
SA6 A6+1
SA7 A6+1
OCT3 SA1 A1+1 NEXT DUMP BLOCK
RJ WOD CONVERT WORD TO OCTAL DISPLAY CODE
SB7 B7-1
ZR B7,OCT4 IF END OF NUMBER FORMATTING
SB2 3
SB3 B2-B7
RJ DCK
JP OCT3 PROCESS NEXT WORD
OCT4 SB6 B1
SA1 A0-B1
SB3 3
OCT5 SA1 A1+B1
BX6 X1
SA1 A1+B1
BX7 X1
RJ DCK
SB6 B6-B1
SB7 B7-B1
SB3 4
PL B6,OCT5 IF MORE COMMENTS
MX6 0
SX7 B0
RJ DCK FLUSH BUFFER AND ADD TERMINATING BYTE
SA1 DC DETERMINE FILE TYPE
SX1 X1
SX2 6
AX1 1
IX1 X1*X2
MX2 24
SA1 BUF+1+X1
BX6 X2*X1 SET TERMINATION BYTE
SA6 A1
WRITEW F,BUF,A6-BUF+1
JP OCTX RETURN
OCTA BSS 0
VFD 24/1H ,30/0,6/1H
VFD 30/0,6/1H ,24/0
VFD 18/1H ,6/0,6/1H ,30/0
OCTB CON 1H
PEP SPACE 4,20
** PEP - PREPARE EXCHANGE PACKAGE.
*
* ENTRY (A0)= FL FROM DUMP FILE.
*
* EXIT (EPB - EPB+17B)= EXCHANGE PACKAGE.
* (EPB+20B - EPB+27B)= ((A REGISTERS))
* (EPB+30B - EPB+31B)= (RA), (RA+1).
*
* USES X - 1, 2, 5, 6, 7.
* A - 1, 2, 5, 6, 7.
* B - 7.
*
* CALLS ROW.
*
* MACROS READW, RECALL, RPHR.
PEP SUBR ENTRY/EXIT
RECALL D
SA2 D+1 EMPTY BUFFER
RJ EBF
SX6 1 READ EXCHANGE PACKAGE
SA6 D+6
RPHR D,R
SA1 D SET EOR TO PREVENT READ-AHEAD
SX6 20B
MX5 0 INITIALIZE A REGISTER INDEX
BX7 X1+X6
SA7 A1+
READW A1,EPB,20B
SA2 D+1 EMPTY BUFFER
RJ EBF
SX6 3 READ (RA), (RA+1)
SA6 D+6
RPHR D
READW D,EPB+30B,B1+B1
SA5 EPB READ (A0)
PEP1 AX5 18 READ ((AN))
SB7 X5+1 CHECK WORD IN RANGE
SX5 X5
BX6 X6-X6
SB7 A0-B7
NG X5,PEP2 IF WORD OUT OF RANGE
NG B7,PEP2 IF WORD OUT OF FL
RJ ROW READ WORD
PEP2 SA6 A5+20B STORE ((AN))
SB7 A5-EPB-7
SA5 A5+1 READ NEXT REGISTER
NG B7,PEP1 IF NOT END OF A REGISTERS
JP PEPX RETURN
RMW SPACE 4,15
** RMW - READ MEMORY WORDS.
*
* ENTRY (X1) = SOURCE - WORD COUNT.
* (B6) = DESTINATION.
* (B7) = WORD COUNT. (MULTIPLE OF 2).
*
* EXIT (X1) = 0.
*
* USES X - 1, 2, 3, 6, 7.
* A - 2, 3, 6, 7.
* B - 2, 3, 4, 7.
RMW1 SA2 A2+B2 MOVE 2 WORDS
SA3 A3+B2
SB7 B7-B2
NO
RMW2 BX6 X2
LX7 X3
SA6 A2+B4
SA7 A3+B4
NZ B7,RMW1 IF NOT END OF WORDS
BX1 X1-X1
RMW SUBR ENTRY/EXIT
SB3 X1+B7 SET MOVE DIFFERENTIAL
SB2 B1+B1
SA2 B3 READ FIRST 2 WORDS
SA3 B3+B1
SB4 B6-B3
SB7 B7-B2
EQ RMW2 ENTER LOOP
RNC SPACE 4,15
** RNC - READ NEXT CORRECTION.
*
* ENTRY NONE.
*
* EXIT (X1)" 0 IF EOR/EOF/EOI ENCOUNTERED.
* (CC)= 0.
*
* USES X - 1, 6.
* A - 6.
*
* MACROS READS.
RNC1 SA6 CC RESET CURRENT COLUMN
SX1 0 INDICATE NO EOR
RNC SUBR ENTRY/EXIT
READS F,BUF,90 READ CORRECTION
NZ X1,RNCX IF EOR
SX1 B6-BUF-73
SX6 0
NG X1,RNC1 IF CORRECTION ENDS BEFORE COL. 73
SA6 BUF+72 TERMINATE CORRECTION AT COLUMN 73
JP RNC1 NORMAL EXIT
ROW SPACE 4,15
** ROW - READ ONE WORD FROM DUMP FILE.
*
* ENTRY (X5)= ADDRESS.
*
* EXIT (X6)= WORD.
*
* USES X - 0, 1, 2, 6, 7.
* A - 1, 2, 6, 7.
* B - 7.
*
* MACROS READW, RECALL, RPHR.
ROW2 SA1 X5+ READ WORD
BX6 X1
ROW SUBR ENTRY/EXIT
SB7 X5-DMPL
PL B7,ROW2 IF WORD IN MEMORY
SA1 DI CHECK WORD IS IN BUFFER
SX7 X5+300B
AX7 6
BX2 X1-X7
ZR X2,ROW1 IF IN BUFFER
SA7 A1 SET NEW DISK INDEX
BX0 X7
RECALL D
SA2 D+1 EMPTY BUFFER
RJ EBF
BX6 X0 READ PROPER PRU
SA6 D+6
RPHR D,R
SA1 D SET EOR
SX6 20B
BX7 X1+X6
SA7 A1
READW D,PBF,100B
ROW1 MX7 -6 READ WORD
BX7 -X7*X5
SA1 PBF+X7
BX6 X1
JP ROWX RETURN
SDC SPACE 4,15
** SDC - SET DISABLE TERMINAL CONTROL.
*
* ENTRY (B2) .EQ. 0, SET *DISTC* FLAG OPTION.
* (B2) .NE. 0, SET *DISTC* EXCHANGE OPTION.
* (B3) .EQ. EXCHANGE ADDRESS IF (B2) .NE. 0.
*
* EXIT DISABLE TERMINAL CONTROL SELECTED WHERE APPROPRIATE.
* TICF = FLAG OPTION ADDRESS, IF FLAG OPTION SELECTED.
*
* USES X - 1, 2.
* A - 1.
*
* MACROS DISTC.
SDC1 DISTC ON,TICF SELECT FLAG OPTION
SDC SUBR ENTRY/EXIT
SA1 JOPR GET JOB ORIGIN
AX1 24 CHECK FOR *TXOT* ORIGIN TYPE
SX2 X1-TXOT
NZ X2,SDCX IF JOB NOT *TXOT* ORIGIN
ZR B2,SDC1 IF FLAG OPTION SELECTED
DISTC ON,B3,EX SELECT EXCHANGE OPTION
EQ SDCX EXIT
SHI SPACE 4,10
** SHI - SET HEADER INFORMATION.
*
* EXIT VERSION, DATE, TIME SET IN HEADER LINE.
*
* MACROS CLOCK, DATE, VERSION.
SHI SUBR ENTRY/EXIT
CLOCK TIME
DATE DATE
VERSION SHIA
EQ SHIX RETURN
SHIA VFD 12/10,12/0,12/0,6/,18/VERW
SHL SPACE 4,15
** SHL - SET HEADER LINE.
*
* ENTRY (P1)= FWA.
* (P2)= LWA.
* (DMPFL) = DUMP FILE FL.
* (ECSFL) = DUMP FILE EXTENDED MEMORY FL.
* (VERF) = FWA OF DUMP HEADER.
* (VERL) = LENGTH OF DUMP HEADER.
*
* USES X - 0, 1, 2, 3, 6, 7.
* A - 1, 2, 3, 6, 7.
* B - 5.
*
* CALLS COD.
*
* MACROS WRITEW.
SHL1 WRITEW F,SHLB,SHLBL *NO FIELD LENGTH TO DUMP.*
SHL SUBR ENTRY/EXIT
SA1 DMPFL CHECK FL
SA2 ECSFL
IX6 X1+X2
ZR X6,SHL1 IF NO FL TO DUMP
SA2 DC TRUNCATE FIRST WORD ADDRESS
SA1 P1
AX2 18
SB5 X2 DUMP CONTROL SHIFT COUNT
AX3 X1,B5
LX6 X3,B5
SA6 A1
RJ COD
SA2 SHLA+1
MX7 -5*6
SA1 A2+B1
LX6 -12
BX7 -X7*X6 MOST SIGNIFICANT 5 DIGITS
MX0 2*6
BX0 X0*X6 LEAST 2 SIGNIFICANT DIGITS
IX7 X7+X2
BX0 X0+X1
SA1 P2 LWA
SA7 A2 UPDATED SECOND WORD OF HEADER MESSAGE
AX3 X1,B5
LX7 X3,B5
SA7 A1
RJ COD
MX7 -4*6
LX6 -18
MX1 3*6
BX7 -X7*X6 MOST SIGNIFICANT FOUR DIGITS
SA2 SHLA+3
IX7 X7+X0
BX6 X1*X6 LEAST SIGNIFICANT THREE DIGITS
SA7 SHLA+2 UPDATED THIRD WORD OF HEADER MESSAGE
IX6 X6+X2
SA6 A7+B1 UPDATED FOURTH WORD OF HEADER MESSAGE
SA1 VERF GET FWA OF HEADER
SA3 VERL GET LENGTH OF HEADER
WRITEW F,X1,X3
WRITEW X2,SHLA,SHLAL
JP SHLX RETURN
SHLA DATA 10H CM DUMP
DATA 5LFROM
VFD 12/0,24/4H TO ,24/0
VFD 18/0,6/1H.,36/0
SHLAL EQU *-SHLA
SHLB DATA C*1NO FIELD LENGTH TO DUMP.*
SHLBL EQU *-SHLB
SUE SPACE 4,20
** SUE - SET USER EM SHIFT COUNT.
*
* ENTRY NONE.
*
* EXIT (UESC) = USER EM SHIFT COUNT FROM CMR.
*
* USES X - 0, 1, 6.
* A - 1, 6.
*
* MACROS SYSTEM.
SUE SUBR ENTRY/EXIT
SYSTEM RSB,R,SUEA
SA1 UESC
LX1 0-33
MX0 -3
BX6 -X0*X1
SA6 A1
EQ SUEX USER EM SHIFT COUNT SAVED
SUEA VFD 24/1,18/MEFL,18/UESC
WPT SPACE 4,20
** WPT - WRITE PREFIX TABLE.
*
* ENTRY (A0) = CM FIELD LENGTH.
* (BHDW) = DUMP RECORD NAME.
* (DATE, TIME) = DUMP DATE AND TIME.
*
* EXIT (A0) = UNCHANGED.
* (X2) = DUMP FILE FET ADDRESS.
* PREFIX TABLE WRITTEN TO DUMP FILE.
*
* USES X - 1, 2, 6, 7.
* A - 1, 2, 6, 7.
* B - 2.
*
* CALLS EBF, SFN.
*
* MACROS RECALL, RPHR, WRITEW.
WPT SUBR ENTRY/EXIT
MX1 16B CLEAR BUFFER
BX6 X6-X6
SA6 BUF
WPT1 LX1 1
SA6 A6+B1
NG X1,WPT1 IF NOT ALL CLEARED
SX1 0016B BUILD PREFIX HEADER
MX6 6 7700
LX1 47-11
SA2 BHDW DUMP NUMBER
BX6 X6+X1
BX7 X2
SA6 BUF STORE PREFIX TABLE HEADER
SA1 TIME
SA7 A6+B1 STORE DUMP NUMBER
SA2 DATE
BX6 X1
BX7 X2
SA7 BUF+2 STORE DATE
SA6 A7+B1 STORE TIME
RECALL D
SA2 X2+B1
RJ EBF EMPTY BUFFER
SX6 3 PRU OF FWA OF CM
SA6 D+6
SB2 A0
ZR B2,WPT3 IF NO FIELD LENGTH
RPHR D,R
SA1 DBUF+PGNR GET COMMAND NAME
MX2 42
BX1 X2*X1
RJ SFN BLANK FILL COMMAND NAME
SA6 BUF+4
SA6 BUF+10B
* COPY *CCDR* TO COMMENT FIELD.
SA1 DBUF+CCDR
SB2 B0
MX2 6
WPT2 BX6 X1
LX2 1
SA6 BUF+11B+B2
SA1 A1+B1
SB2 B2+B1
NG X2,WPT2 IF MORE TO MOVE
WPT3 WRITEW F,BUF,17B WRITE PREFIX TABLE
EQ WPTX RETURN
WTF SPACE 4,15
** WTF - WRITE MEMORY TO FILE.
*
* ENTRY (X0)= FWA FOR WRITE.
* (X5)= NUMBER OF WORDS TO WRITE.
*
* EXIT NONE.
*
* USES X - 0, 1, 2, 5, 6, 7.
* A - 1, 2, 6.
* B - 5, 6, 7.
*
* CALLS EBF.
*
* MACROS READ, READW, RECALL, WRITER, WRITEW.
WTF SUBR ENTRY/EXIT
SB7 X0-DMPL
PL B7,WTF5 IF MEMORY WRITE
RECALL D
SA2 D+1 EMPTY BUFFER
RJ EBF
SX6 X0+300B POSITION TO FWA
AX6 6
SA6 D+6
READ D
MX6 -6
BX7 -X6*X0
ZR X7,WTF1 IF FWA=0
READW D,BUF,X7
WTF1 SX5 X5-100B
NG X5,WTF2 IF < 100 WORDS TO WRITE
READW D,BUF,100B
NZ X1,WTF4 IF EOR
WRITEW F,BUF,100B
SX0 X0+100B ADVANCE WRITE ADDRESS
JP WTF1 LOOP TO END
WTF2 SX5 X5+100B
SB7 X0-DMPL-1 FIND NUMBER OF WORDS TO DMP=
SX6 X5+B7
PL X6,WTF3 IF MEMORY INCLUDED IN WRITE
MX6 -1
SB7 X5-1
ZR X5,WTF8 IF NO WORDS TO WRITE
WTF3 SX5 X6+B1
SX0 B7+B1
READW D,BUF,B7+B1
WRITEW F,BUF,X0
SX0 DMPL
JP WTF5 WRITE FROM MEMORY
WTF4 SX6 B6-BUF
SX5 X5+100B
ZR X6,WTF5 IF NO DATA TRANSFERRED ON LAST READ
IX5 X5-X6
IX0 X0+X6
WRITEW F,BUF,X6
WTF5 SB7 X5-7
NG B7,WTF6 IF .LT. 7 WORDS
WRITEW F,X0,B7 WRITE ALL BUT LAST 7 WORDS
IX0 X0+X5 SET NEW WRITE ADDRESS
SX5 7
IX0 X0-X5
WTF6 ZR X5,WTF8 IF NO WORDS TO TRANSFER
SB6 X0 STARTING ADDRESS
SB7 X5 WORD COUNT
SB5 B0+
WTF7 SA1 B6+B5 MOVE LAST WORDS
BX6 X1
SA6 BUF+B5
SB5 B5+B1
LT B5,B7,WTF7 IF NOT END OF MOVE
WRITEW F,BUF,X5
WTF8 WRITER F
JP WTFX RETURN
SPACE 4
* COMMON DECKS.
*CALL,COMCSYS
*CALL,COMCCIO
*CALL,COMCCPM
*CALL COMCCVL
*CALL,COMCRDW
*CALL,COMCWTW
*CALL,COMCDXB
*CALL,COMCCOD
*CALL,COMCRDS
*CALL,COMCWOD
*CALL,COMCSTF
*CALL,COMCLFM
*CALL COMCSFM
*CALL,COMCSFN
BUFFS TITLE BUFFERS.
* BUFFERS.
BUFFERS BSS 0
USE //
SEG
BUF BSS 90D WORKING BUFFER
BUF1 BSS 4 DUMP ASSEMBLY BUFFER 1
BUF2 BSS 4 DUMP ASSEMBLY BUFFER 2
DBUF BSS DBUFL DM* FILE BUFFER / ECS DUMP BUFFER
PBF BSS 100B DUMP FILE PRU BUFFER
EPB BSS 20B+10B+2 EXCHANGE PACKAGE, ((AN)), (RA), (RA+1)
FBUF BSS FBUFL USER FILE BUFFER
BSS 10B ALLOW FOR *COMCRDW* READ AHEAD
SBUF EQU BUF1-24 BUF+67-STRING BUFFER FOR DISPLAY CODE
*
* MACHINE DUMP BUFFERS OVERLAY THOSE ABOVE.
*
PBUF EQU BUF *SFM* BUFFER
MBUF EQU PBUF+PBUFL DUMP FILE BUFFER
ERRNG *-MBUF-MBUFL-10
IDENT
.1 SET *+77B
DMP= EQU .1/100B+10000B
DMPL EQU .1/100B*100B END OF MEMORY CONTAINED IN FILE
MFL= EQU DMPL
SSJ= EQU 0
END