A86: r register?
[Prev][Next][Index][Thread]
A86: r register?
i was looking around in the source to solitaire when i came across Jimmy
Mardell's pseudo random routine. i understand basically all of it except for
the second line, which is "ld a,r". what is the r register? i've never heard
of it. does it always contain some sort of random value or something?
;Randomization routine by Jimmy Mardell (used in ZTetris v3.0)
PRandom: ; Creates a pseudorandom number 0 <= x < A
ld b,a
ld a,r ;<-----what the heck is this??????
add a,a
ld hl,0
ld d,0
ld e,a
RMul:
add hl,de
djnz RMul
ld a,h
ret