Skip to main content

Script data

Data · Routines · Address index

The opcode handler tables, level and global flags, the script buffer and stacks, and the state of a script run. The data page explains how the entries are written.

DS:0x5a75 — Handler cells​

DS:0x5aa5 — Indirect handler table​

DS:0x5ab1 — Opcode handler table​

DS:0x6d7c — Script run variable​

DS:0x6de2 — Level flags​

DS:0x6e26 — Global script flags​

DS:0x71af and DS:0xe445 — Character-pair tables of the text output​

  • Layout: 16 bytes at DS:0x71af; 128 bytes at DS:0xe445
  • Role: The character reader of the text output replaces a byte c from 0x80 up by DS:0x71af[(c >> 3) & 15] (0x32399) followed by DS:0xe445[c & 0x7f] (0x3238e). Both tables are zero in the executable image (physical 0x3550f and 0x3c7a5), and these two reads are the only literal references to them, so the game has no character pairs to expand and such a byte gives no character (see the character reader for where it is skipped and where it ends the text). Nothing writes them with the original data: only out-of-range values would, a monster slot 30 initialized from level data (which covers DS:0x71af) or a block number from 1,661 to 1,673 (whose bytes cover DS:0xe445).
  • Used by: Initial items (ITEM.DAT) › Who uses it

DS:0x71c4 — Script buffer​

DS:0x92da, DS:0x946c — Expression stack​

DS:0x931c — Character selected by a script​

DS:0x946a — Script stop flag​

DS:0xa2ce — Block of the current event​

DS:0xdf2a — Last spell cast​

DS:0xe4d4 — Script call stack​

DS:0xe59e — Script call depth​

DS:0xe5a6 — Level loaded during the run​

DS:0xee22 — Event mask of the current run​