Re: A86: Random


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

Re: A86: Random




here is Jimmy Mardell's random routine from Tetris,i
think
i use it alot

random: 	       ; Creates a random number 0 <= x < A
 	push bc
 	push de
 	push hl
 	ld b,a
 	ld a,r
 	add a,a
 	ld hl,0
 	ld d,0
 	ld e,a
RMul:
 	add hl,de
 	djnz RMul
 	ld a,h
 	pop hl
 	pop de
 	pop bc
 	ret

later 
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com