blob: a0e0daa7b03d9a12422fd6da4d739818f3a21cf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
GenRandom_: ; 13a8f (4:7a8f)
; generate a random 16-bit integer and store it at $FFD3,$FFD4
ld a,[rDIV]
ld b,a
ld a,[H_RAND1]
adc b
ld [H_RAND1],a
ld a,[rDIV]
ld b,a
ld a,[H_RAND2]
sbc b
ld [H_RAND2],a
ret
|