| Alien (BUGFIX 1.7) | Routines |
| Prev: 33500 | Up: Map | Next: 33600 |
|
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 the address seeded from the FRAMES counter (e.g. $9041 with H masked into ROM range = $1041 — see ResetScriptPtr). Each nibble encodes one game command for the AI scheduler.
Output: A = next script command (0-15)
|
||||
| 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: 33500 | Up: Map | Next: 33600 |