Prev: 618C Up: Map Next: 61B0
61A1: Get a random number
Used by the routines at 62B2, 62D7, 69D2, 7000, 7264, 7700, 7A32, 7CE0, 7CFC, 7D30, F300, F855 and F905. Returns with a random number in A.
61A1 PUSH HL
61A2 LD HL,($7FFE) 7FFE holds the random number seed
61A5 LD A,($5C78) Pick up the LSB of the system variable FRAMES
61A8 INC HL Add 0101 to the seed
61A9 INC H
61AA XOR (HL) A=random number
61AB LD ($7FFE),HL Store the new seed
61AE POP HL
61AF RET
Prev: 618C Up: Map Next: 61B0