Routines
Address
Label
Description
5E00
ENTRY
Where the BASIC loader enters the game
AF87
START
Start the game
B00C
OBJECT_DONE
One object done; at the end of a turn, draw and wait
B097
QUEST_INTO_ROOM
Put the quest things in this room into the object records
B115
QUEST_OUT_OF_ROOM
Copy the quest things in the room back to their records
B145
SHOW_SCORE
Copy the score to the screen
B178
SHOW_BUFFER
Copy the screen buffer to the screen
B19E
RENDER_DYNAMIC_OBJECTS
Redraw what changed and copy it to the screen
B278
BLIT_TO_SCREEN
Copy a rectangle of the buffer to the screen
B29A
MAKE_TABLES
Build the drawing tables
B2C5
CALC_PIXEL_XY
Project an object's position onto the screen
B2EE
FIND_SPRITE
Find an object's sprite, and turn it the way the object faces
B37F
CALC_VIDBUF_ADDR
Buffer address of a pixel position
B394
CALC_VRAM_ADDR
Display address of a pixel position
B3B6
CALC_ATTRIB_ADDR
Attribute address of a pixel position
B3D3
DRAW_OBJECT
Draw one object from the draw list
B44F
SPRITE_ALIGNED_RUN
The unrolled row of a byte-aligned sprite
B479
SPRITE_ROW
Start a row of a sprite
B47D
SPRITE_SHIFTED_RUN
The unrolled row of a shifted sprite
B4E0
PAUSE
Pause, when SPACE or CAPS SHIFT is pressed on its own
B513
CLEAR_BYTES
Clear B bytes from DE
B519
ADD_HL_A
HL = HL + A
B520
RECORD_OF
HL = the address of the object record numbered A
B531
LIST_DRAWN
List the objects to be drawn
B58A
SORT_AND_DRAW
Draw the listed objects, back to front
B66E
ORDER_UNCONSTRAINED
A pair with no order between them
B671
CANDIDATE_ALREADY_FIRST
The candidate is behind the other object
B674
IY_GOES_FIRST
The other object must be drawn first
B6B0
BOXES_INTERSECT
Two boxes occupy the same space
B6B3
DRAW_CANDIDATE
Draw the candidate and start the next pass
B6C8
ALL_DRAWN
All the listed objects are drawn
B6DD
FILL_RECT
Fill a rectangle of bytes with A
B6ED
ADJ_FOR_OUT_OF_BOUNDS
Cut a move short against the room and the other objects
B742
ADJ_DU_FOR_OBJ_INTERSECT
Shorten dU against the other objects
B791
ADJ_DV_FOR_OBJ_INTERSECT
Shorten dV against the other objects
B7E0
ADJ_DZ_FOR_OBJ_INTERSECT
Shorten dZ against the other objects
B866
CONVEYOR_PUSH
Be carried along by a block of graphic 140-143
B890
MARK_STOOD_ON
Mark the obstacle, if the mover is the player's legs or graphic 91
B8A2
DO_OBJS_INTERSECT_ON_U
Do two objects overlap in U?
B8B7
DO_OBJS_INTERSECT_ON_V
Do two objects overlap in V?
B8CC
DO_OBJS_INTERSECT_ON_Z
Do two objects overlap in Z?
B8E2
ADJ_DU_FOR_OUT_OF_BOUNDS
Shorten dU at the walls
B90D
ADJ_DV_FOR_OUT_OF_BOUNDS
Shorten dV at the walls
B938
CALC_2D_INFO
Work out an object's screen rectangle
B952
READ_KEYS
Read a half-row of the keyboard
B95A
SHORTEN_DELTA
Shorten a move by one unit
B963
ADJ_DZ_FOR_OUT_OF_BOUNDS
Shorten dZ at the floor
B979
DEC_DZ_AND_UPDATE_UVZ
Fall, and move
B99B
IS_OBJECT_NOT_IGNORED
Does this object take part in collisions?
B9A7
SET_DRAW_OBJS_OVERLAPPED
Mark every object the moving object's old or new rectangle touches
BA34
SHOW_CARRIED
Show the carried things on the panel, if they have changed
BAEA
PRINT_CHAR
Print a character into the screen buffer
BB14
PRINT_SCORE
Print the score, with its heading, on the panel
BB29
ADD_SCORE
Add BC to the score, in BCD, and print it
BB64
TOGGLE_SELECTED
Flash one of B attributes, and steady the rest
BB6B
FLASH_NEXT_ONE
The rest of
TOGGLE_SELECTED
BB74
MENU
The menu
BBD8
FLASH_MENU
Flash the chosen control method's line on the menu
BC66
PRINT_TEXT_SINGLE_COLOUR
Print a string in one colour
BC8B
TEXT_ATTR_ADDR
Find the string's first attribute cell, and print the string
BCB4
DISPLAY_MENU
Draw the menu
BCE5
DISPLAY_PANEL
Draw the scroll-work at the foot of the screen
BD59
PRINT_BORDER
Draw the border round the screen
BDC0
TRANSFER_SPRITE
Copy a sprite's four bytes into the drawing record
BDD5
TRANSFER_SPRITE_AND_PRINT
Copy a sprite's four bytes and draw it
BDDE
MULTIPLE_PRINT_SPRITE
Draw a sprite several times in a line
BDF8
READ_CONTROLS
Read the controls into INPUT
BF0D
CLEAR_COPY_BITS
Clear bit 5 of every object's flags
BF1B
DO_ANY_OBJS_INTERSECT
Does this object overlap any other?
BF56
SET_WIPE_AND_DRAW_IY
Mark the object at IY to be rubbed out and redrawn
BF66
CHK_PICKUP_DROP
Is the pick-up control pressed?
BF79
TAKE_OR_LEAVE
Pick up, or put down
C0D4
CAN_PICK_UP
Can this thing be picked up?
C107
START_PUFF
Make an object a puff of smoke
C111
PUFF
The update routine for a puff (graphics 64 to 70)
C11D
END_PUFF
The update routine for a puff's last frame (graphic 71)
C126
FIRE
Fire a bolt
C1C5
BOLT
The update routine for a bolt (graphics 149 to 151, and 60)
C206
BOLT_HIT
Has the bolt hit either thing from the sky?
C264
SHOOT_DOWN
A bolt hits a thing from the sky
C285
STILL_DEADLY
The update routine for things that kill but never move (graphics 23, 30, 74 and 75)
C291
MAKE_DEADLY
Make an object deadly both ways
C29A
DRAW_LIVES
Draw the lives icon and the number of lives on the panel
C2CE
CHOOSE_START
Choose where the game starts
C2EC
RESTART_PLAYER
Put the player back, a life fewer
C302
WON
The quest is complete
C43F
NOTHING
The update routine for what does nothing
C440
PLAYER_LEGS
The player's update routine: legs (graphics 32 to 39)
C4A3
CHK_PLYR_OOB
Is he inside the room's walls?
C4C8
HANDLE_LEFT_RIGHT
Turn the player
C56C
HANDLE_JUMP
Start a jump
C58D
HANDLE_FORWARD
Step the legs
C5BD
GET_SPRITE_DIR
Which way an object faces
C5D3
PLAYER_TOP
The player's update routine: body
C61D
MOVE_PLAYER
Move the player
C66A
CALC_PLYR_DUV
Add a step in the direction he faces
C695
STEP_U_DOWN
Step towards lower U
C69E
STEP_U_UP
Step towards higher U
C6A5
STEP_V_UP
Step towards higher V
C6AE
STEP_V_DOWN
Step towards lower V
C6B5
EXIT_STUB
Where Knight Lore checks for walking out of the room
C6B6
ENTER_ROOM
Build the room he is in
C6CC
MARK_ROOM_SEEN
Mark the player's room as seen
C6EA
PERCENTAGE
Work out and print the percentage of the quest done
C74A
STRAY_RET_OFFSETS
An unused RET
C74B
DRAW_AT_L8
Drawing offset X -8, Y 0 (graphic 57)
C750
UNUSED_OFFSETS
Three drawing offsets no graphic uses
C75F
DRAW_AT_L16_D8
Drawing offset X -16, Y -8
C764
DRAW_AT_L12_D8
Drawing offset X -12, Y -8
C769
DRAW_AT_L16_D12
Drawing offset X -16, Y -12
C775
DRAW_AT_L12_D6
Drawing offset X -12, Y -6
C77A
DRAW_AT_L12_D4
Drawing offset X -12, Y -4
C77F
DRAW_AT_L8_D4
Drawing offset X -8, Y -4 (graphics 53 to 56)
C784
DRAW_AT_L8_D2
Drawing offset X -8, Y -2 (graphics 12 to 15 and 52)
C789
SECOND_PILLAR
The second pillar of an arch (graphics 7 and 9)
C7A8
FIRST_PILLAR_EIGHT
The first pillar of an arch: graphic 8, not mirrored
C7AD
FIRST_PILLAR
The first pillar of an arch (graphics 6 and 8)
C802
HANDLE_EXIT_SCREEN
Is the player in the doorway, and has he walked out of the room?
C843
EXIT_LOW_U
Out through the wall at low U?
C874
EXIT_HIGH_U
Out through the wall at high U?
C887
EXIT_HIGH_V
Out through the wall at high V?
C89A
EXIT_LOW_V
Out through the wall at low V?
C8AD
IS_NEAR_TO
Is an object near a point?
C8D2
ARCH_NUDGE_TO_CENTRE
Nudge the player towards the middle of an arch
C907
NUDGE_ALONG_V
Nudge along V
C91A
NUDGE_ALONG_U
Nudge along U
C92C
BUILD_ROOM
Build a room's object records from the room directory
CA82
ADJUST_PLYR_UVZ_FOR_ROOM_SIZE
Put the player in the doorway he came in by
CAEE
FIND_ENTRY_ARCH
Line the player up with the arch he comes in by
CB15
ALIGN_V_TO_ARCH
Line up in V with an arch in a wall of constant U
CB29
ALIGN_U_TO_ARCH
Line up in U with an arch in a wall of constant V
CB33
ARCH_AT_HIGH_U
An arch in the wall at high U?
CB3C
ARCH_AT_LOW_U
An arch in the wall at low U?
CB45
ARCH_AT_HIGH_V
An arch in the wall at high V?
CB4E
JUMP_L16_D8
Drawing offset X -16, Y -8, by a jump (graphics 10, 11, 76, 82 and 152 to 159)
CB51
JUMP_L16_D12
Drawing offset X -16, Y -12, by a jump (graphic 77)
CB54
CLEAR_OBJECTS
Clear every object record but the player's
CB5C
CLEAR_SCREEN
Clear the screen's pixels
CB6A
FILL_ATTRS
Fill the screen's attributes with A
CB77
CLEAR_MEMORY
Clear BC bytes from HL
CB81
CLEAR_BUFFER
Clear the screen buffer
CB89
BAN_DROPS
Decide whether things may fall from the sky in this room
CBAB
SKY_DROP
Perhaps drop something from the sky
CC31
RESET_DROP_TIMER
Reset the drop timer: 80 turns while the first quest item is still to do, 8 after
CC4B
HOMER
The update routine for a homer (graphics 48 to 51 and 160 to 167)
CCE9
BOUNCE_U
Bounce off in U: reverse the U velocity
CCF2
BOUNCE_V
Bounce off in V: reverse the V velocity
CCFB
BOUNCE_Z
Unused: bounce off in Z
CD04
ACCEL_PLUS
Speed a homing velocity up the positive way
CD0D
ACCEL_MINUS
Speed a homing velocity up the negative way
CD16
COLLECTABLE
The update routine for a collectable
CD70
SPIKES
The update routine for the spikes
CD75
HEAVY_BLOCK
The update routine for a block that can only fall; and for the table
CD81
PUSHABLE
The update routine for things that fall and can be pushed
CDA0
SINKING_BLOCK
The update routine for a block that sinks under him
CDBB
LIFT
The update routine for the lift
CE31
BOBBER
The update routine for a thing that bobs up and down
CE9A
DEADLY_BOBBER
The update routine for the deadly head that bobs up and down
CEA0
DEADLY_PACER_U
The update routine for things that pace to and fro in U
CEDA
DEADLY_PACER_V
The update routine for things that pace to and fro in V
CF14
PENTAGRAM_PIECE
The update routine for a piece of the pentagram
CF22
SPIDER
The update routine for the spider that scuttles at random
CF68
QUEST_ITEM
The update routine for a quest item
CF9E
CHANGE_GRAPHIC
Give a quest thing a new graphic, in its quest record and its object record
CFB2
BOLT_TOUCHING
Is one of his bolts touching this object?
CFD2
WELL
The update routine for the well
D071
ROOM_OBJECT_LOOP
Set up a walk through the room's 48 object records
D07B
QUEST_RECORD_LOOP
Set up a walk through the quest records
D085
HEAD_FOR_TARGET
Steer towards the place in +15 and +16
D0AC
BUCKET
The update routine for the bucket
D13A
ALL_FOUR_DONE
If all four quest items are done, show the pentagram
D16F
NEW_QUEST
Set out the quest's things for a new game
D1F5
ROAMER
The update routine for a spider that runs straight, and a creature from the sky
D251
SKY_WALKER
The update routine for the walker from the sky
D2AD
CRUMBLING_BLOCK
The update routine for the crumbling block
D2DE
CONVEYOR_PLUS_U
The update routine for a conveyor that carries things forwards in U
D2E9
CONVEYOR_MINUS_U
The update routine for a conveyor that carries things backwards in U
D2F4
CONVEYOR_PLUS_V
The update routine for a conveyor that carries things forwards in V
D2FF
CONVEYOR_MINUS_V
The update routine for a conveyor that carries things backwards in V
D56C
BLIP_BY_TURN
Unused: a blip at a pitch chosen by the turn counter
D5D7
PAUSE_BEEP
The pause beep
D5E4
JUMP_SOUND
The jump's warble
D5F2
EFFECT_NOTE
Play this turn's note of the sound effect under way
D629
FIRE_SOUND
The sound of a bolt being fired
D635
FOOTSTEP
A footstep
D64E
PUFF_SOUND
The sound of a puff
D67B
BEEP
Beep: C waves of half-wave count B
D682
CLICK
One wave
D692
TABLE_WORD
Look up a word in a table
D69C
PLAY_TUNE_ONCE
Play the menu's tune at DE, once, until a key is pressed
D6B5
PLAY_TUNE
Play the tune at DE
D6C0
PLAY_NOTE
Play one note