Prev: 64687 Up: Map Next: 64829
64810: Set new random seed and load A with a random number
Used by the routine at 64829.
Output
A LSB of new random seed
64810 PUSH HL Store HL
64811 PUSH BC Store BC
64812 LD BC,(23671) Load B with the least significant byte of the frame counter and C with the most significant byte of the current seed
64816 LD HL,(23670) Load the current seed into HL
64819 ADD HL,BC Add these together
64820 LD A,H Add together H and L in A...
64821 ADD A,L ...
64822 LD L,A ...and load into L
64823 LD (23670),HL Store HL as the new seed
64826 POP BC Restore BC
64827 POP HL Restore HL
64828 RET Return
Prev: 64687 Up: Map Next: 64829