Routines
Address
Label
Description
B686
TITLE_PAGE_TEXT
Print the title page's words
C000
LOADING_TUNE
Play the loading tune until a key is pressed
C026
TUNE_NEXT_NOTE
Take a voice's next note
C033
TUNE_PITCH
Look up a note's pitch
C041
TUNE_RESTART_VOICE
Send a voice back to where it repeats from
C049
TUNE_PLAY_NOTE
Play one note of the loading tune
C47C
START
The game's first instruction
DFF2
MESS2
Print the closing lines of the quest
E038
SHOW_MESSAGE
Show a message under the room, and take it away again
E3E4
COMPOSITE_TO_SCREEN
Redraw a rectangle of the screen from an image, its mask and the clean copy
E4F7
ISO_MOVE
Move an object to a new position, and its sprite on the screen with it
E55B
DRAW_CURRENT_ROOM
Draw the room the knight is in
E597
DRAW_ROOM_RECORD
Draw a room from its record
E5BA
CLEAR_ROOM_SCREEN
Clear the screen
E5E8
DO_ROOM_COMMAND
Carry out one room command
E734
FILL_NEXT_SEED
Fill the next run of a flood fill
E7B2
FILL_NEXT_PIXEL
Paint one row of the textured fill, a pixel at a time, leftwards
E806
FILL_WHOLE_BYTE
Fill a whole byte at once when nothing in it needs looking at pixel by pixel
E834
FILL_BYTE_TO_LEFT
Move the fill's pointers a byte to the left
E849
PIXEL_ADDRESS
Find the screen byte of a pixel
E864
BUFFER_PIXEL
Find a pixel in the clean copy of the screen
E86E
SCREEN_PIXEL
Find a pixel's screen byte and its mask
E87D
PLOT_LINE_START
Plot the first pixel of a line
E89B
MORE_ROOM_COMMANDS
The room commands $C1-$E4: lines, mode bits, repeats, parts, the clean copy and $E4
EACC
PLACE_ROOM_OBJECTS
Put the object table's things for this room into its records
EB1A
PLACE_OBJECT
Make an object record from a type, a place and its template
EB4C
PLACE_FROM_TEMPLATE
Fill an object record from its template (
PLACE_OBJECT
continued)
EBEA
COPY_TO_RECORD
Copy bytes into an object record
EBF5
PRINT_CHAR
Print one character
EBFE
PRINT
Print the string after the call
EC3B
PRINT_FIND_GLYPH
Find a character in the font and print it (
PRINT
continued)
EC4C
SHOW_THING_IN_USE
Show a carried thing in the panel's box
EC75
CLEAR_THING_BOX
Clear the panel's box for the thing in use, and number it
ECBD
REDRAW_OBJECT
Redraw an object, and every other object that overlaps it
ED47
CULL_OBJECT
Sort one object into the redraw of a region: in front, behind, or out of it
EDB8
RECORD_FROM_NUMBER
Point IX at an object record by its number
EDC1
RECORD_FROM_NUMBER_STEP
The stepping loop of
RECORD_FROM_NUMBER
EDC6
SORT_AND_DRAW_BEHIND
Put the objects behind in drawing order, and draw them into pages $DA and $DB
EE73
IS_IN_FRONT
Is this object in front of the other?
EE8D
DRAW_SPRITE
Draw an object's sprite into one of the region's buffers
EF4E
DRAW_SPRITE_SKIP_COLUMNS
Part of
DRAW_SPRITE
: move the buffer pointer to the sprite's first column
EF53
DRAW_SPRITE_CLIP_LEFT
Part of
DRAW_SPRITE
: a sprite that starts left of the region
EF6C
DRAW_SPRITE_ROWS
Part of
DRAW_SPRITE
: skip the bytes cut off at the left, then draw the rows
F036
FAR_CORNER
Find an object's far corner and floor
F04C
CLEAR_256_BELOW
Clear the 256 bytes below HL
F050
CLEAR_512_BELOW
Clear the 512 bytes below HL
F065
TITLE_SCREEN
The title, a game, GAME OVER, and round again
F0D2
WAIT
Wait for no key, then for a key
F0DF
INPUT
Read a row of keys
F0E6
IN31
Read the Kempston joystick, if it is in use
F0FB
ATTRI
Colour the whole screen in the room's colour
F10B
RESTOR
Copy the screen to the clean copy at
LOADING_TUNE
F117
MIMAN
Turn the knight's sprites to face his way
F11F
MIWRAI
Turn the sprites of the state-11 creature to face its way
F127
MITRO
Turn the sprites of the state-7 creature to face its way
F157
MW
Mirror a run of sprite planes in place, if they face the other way
F199
FACING
Turn facing bits back into a direction, and find the view's sprite
F1B4
DECLI1
Take ten from LIFE
F1C8
DE1
Take a number from LIFE's two digits
F1E0
CHE3D
Update one object: the start of the dispatch on its state
F2F7
STEER
Keep a creature's course, or aim it at the knight when its count runs out
F309
CREATURE_UPDATE
Update an object by its state: guards, the troll, the wraith, the floating things and the knight
F4E6
SET_THING_ROOM
Write a thing's room into the object table
F4F4
PICK_UP
Pick up whatever the knight is standing at
F52A
PICK_UP_LOOK_ON
Look on for a thing that can be carried, and take it
F595
KNIGHT_CONTROLS
The knight's controls: walk, jump or fight, and the frames they show
F65C
ANIMATE_AND_MOVE
Show the frame, then move the object and redraw it
F7B0
WORKING_POSITION
Where the object being updated is
F7BA
WORKING_SIZES
How big the object being updated is
F7C4
BUMPED
Something is in the way: a door takes the knight through, anything else is met
F906
SAVE_OBJECT_POSITIONS
Write the room's things' positions back into the object table (the author's EEN)
F959
OBJECTS_MEET
Settle what happens when a moving object runs into one that is not a door
FA79
MOVER_VANISHES
Make the mover vanish where it stands
FA83
MEET_DECOY
Let a guard take a decoy, or else stop the part of a move that is blocked
FC07
STEP_ALONG_X
Step a position along x, if x is moving
FC1C
STEP_ALONG_Y
Step a position along y, the height, if y is moving
FC2B
STEP_ALONG_Z
Step a position along z, if z is moving
FC40
STEP_ALL_AXES
Step a position along every axis that is moving
FC48
ZOOMIN
Aim a chasing creature at the knight, or at a decoy (the author's ZOOMIN)
FC66
AIM_AT
Work out which way a chaser should go to reach its target
FC9C
TEST_OTHER
Test the mover's box, moved, against the record at IX only
FCA5
FIND_OBSTACLE
Find a record whose box overlaps a given box
FCDC
TEST_ONE_RECORD
Test a box against one record, unless it is the mover's own or hidden
FD20
ROOMST
Enter the room in ROOM, or end the quest (the author's ROOMST)
FE15
DRAW_STILL_THINGS
Draw a room's doors and still things into its picture, and start the main loop
FE47
MAIN_LOOP
The main loop: the keys between passes, LIFE, the message line and every object