Google
 

Trailing-Edge - PDP-10 Archives - BB-H580C-SB_1981 - compd.mac
There are 5 other files named compd.mac in the archive. Click here to see a list.
TITLE	COMPD FOR LIBOL
SUBTTL	COMPARE	TWO DOUBLE-PRECISION INTEGERS	PETE WILSON/CAM



;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1974, 1981 BY DIGITAL EQUIPMENT CORPORATION


	HISEG

;ENTER WITH BOTH A-FIELD WORDS IN AC'S 0 AND 1.
;RETURNS:
;	RET.1 IF A < B
;	RET.2 IF A > B
;	RET.3 IF A = B
	ENTRY	COMP.D
	EXTERNAL	RET.1,RET.2,RET.3
HIGHA=0				;HIGH-ORDER AND
LOWA=1				;  LOW-ORDER PARTS OF A-FIELD.
PP=17

COMP.D:	CAMGE	HIGHA,0(16)	;COMPARE HIGH-ORDER WORDS.
	POPJ	PP,		;A IS LESS THAN B.
	CAME	HIGHA,0(16)	;COMPARE AGAIN FOR EQUALITY.
	JRST	RET.2		;A IS GREATER THAN B.
	CAMGE	LOWA,1(16)	;COMPARE LOW-ORDER WORDS.
	POPJ	PP,		;A IS LESS THAN B.
	CAME	LOWA,1(16)	;SKIP IF EQUAL.
	JRST	RET.2		;A IS GREATER THAN B.
	JRST	RET.3		;A EQUAL TO B.

END