A86: Randomness...


[Prev][Next][Index][Thread]

A86: Randomness...




Will this give me a random number, from 1 to 25, in A?

ld hl, $0001		;random number between 1 and 25 is needed
call _setxxxxOP2	;hl --> OP2
call _OP1toOP2		;OP2 --> OP1
ld hl, $0025						
call _setxxxxOP2	;hl --> OP2
call _randint		;rand(OP1,OP2) --> OP1
call _convOP1		;OP1 --> A

thanks, 

Cassady Roop
Slightly Immoral Technologies