| Routines

61823: Get a random number

Used by the routines at 25039, 25118, 25307, 25420, 26224, 28616, 29361, 30627, 31126, 31594, 62597, 63209, 63304, 63530, 64005 and 64338. Returns with a random number in A.
61823 | PUSH HL |
61824 | LD HL,(32734) | Collect the random number seed from 32734
61827 | INC HL | Add 257 to it
61828 | INC H
61829 | LD (32734),HL | Store the new seed
61832 | LD A,(23672) | Collect the LSB of the system variable FRAMES, which is incremented every 20ms
61835 | XOR (HL) | A=random number
61836 | POP HL |
61837 | RET |