| Routines

24993: Get a random number

Used by the routines at 25266, 25303, 27090, 28672, 29284, 30464, 31282, 31968, 31996, 32048, 62208, 63573 and 63749. Returns with a random number in A.
24993 | PUSH HL |
24994 | LD HL,(32766) | 32766 holds the random number seed
24997 | LD A,(23672) | Pick up the LSB of the system variable FRAMES
25000 | INC HL | Add 257 to the seed
25001 | INC H
25002 | XOR (HL) | A=random number
25003 | LD (32766),HL | Store the new seed
25006 | POP HL |
25007 | RET |