Trailing-Edge
-
PDP-10 Archives
-
decuslib10-01
-
43,50053/irand.mac
There are 2 other files named irand.mac in the archive. Click here to see a list.
TITLE IRAND INTEGER RANDOM NUMBER
SUBTTL V.001 R.S.TOMLINSON 19 AUG 68
ENTRY IRAND
INTERN IRAND
EXTERN RAND
; GET RANDOM INTEGER UNIFORMLY DISTRIBUTED BETWEEN TWO LIMITS
; CALL: JSA 16,IRAND
; ARG 00,<LOWER LIMIT>
; ARG 00,<UPPER LIMIT>
; RESULT IN AC 0
IRAND: 0
JSA 16,RAND
LSH 0,-1
MOVE 1,@1(16)
SUB 1,@0(16)
AOS 1
MUL 0,1
ADD 0,@0(16)
JRA 16,(16)
END