Google
 

Trailing-Edge - PDP-10 Archives - BB-4157E-BM - fortran-ots-debugger/fordar.unv
There is 1 other file named fordar.unv in the archive. Click here to see a list.
x,5@P I` -Wc
	XALL
-!
	ENTRY	DFL.A		;(YENTRY POINT TO DF(9L.A
	SIXBIT	/DF.L.A/
DFL.A:	MO(VEI	A+1,0		;CLEA.!R LOW ORDER WORD
	ASHC	A,-8		;MA.`KE ROOM FOR EXPON/ENT IN HI WORD
	/ TLC	A,243000	;SE/@T EXP TO 27+8 DEC/`IMAL
	DFAD	A,[E0XP 0,0]	;NORMALIZ{pE
	POPJ	P,		;RET|URN A=THE DOUBLE|0 PRECISION RESULT
t=$IO>|H\S0 |qX
	XALL
}
	ENTRY	IDF.A
	}0SIXBIT	/IDF.A/
}PIDF.A:	PUSH	P,L	}p	;SAVE THE SCRATC~H REG
	HLRE	L,A~0		;GET THE EXPONE~PNT
	ASH	L,-9		;R~pIGHT 8 BITS
	JUMPGE	A,IDF.XT	;JU0MP IF POS.
	DMOVPN	A,A		;NEGATE
	TRC	L,-1		;COMPLEMENT THE EXPONE0NT
IDF.XT:	TLZ	PA,777000	;CLEAR TpHE EXPONENT
	ASHC	A,-201-^D26(L)0	;CHANGE FRACTIONP TO INTEGER
	TLNpE	L,400000	;SKIP IF POS.
	MOVN	A0,A		;NEGATE
	POPP	P,L		;RESTORE TpHE SCRATCH REG
	POPJ	P,		;RETURN 0A=FIXED NUMBER
g:8 qXq
	XALL

	ENTRY	SNG.A
	0SIXBIT	/SNG.A/
PSNG.A:	JUMPL	A,pSNG3		;NEGATIVE ARGUMENT?
	TLNE	0A+1,(1B1)	;POSITIPVE. ROUND REQUIREpD?
	TRON	A,1		;YES, TRY TO ROUND0 BY SETTING LSB
P	  POPJ	P,		;WE WpON, FINISHED
	MOVE	A+1,A		;COPY0 HIGH PART OF ARGP
	AND	A,[777000p,,1]	;MAKE UNNORMALIZED LSB, SAME 0EXPONENT
	FAD	AP,A+1		;ROUND & RpENORMALIZE
	POPJ		P,

;HERE IF A	0RG IS NEGATIVE
S	PNG3:	DMOVN	A,A		p	;MAKE POSITIVE

	TLNE	A+1,(1B1)	
0;NEED ROUNDING?

P	TRON	A,1		;YES,
p TRY TO DO IT BY SETTING LSB
	JRS0T	SNG4		;DONE
	MPOVN	A+1,A		;MAKpE RE-NEGATED COPY
 OF HIGH PART
	O
0RCA	A,[777,,-1]	
P;GET UNNORM NEG L
pSBNWITH SAME EXPO
	FADR	A,A& NORM
	POPJ	P,

SNG4:	MOVN	A,A		;RE-NEGATE
	POPJ	P,		;EXIT
>}{woP