Google
 

Trailing-Edge - PDP-10 Archives - BB-L014E-BM - autopatch/forfmt.c05
There are no other files named forfmt.c05 in the archive.
 REP 2/1	;05C1
		TV	FORFMT	FORMAT PROCESSOR,6(2033)

	;COPYRIGHT (C) 1981  BY  DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
 WIT
		TV	FORFMT	FORMAT PROCESSOR,6(2057)

	;COPYRIGHT (C) 1981,1982  BY  DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
 INS 128/1	;05C2
	***** End V6 Development *****

	2045	EGM	18-Mar-82
		Allow error ARC (Ambiguous repeat count in FORMAT) to continue.

	2051	TGS	26-Apr-82	10-32144
		Implement double-encoding word scheme to allow expanded field
		widths (total width and repeat count fields to 18 bits, decimal
		width to 6 and exponent to 4); implement range-checking with 
		"?Illegal field width" and %ABORT when fields are exceeded. Improve
		core usage by allocating a dynamically expandable encoding
		work area; saved formats save only the core they used.

	2057	TGS	25-May-82	20-17764
		Declare ENC.W2 INTERNAL so NMLST can clear it in FORCNV.

 INS 14/2	;05C3
		EXTERN	%MVBLK,%FAREA		;[2051]
 INS 18/2	;05C4
		INTERN	ENC.W2			;[2057]
 REP 4/3	;05C5
	FMT.LK:	0		;PNTR TO ENCODED LEFT PAREN (RH=LINK TO AFTER LOOP)
 WIT
	FMT.LK:	0		;[2051] PNTR TO ENCODED LEFT PAREN (OFFSET TO AFTER LOOP)
 INS 13/3	;05C6
	FASIZE:	BLOCK	1	;[2051] FORMAT AREA SIZE (WORDS)
	FMTMAX:	BLOCK	1	;[2051] STORES MAXIMUM FOR FIELD WIDTHS
 REP 19/3	;05C7
	ENC.WD:	0		;ENCODED FORMAT WORD
 WIT
	ENC.WD:	BLOCK	2	;[2051] ENCODED FORMAT WORD #1
	ENC.W2=ENC.WD+1		;[2051] WORD #2
 REP 5/4	;05C8
	WIDPNT:	POINT	8,ENC.WD,8	;TOTAL WIDTH OF FORMAT ELEMENT
					;AVOID BIT 0 SO IT WON'T BE NEGATIVE
					;AS NEGATIVE MEANS PAREN REPEAT
	RPTPNT:	POINT	12,ENC.WD,20	;REPEAT COUNT
	D.PNTR:
	DECPNT:	POINT	6,ENC.WD,26	;DECIMAL WIDTH
	X.PNTR:
	EWPNT:	POINT	3,ENC.WD,29	;EXPONENT WIDTH
	CODPNT:	POINT	6,ENC.WD,35	;FORMAT CODE (SIXBIT CHAR)
 WIT
	WIDPNT:	POINT	18,ENC.W2,35	;[2051] TOTAL WIDTH OF FORMAT ELEMENT
	FWMAX==777777			;[2051] RANGE CHECK
					;[2051] AVOID BIT 0 SO IT WON'T BE NEGATIVE
					;[2051] AS NEGATIVE MEANS LEFT PAREN WORD PAIR

	RPTPNT:	POINT	18,ENC.WD,35	;[2051] REPEAT COUNT
	RPTMAX==777777			;[2051] RANGE CHECK

	D.PNTR:				;[2051]
	DECPNT:	POINT	6,ENC.WD,11	;[2051] DECIMAL WIDTH
	DWMAX==77			;[2051] RANGE CHECK

	X.PNTR:				;[2051]
	EWPNT:	POINT	4,ENC.WD,5	;[2051] EXPONENT WIDTH
	EWMAX==17			;[2051] RANGE CHECK
					;[2051] AVOID SIGN BIT AS NEGATIVE
					;[2051] MEANS LEFT PAREN PAIR

	CODPNT:	POINT	6,ENC.WD,17	;[2051] FORMAT CODE (SIXBIT CHAR)
 REP 3/8	;05C9
	;WE GO ON TO FORMAT EXECUTION. OTHERWISE, WE ENCODE IT AND THEN
	;EXECUTE IT.
 WIT
	;[2051] WE GO ON TO FORMAT EXECUTION. OTHERWISE, WE GET AN ENCODING
	;[2051] AREA IF ONE DOES NOT ALREADY EXIST, ENCODE THE FORMAT, PERHAPS
	;[2051] SAVE IT, AND EXECUTE IT.  NOTE THAT, IN SAVING ENCODED FORMATS,
	;[2051] ONLY THE CORE ACTUALLY USED FOR ENCODING IS SAVED.

 REP 14/8	;05C10
		JUMPN	T1,NOENC		;GO EXECUTE IF ALREADY ENCODED
		PUSHJ	P,FMTENC		;ENCODE THE FORMAT
		MOVE	T1,USR.TY		;GET FORMAT TYPE
		CAIN	T1,TP%LBL		;LABEL?
		JRST	SAVENC			;YES. GO SAVE IT
		PUSHJ	P,FMTEXC		;NO. EXECUTE THE FORMAT
		MOVE	T1,ENC.AD		;FREE THE CORE WE GOT
		PJRST	%FREBL			;FREE IT UP

	SAVENC:	MOVE	T1,ENC.AD		;GET THE ENCODED ADDR
		MOVEM	T1,@SAV.EF		;SAVE IT ON LINKED LIST
	NOENC:	PJRST	FMTEXC			;EXECUTE THE FORMAT
 WIT
		JUMPN	T1,FMTEXC		;[2051] GO EXECUTE IF ALREADY ENCODED
		SKIPN	T1,%FAREA		;[2051] DO WE HAVE AN ENCODING AREA YET?
		 PUSHJ	P,GETFA			;[2051] NO, GO GET ONE
		MOVEM	T1,ENC.AD		;[2051] SAVE ITS ADDRESS
		PUSHJ	P,FMTENC		;[2051] ENCODE THE FORMAT
		MOVE	T1,USR.TY		;[2051] GET FORMAT TYPE
		CAIN	T1,TP%LBL		;[2051] LABELLED FORMAT?
		 PUSHJ	P,BLTFMT		;[2051] YES, SAVE IT SOMEWHERE
		PJRST	FMTEXC			;[2051] AND GO EXECUTE IT.

	;[2051] GET SOME ENCODING ROOM.
	GETFA:	MOVEI	T1,IFMTSZ		;[2051] GET ENCODING AREA SIZE
		MOVEM	T1,FASIZE		;[2051] SAVE IT
		PUSHJ	P,%GTBLK		;[2051] GET THAT AMOUNT OF CORE
		MOVEM	T1,%FAREA		;[2051] SAVE ITS ADDRESS
		POPJ	P,			;[2051]

	;[2051] USING THE SIZE OF THE CURRENTLY ENCODED FORMAT, GET A NEW BLOCK
	;[2051] THAT SIZE TO SAVE IT IN.  SAVE ITS ADDRESS AND LINK IT.
	BLTFMT:	XMOVEI	T1,1(P4)		;[2051] GET TOP+1 OF ENCODED FORMAT
		SUB	T1,ENC.AD		;[2051] GET # OF WORDS IN IT
		PUSHJ	P,%GTBLK		;[2051] GET A NEW BLOCK THAT SIZE
		MOVEM	T1,@SAV.EF		;[2051] SAVE ITS ADDRESS AND LINK IT
		HRRI	T2,(T1)			;[2051] PREPARE FOR MOVING IT
		HRL	T2,ENC.AD		;[2051] GET ADDRESS OF ENCODED DATA
		XMOVEI	P4,(P4)			;[2051] GET TOP, EXTENDED
		SUB	P4,ENC.AD		;[2051] GET # OF WORDS-1
		ADDI	P4,(T1)			;[2051] GET LAST ADDRESS
		BLT	T2,(P4)			;[2051] MOVE IT
		POPJ	P,			;[2051]
 REP 21/9	;05C11
	GOENC:	PUSHJ	P,FMTENC		;ENCODE THE FORMAT
		MOVE	T1,ENC.AD		;AND LINK INTO THE LIST
		MOVEM	T1,@SAV.EF
		POPJ	P,
 WIT
	GOENC:	SKIPN	T1,%FAREA		;[2051] DO WE HAVE AN ENCODING AREA?
		 PUSHJ	P,GETFA			;[2051] NO, GO GET ONE
		MOVEM	T1,ENC.AD		;[2051] SAVE ITS ADDRESS
		PUSHJ	P,FMTENC		;[2051] GO ENCODE IT
		PUSHJ	P,BLTFMT		;[2051] AND SAVE IT
		POPJ	P,			;[2051]
 REP 1/10	;05C12
	;THIS IS THE FORMAT ENCODER SETUP. THE SIZE OF THE CORE WE ALLOCATE
	;IS DETERMINED BY THE SIZE OF THE FORMAT STATEMENT OR ARRAY, IN
	;CHARACTERS. WHILE THIS IS AN INEXACT MEASURE (USUALLY MUCH MORE
	;THAN NECESSARY), IT IS AT LEAST SAFE, AND WE HAVE NO BETTER
	;WAY TO DO IT OTHER THAN DOING A PRESCAN OF THE FORMAT.
 WIT
	;[2051] THIS IS THE FORMAT ENCODER SETUP.  CORE FOR ENCODING HAS BEEN
	;[2051] ALLOCATED AT %FORMT, BEGINNING WITH A BLOCK OF IFMTSZ WORDS (A
	;[2051] FORPRM PARAMETER), AND EXPANDING DYNAMICALLY AS MORE ROOM
	;[2051] IS NEEDED.

 REP 10/10	;05C13
		ADDI	T1,%FMTEN+5		;PLUS A FEW FOR LINK, ADDR, & INDEF RPT
		MOVNI	P4,(T1)			;GET NEGATIVE SIZE
		HRLZI	P4,(P4)			;IN LEFT HALF FOR FORMAT LIST
		PUSHJ	P,%GTBLK		;GET SOME CORE
		HRRI	P4,-1(T1)		;CREATE A DECODED STACK PNTR
		MOVEM	T1,ENC.AD		;SAVE ADDR FOR EXECUTION
 WIT
		MOVN	P4,FASIZE		;[2051] GET NEG. SIZE OF FORMAT AREA
		HRLI	P4,(P4)			;[2051] IN LEFT HALF
		HRR	P4,ENC.AD		;[2051] CREATE A FORMAT PNTR
		SUBI	P4,1			;[2051] MAKE IT A PUSH PNTR
 REP 19/10	;05C14
		MOVEM	P4,FMT.LK		;SAVE THE CURRENT STACK PNTR
		MOVEI	T1,1(P4)		;GET ADDR FOR ENCODED CHARS
		MOVEM	T1,RPT.PT		;INIT INDEF RPT PNTR
 WIT
		XMOVEI	T1,(P4)			;[2051] GET ADDR OF CURRENT STACK PNTR
		SUB	T1,ENC.AD		;[2051] MAKE IT RELATIVE
		MOVEM	T1,FMT.LK		;[2051] SAVE THE STACK OFFSET
		ADDI	T1,1			;[2051] NEXT ADDRESS FOR ENCODED CHARS
		MOVEM	T1,RPT.PT		;[2051] SAVE IN INDEF RPT PNTR
 INS 11/11	;05C15
		SETZM	ENC.WD			;[2051] CLEAR ENCODING WORDS
		SETZM	ENC.W2			;[2051]
		MOVEI	T1,RPTMAX		;[2051] SETUP FOR REPEAT RANGE CHECK
		HRROM	T1,FMTMAX		;[2051] FLAG IT -1,,max AS REPEAT COUNT
 REP 32/12	;05C16
		 $ECALL	ARC,%ABORT			;NO, AMBIGUOUS REPEAT COUNT
		SKIPE	FMT.CH			;ANY LEFTOVER FORMAT CHAR?
		 PUSHJ	P,FMTCMP		;YES. COMPILE PREV FORMAT
		XMOVEI	T1,FMT.WD		;SET TO COLLECT FORMAT WIDTH
		MOVEM	T1,NUM.AD
 WIT
		 $ECALL	ARC			;[2045] NO, AMBIGUOUS REPEAT COUNT
		SKIPE	FMT.CH			;ANY LEFTOVER FORMAT CHAR?
		 PUSHJ	P,FMTCMP		;YES. COMPILE PREV FORMAT
		TXNN	P3,FDFLG		;[2051] DELIMITER?
		PUSHJ	P,CHKWID		;[2051] NO, CHECK FOR LEGAL RANGE
		XMOVEI	T1,FMT.WD		;SET TO COLLECT FORMAT WIDTH
		MOVEM	T1,NUM.AD
		MOVEI	T1,FWMAX		;[2051] SETUP FOR WIDTH RANGE CHECK
		MOVEM	T1,FMTMAX		;[2051]
 REP 60/12	;05C17
	ASMEXW:	XMOVEI	T1,FMT.EW		;ROUTE DIGITS TO EXP WIDTH
		MOVEM	T1,NUM.AD
 WIT
	ASMEXW:	PUSHJ	P,CHKWID		;[2051] CHECK RANGE
		XMOVEI	T1,FMT.EW		;ROUTE DIGITS TO EXP WIDTH
		MOVEM	T1,NUM.AD
		MOVEI	T1,EWMAX		;[2051] SETUP FOR EXPONENT RANGE CHECK
		MOVEM	T1,FMTMAX		;[2051]
 INS 73/12	;05C18

	;[2051] HERE TO CHECK WHETHER DIGIT ACCUMULATED IN PREVIOUS FIELD (I.E.
	;[2051] CURRENTLY POINTED TO BY NUM.AD) IS WITHIN RANGE.
	;[2051] FMTMAX WILL CONTAIN -1,,max IF THE FIELD BEING CHECKED IS
	;[2051] THE REPEAT COUNT, OTHERWISE 0,,max.

	CHKWID:	HRRZ	T1,FMTMAX		;[2051] GET CURRENT MAXIMUM
		CAML	T1,@NUM.AD		;[2051] IS ACC COUNT OUT OF RANGE?
		 POPJ	P,			;[2051] NO, RETURN
		SKIPL	FMTMAX			;[2051] YES, REPEAT COUNT THE CULPRIT?
		 $ECALL	IFW,%ABORT		;[2051] NO, SOME OTHER FIELD
		$ECALL	IRC,%ABORT		;[2051] YES, SAY SO

 REP 22/14	;05C19
	FMTOK:	SETZM	ENC.WD			;CLEAR THE ENCODED WORD
		SKIPGE	T1,FMT.WD		;FIELD WIDTH MUST BE POSITIVE
		 $ECALL	IFW,%ABORT		;NEGATIVE IS FATAL
		DPB	T1,WIDPNT		;RECORD IT
		MOVE	T2,FMT.DW		;GET DECIMAL WIDTH
		DPB	T2,DECPNT
		DMOVE	T1,FMT.EW		;AND EXPONENT WIDTH AND REPEAT COUNT
		DPB	T1,EWPNT
		DPB	T2,RPTPNT
		MOVE	T1,FMT.CH		;AND FORMAT CODE
		DPB	T1,CODPNT
		PUSH	P4,ENC.WD		;STORE WORD ON STACK
		PJRST	FMTINT			;INITIALIZE THE DATABASE
 WIT
	FMTOK:	PUSHJ	P,CHKWID		;[2051] CHECK RANGE
		SKIPGE	FMT.WD			;[2051] FIELD WIDTH MUST BE POSITIVE
		 $ECALL	IFW,%ABORT		;[2051] NEGATIVE IS FATAL
		SKIPE	T1,FMT.WD		;[2051] DONT'T SMASH ENC.W2 IF BYTE PTR
		DPB	T1,WIDPNT		;[2051] STORE IF NONZERO
		SKIPE	T1,FMT.DW		;[2051] GET DECIMAL WIDTH IF ANY
		DPB	T1,DECPNT		;[2051] STORE IT
		SKIPE	T1,FMT.EW		;[2051] GET EXPONENT WIDTH
		DPB	T1,EWPNT		;[2051] STORE
		SKIPE	T1,FMT.RP		;[2051] AND REPEAT COUNT
		DPB	T1,RPTPNT		;[2051] STORE
		MOVE	T1,FMT.CH		;[2051] & FORMAT CODE (NEVER ABSENT)
		DPB	T1,CODPNT		;[2051] STORE
		PUSH	P4,ENC.WD		;[2051] STORE BOTH WORDS ON STACK
		PUSH	P4,ENC.W2		;[2051] ENC.W2 MAY BE BYTE PTR NOW
		PUSHJ	P,STKCHK		;[2051] SEE IF ENOUGH ROOM ON ENCODING STK
		PJRST	FMTINT			;INITIALIZE THE DATABASE

	;[2051] HERE TO SEE IF WE HAVE RUN OUT OF ROOM IN THE CURRENTLY ASSIGNED
	;[2051] FORMAT ENCODING AREA.  IF SO, WE CALL %MVBLK TO ALLOCATE A NEW
	;[2051] ONE TWICE AS LARGE, MOVE THE ENCODED DATA, TOSS THE OLD AREA, AND
	;[2051] SET THE ENCODING PUSH PNTR (P4) APPROPRIATELY.
	STKCHK:	CAMG	P4,[-3,,0]		;[2051] LEAVE AT LEAST 3
		 POPJ	P,			;[2051] THAT'S ENOUGH FOR NOW
		MOVE	T1,%FAREA		;[2051] NEED ROOM. GET THE OLD ADDR
		MOVE	T2,FASIZE		;[2051] GET THE OLD SIZE
		MOVEI	T3,(T2)			;[2051] COPY IT
		LSH	T3,1			;[2051] DOUBLE IT
		PUSHJ	P,%MVBLK		;[2051] GET NEW ONE, BLT, TOSS OLD
		MOVEM	T1,ENC.AD		;[2051] SAVE FOR CURRENT ENCODING
		EXCH	T1,%FAREA		;[2051] SAVE NEW ADDR, GET OLD ONE
		SUB	T1,%FAREA		;[2051] GET OLD-NEW
		SUB	P4,T1			;[2051] FIXUP RH OF PUSH PNTR
		EXCH	T3,FASIZE		;[2051] SAVE NEW SIZE, GET OLD
		SUB	T3,FASIZE		;[2051] GET OLD-NEW
		HRLZI	T3,(T3)			;[2051] IN LEFT HALF
		ADD	P4,T3			;[2051] FIXUP LH OF PUSH PNTR
		POPJ	P,			;[2051]

 INS 6/16	;05C20
		PUSHJ	P,STKCHK		;[2051] CHECK FOR ROOM ON IT
 REP 22/16	;05C21
	PERENC:	SETZM	FMT.DW			;CLEAR DEC WIDTH
		XMOVEI	T1,FMT.DW		;POINT DIGACC AT DEC WIDTH
		MOVEM	T1,NUM.AD
 WIT
	PERENC:	PUSHJ	P,CHKWID		;[2051] CHECK RANGE
		SETZM	FMT.DW			;CLEAR DEC WIDTH
		XMOVEI	T1,FMT.DW		;POINT DIGACC AT DEC WIDTH
		MOVEM	T1,NUM.AD
		MOVEI	T1,DWMAX		;[2051] SETUP FOR DECIMAL WIDTH
		MOVEM	T1,FMTMAX		;[2051] RANGE CHECK
 REP 2/17	;05C22
	;ENCODED AS A WORD CONTAINING THE NEGATIVE OF ITS REPEAT COUNT
	;IN THE LEFT HALF, AND THE ADDRESS OF A "LINK" IN THE RIGHT HALF.
 WIT
	;[2051] ENCODED AS TWO WORDS CONTAINING THE NEGATIVE OF ITS REPEAT COUNT
	;[2051] IN THE FIRST WORD, AND THE ADDRESS OF A "LINK" IN THE SECOND.
 REP 23/17	;05C23
		PUSH	P,P4			;PUSH CURRENT STACK PNTR
 WIT
		PUSHJ	P,CHKWID		;[2051] CHECK LEFT-PAREN REPEAT COUNT
		XMOVEI	T1,(P4)			;[2051] GET ADDR OF CURRENT STACK
		SUB	T1,ENC.AD		;[2051] MAKE IT RELATIVE
		PUSH	P,T1			;[2051] SAVE STACK OFFSET
 REP 27/17	;05C24
		HRLZI	T1,(T1)			;-REPEAT COUNT,,0 FOR NOW
		PUSH	P4,T1			;SAVE ON STACK
 WIT
		PUSH	P4,T1			;[2051] SAVE ON STACK LIST
		PUSH	P4,[0]			;[2051] ZERO LINK FOR NOW
		PUSHJ	P,STKCHK		;[2051] CHECK STACK FOR ENOUGH ROOM
 REP 33/17	;05C25
		MOVEI	T1,1(P4)		;NEXT ADDR IS CONTINUATION
		ADDI	T2,1			;POINT TO THE REPEAT WORD
		HRRM	T1,(T2)			;SAVE IT IN LINK
		HRRZM	T2,RPT.PT		;SAVE LOOP ADDR FOR INDEF RPT
 WIT
		XMOVEI	T1,1(P4)		;[2051] NEXT ADDR IS CONTINUATION
		SUB	T1,ENC.AD		;[2051] MAKE IT RELATIVE
		ADDI	T2,1			;POINT TO THE REPEAT WORD
						;[2051]
		HRRZM	T2,RPT.PT		;SAVE LOOP ADDR FOR INDEF RPT
		ADD	T2,ENC.AD		;[2051] MAKE IT ABSOLUTE
		HRRM	T1,1(T2)		;[2051] SAVE IT IN LINK
 REP 15/19	;05C26
		PUSHJ	P,FMTCMP		;COMPILE THE FORMAT
		POP	P,T1			;GET THE BYTE PNTR AGAIN
		PUSH	P4,T1			;SAVE THE B.P. ON ENCODED STACK
		POPJ	P,
 WIT
		POP	P,T1			;[2051] RETRIEVE BYTE PNTR
		MOVEM	T1,ENC.W2		;[2051] SAVE FOR ENCODED STACK
		PJRST	P,FMTCMP		;[2051] COMPILE THE FORMAT

 REP 26/19	;05C27
	SQENC:	SETZM	FMT.WD			;CLEAR WIDTH
		PUSH	P,FMT.BP		;SAVE THE B.P.
 WIT
	SQENC:	SETZM	FMT.RP			;[2051] CLEAR REPEAT COUNT
		MOVE	T1,FMT.BP		;[2051] GET BYTE PNTR
		MOVEM	T1,ENC.W2		;[2051] SAVE FOR ENCODED STACK
 REP 38/19	;05C28
		AOS	FMT.WD			;YES. COUNT BOTH OF THEM
	NOTSQ:	AOS	FMT.WD			;NO. INCR THE COUNT
 WIT
		AOS	FMT.RP			;[2051] YES. COUNT BOTH OF THEM
	NOTSQ:	AOS	FMT.RP			;[2051] NO. INCR THE COUNT
 REP 43/19	;05C29
		PUSHJ	P,FMTCMP		;COMPILE THE FORMAT
		POP	P,T1			;GET THE BYTE PNTR
		PUSH	P4,T1			;STORE ON STACK
		POPJ	P,
 WIT
		PJRST	P,FMTCMP		;[2051] COMPILE THE FORMAT

 INS 31/22	;05C30
		ADD	T1,ENC.AD		;[2051] MAKE IT ABSOLUTE
 REP 6/23	;05C31
	;ENCODED LEFT PARENS AS WORDS WITH A NEGATIVE LEFT HALF (NEGATIVE REPEAT COUNT),
	;AND A LINK TO THE FORMAT CODES AFTER THE LOOP IN THE RIGHT HALF. THE FIRST
 WIT
	;[2051] ENCODED LEFT PARENS AS 2 WORDS: A NEGATIVE REPEAT COUNT IN THE 1ST WORD
	;[2051] AND A LINK TO THE FORMAT CODES AFTER THE LOOP IN THE SECOND. THE FIRST
 REP 32/23	;05C32
		HLRE	T1,@ENC.PT		;GET THE NEW REPEAT COUNT
 WIT
		MOVE	T1,@ENC.PT		;[2051] GET THE NEW REPEAT COUNT
 REP 37/23	;05C33
		AOS	ENC.PT			;INC THE FORMAT PNTR
 WIT
		MOVEI	T1,2			;[2051] INCR FORMAT PNTR BY 2
		ADDM	T1,ENC.PT		;[2051] PAST DOUBLE PAREN WORD
 REP 42/23	;05C34
		HRRZ	T2,(T1)			;GET THE ADDR
		JUMPE	T2,ENDEXE		;DON'T STORE ZERO!
		XMOVEI	T2,(T2)			;GET SECTION NUMBER ALSO
 WIT
		HRRZ	T2,1(T1)		;[2051] GET THE ADDR
		JUMPE	T2,ENDEXE		;DON'T STORE ZERO!
		ADD	T2,ENC.AD		;[2051] MAKE RELATIVE PNTR ABSOLUTE
 REP 1/24	;05C35
	EXENRM:	SKIPN	T1,@ENC.PT		;GET FORMAT WORD
		JRST	EXENLP			;HIT END OF LIST
		MOVEM	T1,ENC.WD		;SAVE FOR CODE RETRIEVAL
 WIT
	EXENRM:	DMOVE	T1,@ENC.PT		;[2051] GET BOTH FORMAT WORDS
		JUMPE	T1,EXENLP		;[2051] IF WE'RE AT LIST'S END
		DMOVEM	T1,ENC.WD		;[2051] SAVE FOR CODE RETRIEVAL
 REP 47/24	;05C36
		AOS	ENC.PT			;ON TO NEXT FORMAT
 WIT
		MOVEI	T1,2			;[2051] BUMP LIST PNTR BY 2
		ADDM	T1,ENC.PT		;[2051] FOR NEXT PAIR
 REP 57/24	;05C37
		ADDI	T1,1			;RESET PNTR
 WIT
		ADDI	T1,2			;[2051] RESET PNTR
 REP 64/24	;05C38
		AOS	ENC.PT			;ON TO NEXT FORMAT
 WIT
		MOVEI	T1,2			;[2051] BUMP LIST PNTR BY 2
		ADDM	T1,ENC.PT		;[2051] FOR NEXT PAIR
 REP 4/27	;05C39
	;NUMBER OF CHARACTERS IS IN THE WIDTH FIELD.
	HOUT:	AOS	ENC.PT			;INCR TO BYTE PNTR
		LDB	T2,RPTPNT		;GET # CHARS
		MOVE	T3,@ENC.PT		;Get byte ptr
 WIT
	;[2051] NUMBER OF CHARACTERS IS IN THE REPEAT FIELD.
	HOUT:	LDB	T2,RPTPNT		;[2051] GET # CHARS
		MOVE	T3,ENC.W2		;[2051] GET BYTE PNTR
 REP 5/28	;05C40
		TRNE	T1,400			;SIGN BIT ON?
		ORCMI	T1,777			;YES. TURN THE REST ON
 WIT
		HRRE	T1,T1			;[2051] EXTEND ITS SIGN
 REP 3/29	;05C41
	;STORED AS THE WIDTH. UNLIKE HOLLERITH, DOUBLE APOSTROPHES MUST BE
	;TURNED INTO SINGLE APOSTROPHES.
	SQOUT:	AOS	ENC.PT			;INCR TO BYTE PNTR
		LDB	T2,WIDPNT		;GET THE # CHARS
		JUMPE	T2,SQODON		;DONE IF NO CHARS
		MOVE	T3,@ENC.PT		;Get the byte ptr.
 WIT
	;[2051] STORED AS THE REPEAT CNT.  UNLIKE HOLLERITH, DOUBLE APOSTROPHES MUST BE
	;TURNED INTO SINGLE APOSTROPHES.
	SQOUT:	LDB	T2,RPTPNT		;[2051] GET THE # CHARS
		JUMPE	T2,SQODON		;DONE IF NO CHARS
		MOVE	T3,ENC.W2		;[2051] GET THE BYTE PNTR
 REP 21/29	;05C42
	SQIN:	AOS	ENC.PT			;INCR TO BYTE POINTER
		LDB	T2,WIDPNT		;GET # CHARS TO INPUT
 WIT
	SQIN:	LDB	T2,RPTPNT		;[2051] GET # CHARS TO INPUT
 REP 29/29	;05C43
	HIN:	AOS	ENC.PT			;INCR TO BYTE PNTR
		LDB	T2,RPTPNT		;GET # CHARS TO INPUT
	HIN0:	MOVE	T3,@ENC.PT		;Get the byte ptr
 WIT
	HIN:	LDB	T2,RPTPNT		;[2051] GET # CHARS TO INPUT
	HIN0:	MOVE	T3,ENC.W2		;[2051] Get the byte ptr
 SUM 258433