pokeyellow/engine/bank3d/random.asm
luckytyphlosion 9c9fb882c7 Complete documentation of bank3d
todo: label functions past engine/items/tm_prices.asm
check if hlCoords are correct.
2015-07-06 13:35:48 -04:00

14 lines
207 B
NASM

Random_:: ; f67dc (3d:67dc)
; Generate a random 16-bit value.
ld a, [rDIV]
ld b, a
ld a, [hRandomAdd]
adc b
ld [hRandomAdd], a
ld a, [rDIV]
ld b, a
ld a, [hRandomSub]
sbc b
ld [hRandomSub], a
ret