Skip to main content

Routines

The game executable · Memory map · Overlays · Data · Address index

Each entry describes a code location in the DOS START.EXE identified in the file inventory. Addresses are analysis addresses unless stated otherwise; see how addresses are written. Roles are descriptive: the original routine names are unknown. Ranges are inclusive and give the examined code, not necessarily the routine's full extent.

Comparative sources are listed in the technical references by identifier.

The pages​

PageWhat it coversEntries
Monster routinesHow monsters move, notice the party, attack, cast spells, take damage, appear and die, and how undead are turned.30
Movement and geometry routinesThe movement buttons, the party's step, and the computations of neighboring blocks, directions and distances.7
Wall and door routinesDoors and their switches, temporary walls, clicks on walls, and the walls that True Seeing and Disintegrate change.12
Block event and record routinesThe step trigger, the script timers and the runner of level records.4
Flying object routinesCreating, launching, moving and ending flying objects, and their hit tests.7
Script interpreter routinesThe block event dispatcher, the opcode handlers and the helpers they call.4
Party and character routinesPortraits, swapping and removing characters, hit points, experience and levels, and saving throws.23
Item routinesHolding, giving, throwing, dropping and using items, inventory slots, and the item chains of blocks.34
Combat routinesWeapon attacks, hit rolls, damage, and flying objects that hit monsters or the party.9
Magic routinesSpell books, casting from the book or from an item, targets, spell effects and their timers, and spell animations.31
Level loading and game start routinesProgram start-up, the new game, the game loop, and loading containers, images and palettes.12
Input routinesKeys, mouse and buttons: reading input, the button lists, menus, text fields and input recording.23
Timing routinesWaits, timed callbacks, character timers and the timer interrupt.10
Display routinesPortraits, bars, icons and shapes, the tile layers of the view, display modes and drivers, text windows and text output.42
Sound routinesSound effects and music: the sound file, the AdLib, speaker and Tandy output, and the channels and effects of the drivers.19
Utility routinesMemory, random numbers and dice, strings, files and disks, the overlay manager and the run-time library.22