Prev: 33275 Up: Map Next: 33600
33589: AdvanceScriptPtr
Steps the ROM-traversal script pointer forward by one byte and returns the low nibble (0-15) of the new byte in A. The pointer lives at 31265 and walks through ZX Spectrum ROM bytes starting at $1041 (SEED $9041 with H masked to $10). Each nibble encodes one game command for the AI scheduler.
Output
A = next script command (0-15)
Used by the routines at 35578, 36457, 36859, 37018, 37490, 38379 and 41264.
33589 LD HL,(31265) HL = current script pointer (31265)
33592 INC HL advance to next ROM byte
33593 LD (31265),HL save updated pointer
33596 LD A,(HL) read ROM byte at new address
33597 AND 15 keep only low nibble → command 0-15
33599 RET
Prev: 33275 Up: Map Next: 33600