mirror of
https://github.com/pret/pokeyellow.git
synced 2026-10-01 14:26:36 -04:00
9c9fb882c7
todo: label functions past engine/items/tm_prices.asm check if hlCoords are correct.
14 lines
207 B
NASM
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
|