Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0013/dp.mac
There are 5 other files named dp.mac in the archive. Click here to see a list.
	TITLE DP    DIGIT PART AND DECIMAL EXPONENT PART OF A NUMBER
	SUBTTL V.001 J. BURCHFIEL MAY 28,1969
	ENTRY DP,XP
	INTERN DP,XP
	EXTERN ALOG10,EXP2.0
	P=17
; Modified to PUSHJ/POPJ calling convention 11 Oct 1980
; by Paul T. Robinson, Wesleyan Univ. for DECUS conversion to DEC-20

DP:	SETZM FLAG
	CAIA
XP:	SETOM FLAG
	PUSH P,1
	PUSH P,2
	MOVE 0,@0(16)
	MOVMM TMP
;	JSA 16,ALOG10
;	JUMP 2,TMP
	movie	16,tmp
	pushj	p,alog10
	UFA 0,[XWD 233000,0]	;ENTIRE OF DECIMAL EXPONENT
	SKIPL FLAG
	JRST DP1
	FSC 1,0	;NORMALIZE
	MOVE 0,1
DONE:	POP P,2
	POP P,1
;	JRA 16,1(16)
	popj	p,

DP1:	HRRES 1	;EXTEND SIGN - FIXED EXPONENT
	MOVE 2,0
	HRLZI 0,204500	;^D10
	PUSHJ P,EXP2.0	;10^ENTIER(ALOG10(X))
	FDVRM 2,0
	JRST DONE
FLAG:	Z
TMP:	Z
	END