plato:source:plaopl:ecprt
Table of Contents
ECPRT
Table Of Contents
- [00003] ECPRT ECS DUMP INTERPRETER
- [00004] DEFINITIONS
- [00039] LOCAL MACROS
- [00077] INITIALIZATIONS
- [00200] FORMAT AND PRINT ECS DUMP
- [00389] OUTPUT ROUTINES
- [00456] COMMON DECKS
- [00471] STORAGE DEFINITIONS
Source Code
- ECPRT.txt
- ECPRT
- IDENT ECPRT,111B,ECPRT
- TITLE ECPRT ECS DUMP INTERPRETER
- TITLE DEFINITIONS
- *
- * COMMENT COPYRIGHT CONTROL DATA CORP. 1978.
- *COMMENT ECPRT - PLATO ECS DUMP PRINTER.
- *
- * **************************************************
- *
- *
- * CONTROL CARD FORMAT -
- *
- * ECPRT(DUMP FILE,FWA,LWA)
- *
- *
- * THIS PROGRAM ASSUMES THE DUMP FILE HAS BEEN
- * DUMPED USING ECDMP OR THE CONTENTS CONSISTS
- * OF A SERIES OF 1000B WORD RECORDS WITH A
- * HEADER RECORD CONTAINING THE JOB NAME, DATE
- * AND TIME OF THE DUMP.
- *
- *
- * **************************************************
- *
- *
- ABS
- SST
- SYSCOM B1
- *
- *
- *CALL COMCMAC
- *
- *
- DDSIZ EQU 1000B DUMP FILE BLOCK SIZE (WORDS)
- DDSEC EQU DDSIZ/100B+1 BLOCK SIZE (SECTORS)
- CIOLTH EQU DDSIZ+1 DUMP FILE CIO BUFFER SIZE
- CIOLTH1 EQU 301B OUTPUT FILE CIO BUFFER SIZE
- TITLE LOCAL MACROS
- *
- *
- * OUTPUT - PRINT LINE OF OUTPUT
- *
- * P1 = ADDRESS OF STRING TO BE PRINTED
- *
- PURGMAC OUTPUT
- OUTPUT MACRO P1
- SB2 P1
- RJ WRITE
- ENDM
- *
- *
- * PACK - PACK CHARACTER BUFFER INTO WORD BUFFER
- *
- * P1 = ADDRESS OF CHARACTER BUFFER
- * P2 = ADDRESS OF WORD BUFFER
- *
- PURGMAC PACK
- PACK MACRO P1,P2
- SB2 P1
- SB3 P2
- RJ PACK
- ENDM
- *
- *
- * UNPACK - UNPACK WORD BUFFER INTO CHARACTER BUFFER
- *
- * P1 = ADDRESS OF WORD BUFFER
- * P2 = ADDRESS OF CHARACTER BUFFER
- *
- PURGMAC UNPACK
- UNPACK MACRO P1,P2
- SB2 P1
- SB3 P2
- RJ UNPACK
- ENDM
- TITLE INITIALIZATIONS
- *
- *
- *
- ORG 111B
- *
- ENTRY ECPRT
- ENTRY ARG= CRACK OWN CONTROL CARD
- ARG= EQU *
- *
- ECPRT SB1 1
- *
- * CRACK CONTROL CARD - IMAGE IS IN *CCDR*
- *
- UNPACK CCDR,CHARS
- *
- * ZERO ALL DELIMITING CHARACTERS SO PACK WILL WORK
- *
- SA1 CHARS-1
- SX2 1R(
- SX3 1R,
- SX4 1R.
- SX5 1R)
- CCC1 SA1 A1+B1 GET NEXT CHARACTER
- ZR X1,CCCX END-OF-LINE
- IX6 X1-X4
- NZ X6,CCC3 NOT EOL DELIMITER
- CCC2 SA6 A1 CLEAR CHARACTER
- EQ CCCX
- CCC3 IX6 X1-X5
- ZR X6,CCC2 IF EOL DELIMITER
- IX6 X1-X2
- ZR X6,CCC4 IF DELIMITER
- IX6 X1-X3
- ZR X6,CCC4 IF DELIMITER
- EQ CCC1 GET NEXT CHARACTER
- CCC4 SA6 A1 CLEAR DELIMITER
- EQ CCC1 GET NEXT CHARACTER
- CCCX PACK CHARS,WORK PACK UP STATEMENT NAME (*ECPRT*)
- SB2 B2+B1 ADVANCE CHARACTER POINTER
- PACK B2,ARGR PACK DUMP FILE NAME
- SB2 B2+B1
- PACK B2,ARGR+1 PACK FWA OF DUMP
- SB2 B2+B1
- PACK B2,ARGR+2 PACK LWA OF DUMP
- *
- * PROCESS 1ST ARGUMENT = DUMP FILE NAME
- *
- MX0 42 X0 = ARGUMENT MASK
- SA1 ARGR LOAD DUMP FILE ARGUMENT
- BX1 X0*X1
- ZR X1,ARGERR
- SA2 DFET
- BX2 -X0*X2 CLEAR OUT FILE NAME IN FET
- BX6 X1+X2
- SA6 A2 SET FILE NAME IN 1ST WD OF FET
- *
- * PROCESS 2ND ARGUMENT = FWA FOR PRINT
- *
- SA1 ARGR+1 LOAD FWA ARGUMENT
- MX0 48
- BX5 X0*X1
- SB7 B0 OCTAL DIGITS ONLY
- RJ DXB CONVERT TO OCTAL
- NZ X4,ARGERR IF CONVERSION ERROR
- NG X6,ARGERR IF BAD ADDRESS
- * MUST ROUND ADDRESS DOWN TO NEAREST 4 WORDS TO BE
- * SURE THAT BLOCK BOUNDARIES OCCUR AT END OF LINE
- AX6 2 ROUND TO 4 WORD BLOCK
- LX6 2
- SA6 DFWA SET FWA OF ECS PRINT
- *
- * PROCESS 3RD ARGUMENT = LWA OF PRINT
- *
- MX0 48
- SA1 ARGR+2 LOAD LWA ARGUMENT
- BX5 X0*X1
- SB7 B0 OCTAL DIGITS ONLY
- RJ DXB CONVERT TO OCTAL
- NZ X4,ARGERR IF CONVERSION ERROR
- NG X6,ARGERR IF BAD ADDRESS
- * MUST ROUND ADDRESS UP TO NEAREST 4 WORDS TO BE
- * SURE THAT BLOCK BOUNDARIES OCCUR AT END OF LINE
- SX1 3
- IX6 X6+X1
- AX6 2
- LX6 2
- SA6 DLWA SET LWA OF ECS PRINT
- SA1 DFWA
- IX1 X1-X6 CHECK LWA LEGAL
- PL X1,ARGERR
- *
- *
- * OPEN INPUT / OUTPUT FILES
- *
- OPEN DFET,READNR,RECALL
- RECALL DFET
- REWIND DFET MAKE SURE AT FIRST RECORD
- RECALL DFET
- READ DFET READ HEADER RECORD
- RECALL DFET
- OPEN OUTPUT,WRITENR,RECALL
- *
- SA1 DFWA SET CURRENT BLOCK NUMBER
- BX6 X1
- AX6 9
- SA6 DII
- SA1 DFWA SET WORD POINTER
- MX0 -9
- BX6 -X0*X1
- SA6 DJJ
- EQ PRT100
- *
- *
- ARGERR MESSAGE ARGMES,0,RECALL
- ENDRUN
- *
- ARGMES DIS ,*ARGUMENT ERROR*
- *
- TITLE FORMAT AND PRINT ECS DUMP
- *
- *
- *
- * FORMAT AND PRINT DUMP HEADER
- *
- PRT100 OUTPUT EJECT
- OUTPUT MARG
- UNPACK MARG,CHARS
- UNPACK HEADER1,B3
- UNPACK CIOBUFF,B3 SET JOB NAME
- UNPACK HEADER2,B3
- MX6 0
- SA6 WORK+1 INSURE END-OF-LINE
- SA1 CIOBUFF+1
- BX6 X1 SET DATE OF DUMP
- SA6 WORK
- UNPACK WORK,B3
- SA1 CIOBUFF+2
- BX6 X1 SET TIME OF DUMP
- SA6 WORK
- UNPACK WORK,B3
- PACK CHARS,LINE
- OUTPUT LINE
- OUTPUT MARG
- EQ PRT210
- *
- *
- * READ NEXT BLOCK FROM DUMP FILE
- *
- PRT200 SA1 DII INCREMENT CURRENT BLOCK NUMBER
- SX6 B1
- IX6 X1+X6
- SA6 A1
- MX6 0 RESET WORD POINTER
- SA6 DJJ
- *
- PRT210 MX0 42 SET UP CIO FET POINTERS
- SX7 CIOBUFF
- SA7 DFET+2 IN = CIO BUFFER
- SA7 A7+B1 OUT = CIO BUFFER
- SA1 DII CURRENT BLOCK NUMBER
- SX6 DDSEC SECTORS/DUMP BLOCK
- IX6 X1*X6
- SX1 2 SYSTEM AND HEADER SECTORS
- IX6 X6+X1
- SA6 DFET+6 SET RELATIVE SECTOR ADDRESS
- READ DFET,R READ BLOCK
- RECALL DFET
- SA1 DFET+2 CHECK FOR EMPTY RECORD
- SX2 X1-CIOBUFF
- ZR X2,PRT900 IF END OF RECORD/FILE ONLY
- *
- *
- * CHECK FOR ECS PARITY ERROR RECORD
- *
- SA1 CIOBUFF
- SA2 ERR
- BX1 X1-X2
- NZ X1,PRT230 IF NOT ECS ERROR RECORD
- SA1 A1+B1
- SA2 A2+B1
- BX1 X1-X2
- NZ X1,PRT230 IF NOT ECS ERROR RECORD
- OUTPUT ECSMES
- SX6 DDSIZ SKIP THIS BLOCK
- SA6 DJJ
- EQ PRT270
- *
- *
- ERR DIS ,/*** ECS ERROR ***/
- *
- *
- * FORMAT AND PRINT NEXT BLOCK OF DUMP FILE
- *
- PRT230 UNPACK FIRST,CHARS
- SB7 B3 B7 = POINTER TO NEXT CHARACTER
- SA1 DII CURRENT BLOCK NUMBER
- LX1 9 FWA OF CURRENT BLOCK
- SA2 DJJ COMPUTE CURRENT WORD ADDRESS
- SX0 X2-DDSIZ
- PL X0,PRT200 IF DONE WITHTHIS BLOCK
- SB6 X2 B6 = CURRENT WORD POINTER
- IX1 X1+X2
- RJ WOD CONVERT ADDRESS TO OCTAL
- MX0 48
- LX7 12 POSITION LAST 8 DIGITS
- BX7 X0*X7
- SA7 WORK
- UNPACK WORK,B7
- UNPACK MARG,B3
- SB7 B3 B7 = POINTER TO NEXT CHAR
- MX7 0
- SA7 WORK+2 INSURE END-OF-LINE
- SB5 4 B5 = END TEST WITHIN LINE
- *
- PRT240 SA1 B6+CIOBUFF
- BX6 X1
- SA6 B5+THIS-1 SAVE CURRENT LINE CONTENTS
- RJ WOD CONVERT NEXT WORD TO OCTAL
- SA6 WORK
- SA7 WORK+1
- UNPACK WORK,B7
- UNPACK FIRST,B3
- SB7 B3 B7 = POINTER TO NEXT CHARACTER
- SB6 B6+B1 ADVANCE WORD POINTER
- SB5 B5-B1
- NZ B5,PRT240
- UNPACK FIRST,B3
- SB5 4 RE-SET END-TEST
- SB6 B6-4 RE-SET WORD POINTER
- *
- PRT250 SA1 B6+CIOBUFF
- RJ ZTB CHANGE ZERO CODES TO BLANKS
- SA6 WORK+1
- UNPACK WORK+1,B3
- SB6 B6+B1 ADVANCE WORD POINTER
- SB5 B5-B1
- NZ B5,PRT250
- SX6 B6 UPDATE WORD POINTER
- SA6 DJJ
- PACK CHARS,LINE
- *
- *
- * COMPARE LAST LINE PRINTED AND CURRENT LINE TO
- * SEE IF WE SHOULD START/CONTINUE SKIPPING LINES
- *
- SA1 LINES
- ZR X1,PRT260 ALWAYS PRINT FIRST LINE
- SB2 3
- *
- PRT251 SA1 LAST+B2
- SA2 THIS+B2
- BX2 X1-X2
- NZ X2,PRT260 IF NOT SAME AS LAST LINE
- SB2 B2-B1
- PL B2,PRT251
- SA1 SKIP
- NZ X1,PRT270 IF ALREADY SKIPPING LINES
- SX6 B1 FLAG LINES BEING SKIPPED
- SA6 A1
- OUTPUT DUPMES
- EQ PRT270
- *
- PRT260 OUTPUT LINE OUTPUT NEXT LINE
- SA1 LINES INCREMENT LINE COUNT
- SX6 B1
- IX6 X1+X6
- SA6 A1
- SB2 3 MOVE THIS LINE TO LAST PRINTED
- *
- PRT261 SA1 THIS+B2
- BX6 X1
- SA6 LAST+B2
- SB2 B2-B1
- PL B2,PRT261
- MX6 0 NOT SKIPPING LINES
- SA6 SKIP
- *
- PRT270 SA1 DII COMPUTE CURRENT DUMP ADDRESS
- LX1 9
- SA2 DJJ
- IX6 X1+X2
- SA2 DLWA CHECK IF END OF SPECIFIED AREA
- IX0 X2-X6
- PL X0,PRT230
- *
- *
- * END OF PRINT - CLOSE INPUT/OUTPUT FILES
- *
- PRT900 OUTPUT MARG
- UNPACK MARG,CHARS
- SA1 LINES
- RJ WOD
- SA7 WORK
- MX6 0
- SA6 A7+B1
- UNPACK WORK,B3
- UNPACK LINMES,B3
- PACK CHARS,LINE
- OUTPUT LINE
- WRITER OUTPUT,RECALL
- CLOSE OUTPUT,NR,RECALL
- CLOSE DFET,NR,RECALL
- MESSAGE ENDMES,1,RECALL
- ENDRUN
- *
- ENDMES DIS ,*PRINT COMPLETE*
- *
- TITLE OUTPUT ROUTINES
- *
- *
- *
- * -WRITE- WRITE TO OUTPUT FILE
- * ON ENTRY - B2 = ADDRESS OF LINE TO OUTPUT
- *
- WRITE EQ *
- SA1 B2 CHECK FOR EMPTY LINE
- ZR X1,WRITE
- SX5 B2 X5 = ADDRESS OF LINE
- WRITEC OUTPUT,X5 WRITE LINE TO OUTPUT FILE
- EQ WRITE
- *
- *
- *
- * -UNPACK- UNPACK CHARACTERS
- * ON ENTRY - B2 = ADDRESS TO UNPACK FROM
- * B3 = ADDRESS TO UNPACK TO
- *
- UNPACK EQ *
- MX0 -6 X0 = MASK FOR NEXT CHARACTER
- *
- UNP10 SA1 B2 LOAD NEXT PACKED TEXT WORD
- SB2 B2+B1
- SB4 10 INITIALIZE CHARACTER COUNT
- *
- UNP20 SB4 B4-B1 CHECK CURRENT WORD EMPTY
- NG B4,UNP10
- LX1 6 POSITION NEXT CHARACTER
- BX6 -X0*X1
- SA6 B3 STORE NEXT CHARACTER
- ZR X6,UNP30 CHECK FOR END-OF-LINE
- SB3 B3+B1 ADVANCE OUTPUT POINTER
- EQ UNP20
- *
- UNP30 SA6 A6+B1 STORE END-OF-LINE
- SA6 A6+B1
- EQ UNPACK
- *
- *
- *
- * -PACK- PACK CHARACTERS
- * ON ENTRY - B2 = ADDRESS TO PACK FROM
- * B3 = ADDRESS TO PACK TO
- *
- PACK EQ *
- PCK10 SB4 60-6 INITIALIZE SHIFT COUNT
- MX6 0 INITIALIZE WORD BUILDING
- *
- PCK20 SA1 B2 LOAD NEXT CHARACTER
- ZR X1,PCK30
- SB2 B2+B1 ADVANCE INPUT POINTER
- LX1 X1,B4 POSITION CHARACTER
- BX6 X1+X6
- SB4 B4-6 DECREMENT SHIFT COUNT
- PL B4,PCK20
- SA6 B3 STORE PACKED WORD
- SB3 B3+B1 ADVANCE OUTPUT POINTER
- EQ PCK10
- *
- PCK30 SA6 B3 STORE LAST WORD
- MX6 0
- SA6 A6+B1 INSURE END-OF-LINE
- EQ PACK
- *
- *
- TITLE COMMON DECKS
- LIST -X
- *
- *CALL COMCSYS
- *CALL COMCCIO
- *CALL COMCWTW
- *CALL COMCRDW
- *CALL COMCWTC
- *CALL COMCWOD
- *CALL COMCDXB
- *CALL COMCZTB
- *
- LIST *
- *
- *
- TITLE STORAGE DEFINITIONS
- *
- *
- *
- DFWA BSS 1 FWA OF DUMP AREA
- DLWA BSS 1 LWA OF DUMP AREA
- DII BSS 1 CURRENT BLOCK NUMBER
- DJJ BSS 1 WORD POINTER
- *
- WORK BSSZ 100B
- *
- HEADER1 DIS ,* DUMP OF *
- HEADER2 DIS ,* DUMPED ON *
- ECSMES DIS ,* DATA LOST DUE TO ECS ERROR*
- DUPMES DIS ,* DUPLICATED LINES*
- LINMES DIS ,*B LINES PRINTED*
- EJECT DATA 1L1 PAGE EJECT
- FIRST DATA 1L FIRST CHARACTER OF EACH LINE
- MARG DATA 2L MARGIN
- CHARS BSSZ 200
- LINE BSSZ 20
- THIS BSSZ 4 CONTENTS OF THIS LINE
- LAST BSSZ 4 CONTENTS OF LAST LINE PRINTED
- SKIP BSSZ 1 NON-ZERO IF SKIPPING LINES
- LINES BSSZ 1 LINES PRINTED
- *
- DFET RFILEB CIOBUFF,CIOLTH,FET=14
- OUTPUT FILEB CIOBUF1,CIOLTH1,FET=14B
- *
- CIOBUFF BSS CIOLTH
- *
- CIOBUF1 BSS CIOLTH1
- *
- *
- *
- ENTRY RFL=
- *
- RFL= END
plato/source/plaopl/ecprt.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator