Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-01 - decus/20-0013/crand.mac
There are 2 other files named crand.mac in the archive. Click here to see a list.
	TITLE	CRAND COMPLEX RANDOM NUMBER
	SUBTTL	V.001  R.S.TOMLINSON 19 AUG 68
	ENTRY	CRAND
	INTERN	CRAND
	EXTERN	RANDOM
; Modified to PUSHJ/POPJ calling convention 11 Oct 1980
; by Paul T. Robinson, Wesleyan Univ. for DECUS conversion to DEC-20

CRAND:	MOVEI 0,@0(16)	; GET LOCATION OF LOWER LIMIT
	HRRM 0,CRAND1
	AOS 0
	HRRM 0,CRAND2
	MOVEI 0,@1(16)	; GET LOCATION OF UPPER LIMIT
	HRRM 0,CRAND1+1
	AOS 0
	HRRM 0,CRAND2+1
;	JSA 16,RANDOM	;use same arg block but move calls
CRAND2:	JUMP 02,.
	JUMP 02,.
	movei	16,crand2
	pushj	17,random
	MOVEM 0,CRANDT#
;	JSA 16,RANDOM
CRAND1:	JUMP 02,.
	JUMP 02,.
	movei	16,crand1
	pushj	17,random
	MOVE 1,CRANDT
;	JRA 16,2(16)
	popj	17,

	END