Google
 

Trailing-Edge - PDP-10 Archives - BB-L014E-BM - autopatch/srtflt.c05
There are 2 other files named srtflt.c05 in the archive. Click here to see a list.
 REP 2/1	;05C1
	SUBTTL	S.L. COVITZ			4-Jun-81
 WIT
	SUBTTL	S.L. COVITZ/DMN			27-Oct-82
 REP 8/1	;05C2
	;COPYRIGHT (C) 1979, 1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1979, 1982 BY DIGITAL EQUIPMENT CORPORATION
 INS 53/3	;05C3
	;**;[511] @LOCFLG - 1 line,  Replace 1 line with 3.	DMN	27-Oct-82
	UNSFLG==100		;[511] WANT UNSIGNED RESULT.
	BNFLG==200		;[511] TREATE BLANK AS NULL, NOT ZERO (BN FORMAT)
 REP 57/3	;05C4
	CRTYP==1	;CARRIAGE RETURN
 WIT
	NULTYP==1	;[511] NULL
 REP 23/4	;05C5
		SKIPGE	4(L)		;[OK] IS IT DOUBLE PRECISION?
		TXO	F,DPFLG		;YES. SET FLAG
 WIT
	;**;[511] @FLIRT: + 14L,  Replace 1 line with 5.	DMN	27-Oct-82
		SKIPGE	T2,4(L)		;[511] IS IT DOUBLE PRECISION?
		TXO	F,DPFLG		;YES. SET FLAG
		TXNE	T2,KY%FUN	;[511] UNSIGNED RESULT WANTED?
		TXO	F,UNSFLG	;[511] YES, SET FLAG.
		TXNE	T2,KY%FBN	;[511] BN FORMAT SPECIFIED?
		TXO	F,BNFLG		;[511] YES, COPY FLAG.
 REP 39/4	;05C6
	GETCH2:	CAIL	T1,"0"		;CHECK FOR NUMBER
 WIT
	;**;[511] @GETCH2:   Replace 1 line.	DMN	27-Oct-82
	GETCH2:	JUMPE	T1,GOTNUL	;[511] GO SET NULL FLAG FOR NULL
		CAIL	T1,"0"		;CHECK FOR NUMBER
 REP 1/5	;05C7
	XCTTAB:	JRST	ILLCH		; (00) ILLEGAL CHAR
		JRST	BLNKIN		; (01) CR-LF
 WIT
	;**;[511] @XCTTAB:  Replace 1 line with 3.	DMN	27-Oct-82
	GOTNUL:	IORI	P2,NULTYP	;[511] FLAG GOT NULL.
		JRST	GOTST		;[511] BACK FOR DISPATCH.
	XCTTAB:	JRST	ILLCH		; (00) ILLEGAL CHAR
		JRST	NULLIN		;[511] (01) CR-LF
 REP 29/5	;05C8
		JRST	NOTEXP		;NO

	GOTEXP:	IORI	P2,EXPTYP	;SET STATUS FOR EXPONENT
	NOTEXP:	SKIPG	P7		;END OF LINE SET
		TRC	P2,SPCTYP!CRTYP	;SET UP A BLANK
 WIT
	;**;[511] @GOTEXP: - 1L,  Change several lines.	DMN	27-Oct-82
		JRST	GOTST		;[511] NO

	GOTEXP:	IORI	P2,EXPTYP	;SET STATUS FOR EXPONENT
 REP 4/7	;05C9
		JRST	ERROR1		;THROW AWAY REST AND RESULT=0
 WIT
	;**;[511] @DELCK: + 2L,  Change several lines.	DMN	27-Oct-82
		$ERROR	(%,IFC,<Illegal floating point character found.>)	;[511]
		JRST	ERROR1		;THROW AWAY REST AND RESULT=0

	;[511] NULL IS A LEGAL CHARACTER, TREATED AS IF IT WERE A BLANK WITH
	;[511]  BLANK='NULL' SPECIFIED.
	NULLIN:	JUMPL	T0,ENDF		;[511] DONE IF FREE FORMAT.
		SOJA	T0,GETNXT	;[511] OTHERWISE, SKIP IT.
	;[511] THE STATE IS NOT DISTURBED BY BLANKS, THUS IF BZ IS ON (BLANK=ZERO)
	;[511] WE CAN MIMIC THE CODE AT GETNXT (MOVING THE STATE TO BITS 30-32) AND
	;[511] JUMP TO THE PLACE WHERE A DIGIT WOULD HAVE GONE.
 REP 8/7	;05C10
	;	TXNN	DF,D%BZ		;BZ FORMAT ON?
	;	SOJA	T0,GETNXT	;NO. SKIP THE SPACE
		LSH	P2,-^D30	;YES. PUT STATE IN BITS 30-32
		JRST	GOT1		;AND USE IT
 WIT
		TXNE	F,BNFLG		;[511] BN (BLANK='NULL') FORMAT ON?
		SOJA	T0,GETNXT	;[511] YES, SKIP THE SPACE.
		LSH	P2,-^D30	;[511] NO, DEFAULT TO BLANK='ZERO'.
		JRST	GOT1		;[511] PUT STATE IN BITS 30-32
 REP 78/8	;05C11
	RETFLT:	TXNE	F,MINFR		;RESULT NEGATIVE?
		.DMOVN	T0,T0		;YES. SO NEGATE RESULT
		MOVE	T3,5(L)		;[C20] GET VARIABLE BYTE POINTER
 WIT
	;**;[511] @RETFLT:   Change several lines.	DMN	27-Oct-82
	RETFLT:	TXNE	F,UNSFLG	;[511] WANT UNSIGNED RESULT?
		JRST	RETFL1		;[511] YES, IGNORE SIGN TEST.
		TXNE	F,MINFR		;RESULT NEGATIVE?
		.DMOVN	T0,T0		;YES. SO NEGATE RESULT
	RETFL1:	MOVE	T3,5(L)		;[511][C20] GET VARIABLE BYTE POINTER
 SUM 88602