Address Description
26673
Display input device selection menu
26747
Draw input device selection menu
26788
Display instructions windows
26835
Wait for a key-press then beep
26853
Clear areas of memory and initialise variables
26906
Initialise data and start a new game
27168
Redraw Magic Knight's current room and return to main game loop
27176
Main game loop: Process keyboard input and move Magic Knight, enter menus or execute other command
27490
Handle Magic Knight's fall, preserving x-velocity
27495
Handle Magic Knight's falls
27666
Kill Magic Knight's x-velocity if he cannot horizontally pass through a block beside him
27809
Kill Magic Knight's jump if he cannot vertically pass through a block above him
27865
Move Magic Knight into room A, initialise room-specific data and draw room
28064
Set brickwork direction mode to vertical and reset pointers to beginning of display
28092
Draw bottom in-game window and room name and animate entry (puff of smoke) of a character if required
28272
Print Magic Knight's current room name to top of screen
28344
Room drawing: Draw a 2-by-2 block of brickwork, then move cursor right or down, depending upon brickwork-drawing-direction flag
28510
Blank out bitmap and set attribute to stored value for 2-by-2 character block
28561
Move location to print and terrain interaction cursor down two character rows with y-wrap
28647
Room drawing: Prepare to draw one row of bricks only
28651
Room drawing: Prepare to draw one row of bricks with blank row beneath
28659
Room drawing: Set terrain interaction parameter to preserve-attribute / impassable-vertically
28667
Room drawing: Set terrain interaction parameter to preserve-attribute / impassable-vertically and impassable-horizontally
28675
Room drawing: Set terrain interaction parameter to preserve-attribute
28683
Room drawing: Draw right-facing wall-candle
28747
Room drawing: Draw left-facing wall-candle
28814
Add a glowing character block to the current room
28841
Room drawing: Set attributes, including glow, on lift control panel
28882
Room drawing: Draw picture in frame (2)
28960
Room drawing: Draw picture in frame (2) and replace picture with alternative
29032
Room drawing: Draw picture in frame (1)
29089
Room drawing: Draw picture in frame (1) and replace picture with alternative
29150
Room drawing: Draw goblet picture or character portrait and corresponding picture frame
29184
Room drawing: Read data for and display glowing blocks
29205
Room drawing: Read data for and paint attributes
29225
Room drawing: Draw wall axes
29291
Room drawing: Draw ceiling candles
29356
Room drawing: Point bitmap virtual cursor and terrain interaction cursor to coordinates x=C, y=B
29375
Room drawing: Draw a graphic to screen reading parameters from room layout data
29396
Room drawing: Read sequence of architecture styles and draw appropriate 2-by-2 blocks of brickwork
29414
Room drawing: Read sequence of architecture styles and attributes and draw appropriate 2-by-2 blocks of brickwork
29441
Read two bytes after HL position into C and B respectively, advancing HL before both reads
29446
Set Magic Knight's action flags and prepare to execute room-specific routine for his current room
29468
Check whether Magic Knight is moving into a new room and react if so
29482
Change Magic Knight's current room if possible
29514
Move Magic Knight one room to the left if possible
29546
Move Magic Knight one room to the right if possible
29576
Draw all characters in current room and animate arrival of any new character
29680
Load character's coordinates into BC and graphic lookup index into A and draw to screen
29690
Load object's coordinates into BC and graphic lookup index into A and draw to screen
29709
Animate puff of smoke then draw a character in position
29763
Run checks and updates (Magic Knight's current room and room-specific routines)
29775
Room-specific routine: Do nothing (return) 1
29776
Room-specific routine: Update positions of 4 odd-balls and display
29796
Room-specific routine: Do nothing (return) 2
29797
Room-specific routine: Jump to "kill Magic Knight if he is in a dark room without illumination"
29799
Room-specific routine: Do nothing (return) 3
29800
Room-specific routine: Kill Magic Knight if he is in a dark room without illumination
29874
Room-specific routine: Update position of 1 odd-ball and display
29879
Room-specific routine: Do nothing (return) 4
29880
Room-specific routine: Kill Magic Knight if he is in the gas room without protection
29910
Room-specific routine: Do nothing (return) 5
29911
Room-specific routine: Jump to "update positions of 4 odd-balls and display"
29914
Room-specific routine: Do nothing (return) 6
29915
Room-specific routine: Kill Magic Knight if he has fallen into the pit of destruction
29927
Room-specific routine: Do nothing (return) 7
29928
Room-specific routine: Draw whited-out Gimbal if he has not been freed
29949
Room-specific routine: Do nothing (return) 8
29950
Draw a graphic in XOR mode
29955
Draw a graphic in OR mode
29960
Draw a graphic in NOP mode
30101
Indent "SPELLBOUND" text in bottom window to indicate Magic Knight's current floor
30123
Divide A by eight, rounding down to nearest integer
30129
Draw lift doors if Magic Knight is at lift entrance on a different floor to the lift
30222
Process command to pick up an object
30439
Process command to drop an object
30540
Smash Glowing Bottle
30602
Process command to take an object
30880
Process command to give an object
31153
Display and handle main in-game menu (when fire is pressed)
31370
Process command to examine an object, a character or Magic Knight
31636
Process and execute command to command a character
31722
Send current character to sleep if possible
31763
Wake current character up if possible
31804
Make current character go away if possible
31842
Execute current character's help routine if possible
31920
Make current character eat and drink if possible
31980
Make current character be happy if possible
32035
Process and execute command to locate a character
32194
Process and execute command to teleport
32258
Process and execute command to read an object
32390
Process and execute command to throw an object
32655
Process and execute command to cast a spell
32764
Cast Crystallium Spectralis if possible, otherwise display failure message
32823
Cast Candelium Illuminatus if possible, otherwise display failure message
32876
Kill Magic Knight with exploding candle
32903
Cast Armouris Photonicus if possible, otherwise display failure message
32982
Cast Fumaticus Protectium if possible, otherwise display failure message
33036
Cast Project Physical Body if possible, otherwise display failure message
33129
Cast Release Spell if possible, otherwise display failure message
33180
Show "WELL DONE MAGIC KNIGHT" screen with animated starfield, jumping to game over on key-press
33269
Cast Quiticus Gamus spell and jump to game over
33278
Flash border and screen (as in cast a spell)
33312
Process command to blow an object
33574
Confirm and process blow command (create dust or racket) then return to game
33593
Process command to call lift
33663
Process command to move lift
33770
Set the lift as not being at any floor at all
33788
Flash border and make sound (as in move lift)
33808
Display "[CHARACTER] CANNOT HELP YOU" window and return to game
33811
Command-character-to-help routine for Thor
33883
Command-character-to-help routine for Florin
33932
Command-character-to-help routine for Orik
33935
Command-character-to-help routine for Samsun
33993
Command-character-to-help routine for Elrand
34062
Command-character-to-help routine for Rosmar
34106
Command-character-to-help routine for the Banshee
34126
Get the weight of an object
34137
Load happiness of current character into A
34151
Load an object into the first empty inventory slot of a character
34160
Point HL to property (given by E) of object whose index is A
34174
Point HL at property (given by E) of character whose index is A
34186
Point IX at current inventory of character A
34202
Prepare to check whether Magic Knight can pick up an object
34224
Test whether current object is too heavy for a character to pick up
34256
Check whether Magic Knight is carrying an object
34268
Insert current time and score into "TIME LEFT" and "PERCENTAGE COMPLETION" texts
34350
Check if current character is asleep and display "[CHARACTER] IS ASLEEP" window if so
34385
Load Magic Knight's coordinates (in characters) into DE
34402
Point HL to current position data for current character
34418
Display "YOUR HANDS ARE FULL" window and return to game
34424
Display "THAT OBJECT IS TOO HEAVY" window and return to game
34430
Display "THERE IS NOTHING NEAR ENOUGH" window and return to game
34436
Display "THERE IS NOTHING IN THIS ROOM" window and return to game
34442
Display "YOU CANNOT DROP THAT OBJECT" window and return to game
34448
Display "[CHARACTER]'S HANDS ARE EMPTY" window and return to game
34454
Display "[CHARACTER] WANTS TO KEEP THAT" window and return to game
34460
Display "[CHARACTER]'S HANDS ARE FULL" window and return to game
34466
Display "[CHARACTER] IS NOT STRONG ENOUGH" window and return to game
34472
Display "[CHARACTER] DOES NOT WANT THAT" window and return to game
34478
Display "[CHARACTER] IS ALREADY ASLEEP" window and return to game
34484
Display "[CHARACTER] IS TOO WAKEFUL TO SLEEP" window and return to game
34490
Display "[CHARACTER] DOES NOT WANT TO BE COMMANDED BY YOU" window and return to game
34496
Display "[CHARACTER] IS ALREADY AWAKE" window and return to game
34502
Display "[CHARACTER] IS TOO TIRED TO WAKE UP" window and return to game
34508
Display "[CHARACTER] IS TOO TIRED TO GO AWAY" window and return to game
34514
Display "[CHARACTER] CANNOT HELP YOU" window and return to game
34520
Display "[CHARACTER] IS TOO TIRED TO HELP YOU" window and return to game
34526
Display "[CHARACTER] HAS NO FOOD LEFT" window and return to game
34532
Display "[CHARACTER] IS TOO TIRED TO EAT OR DRINK" window and return to game
34538
Display "[CHARACTER] IS TOO TIRED TO BE HAPPY" window and return to game
34544
Display "THE LIFT IS HERE" window and return to game
34552
Display "THE LIFT HAS ARRIVED" window and return to game
34560
Display "WHAT A RACKET..." window and return to game
34568
Display "WHAT A LOT OF DUST..." window and return to game
34576
Display "THERE IS NO WRITING FOR ME TO READ" window and return to game
34584
Display "IT IS NOT SAFE TO TELEPORT..." window and return to game
34592
Display "THE LIQUID IS STUCK TO THE FLOOR..." window and return to game
34598
Display "[CHARACTER] IS ASLEEP" window and return to game
34604
Display "[CHARACTER] DOES NOT WANT TO BE SUMMONED" window and return to game
34610
Display "[CHARACTER] IS TOO TIRED TO BE SUMMONED" window and return to game
34616
Display "[CHARACTER] IS ALREADY HERE!" window and return to game
34622
Display "[CHARACTER] DOES NOT WANT TO COME TO SUCH A CROWDED ROOM!" window and return to game
34628
Display "[CHARACTER] APPEARS IN A THICK PUFF OF SMOKE" window and return to game
34634
Display "THAT SPELL CANNOT YET BE CAST..." window and return to game
34640
Display "THE SPELL HAS WORKED! GIMBAL IS NEARLY FREE" window and return to game
34646
Display "SUCCESS ! GIMBAL IS FREE AT LAST" window and return to game
34652
Display Candelium Illuminatus successful window and return to game
34658
Display Armouris Photonicus successful window and return to game
34664
Display "GIMBAL IS ALREADY FREE" window and return to game
34670
Display "THE CANDLE IS ALREADY ALIGHT" window and return to game
34676
Display "YOUR ARMOUR IS GLOWING ALREADY" window and return to game
34682
Display "YOU HAVE ALL THE PROTECTION YOU NEED AGAINST GAS ALREADY" window and return to game
34688
Display Fumaticus Protectium successful window and return to game
34694
Display Project Physical Body successful window and return to game
34700
Display Gimbal's telepathic whisper window and return to game
34706
Display Blue-Crystal-used-successfully window and return to game
34712
Display Red-Crystal-used-successfully window and return to game
34718
Display Green-Crystal-used-successfully window and return to game
34724
Display "THE [OBJECT] LANDED ON THE FLOOR BY [CHARACTER]" window and return to game
34730
Display "THE LIFT IS BROKEN..." window and return to game
34738
Display "[CHARACTER] HAS GONE TO SLEEP" window and return to game
34744
Display "[CHARACTER] HAS WOKEN UP" window and return to game
34750
Display "[CHARACTER] HAS GONE AWAY" window and return to game
34756
Display "[CHARACTER] HAS TAKEN REFRESHMENT" window and return to game
34762
Display "[CHARACTER] WILL TRY TO BE HAPPY" window and return to game
34768
Adjust the height and display a message window, then return to game
34799
Draw window (index 2) with text at HL
34803
Draw window (index 13) with text at HL
34808
Draw window (index 28, summoning messages) with text at HL
34812
Draw window (index 29) with text at HL
34816
Draw window (index 35) with text at HL
34821
Update Magic Knight's current frame based on x-coordinate
34842
Advance HL to B-th entry in list of zero-terminated strings (e.g. object names table)
34854
Advance HL to the B-th entry in list of readable objects' texts then return
34859
Advance HL to the B-th entry in list of option texts from "command a character" menu then return
34864
Point DE at name of a selected object in object names table and print in command summary window
34883
Update current character based upon selection made in menu
34907
Display a character's inventory window as an information window
34914
Show list of objects (window or menu) and handle selection if a menu
35101
Display cyan "game over" window and return to pre-game menu
35141
Display and process input for character selection menu (current room's characters only)
35293
Display and process input for character selection menu for "travel to", "summon" or "locate"
35393
Display warning and abort if command is not safe while Gimbal is whited-out
35495
Set Magic Knight's available action flags
35536
Set the command-a-character-enabled flag if carrying the Wand of Command
35567
Set the locate-enabled flag if carrying the Crystal Ball
35598
Set the teleport-enabled flag if carrying the Teleport Key
35629
Set the read-enabled flag if carrying a readable object
35669
Set the throw-enabled flag if carrying a throwable object
35709
Set the cast-a-spell-enabled flag if carrying a magic object
35749
Set the blow-enabled flag if carrying a blowable object
35789
Set the call-lift-enabled flag if in the first room of a floor
35815
Set the move-lift-enabled flag if in the lift
35837
Insert numeric stats (at HL) of a character into "examine character" window text
35887
Insert numeric / text stats of an object into "examine object" window text
35931
Get number of characters in room A and load their indices into list
35993
Update position of odd ball, display, and decrease Magic Knight's strength if in contact
36173
Multiply x- or y-velocity of odd-ball by minus one
36215
Draw strength bar at bottom of screen
36275
Draw objects in Magic Knight's inventory to bottom of screen if he is carrying the Mirror
36327
Assign a slot in room C to character B
36475
Print a character (e.g. letter in the current room name, or a block of a window border)
36510
Draw a single character block part of a wall, ceiling or floor
36551
Move bitmap virtual cursor to display file address for coordinates x=C, y=B
36569
Update virtual attribute cursor to attribute file for coordinates x=C, y=B
36586
Point HL at terrain interaction data for character coordinates x=C, y=B
36606
Advance display file pointer to next location (for printing room name)
36626
Advance display file pointer by two characters
36647
Splice numeric data A as a string into a string at HL
36692
Convert leading zeroes to spaces in a string number
36703
Get start of next zero-terminated string
36709
Store and point HL at attribute file address for character just printed
36725
Print text at location HL to screen
36800
Move virtual text cursor down to start of next row
36810
Move virtual text cursor down to start of next row within current window
36830
Print special character or change text attribute
36875
Move virtual text cursor right by one character
36882
Print the current object's name
36892
Print the current character's full name
36900
Print the current character's short name
36908
Draw an edge of frame of a window
36919
Draw window frame for character portraits (2nd floor) and goblet picture in Florin's room
36979
Draw a menu window
36987
Draw a window
37147
Draw a window frame
37333
Process keyboard / joystick input on a menu
37472
Wait for keyboard to be released
37486
Wait for fire button / key to be released
37497
Move hand cursor up and update flashing menu shortcut
37523
Move hand cursor down and update flashing menu shortcut
37552
Load A with ASCII code of shortcut for selected item in menu
37566
Remove FLASH attribute from menu letter shortcut next to hand menu cursor
37571
Apply FLASH attribute to menu letter shortcut next to hand menu cursor
37613
Load A with ASCII code of character in stored display file address
37654
Print or update command summary window at bottom of screen
37703
Move virtual text cursor to beginning of character row below its current position
37719
Move virtual text cursor to beginning of character row two rows below its current position
37735
Move virtual text cursor from one third to another in display file
37746
Convert numeric value BC to ASCII string at location HL
37816
Clear display file
37841
Flood attribute file with stored attribute value
37857
Change input device (keyboard / joysticks)
37876
Jump to input reading routine
37884
Capture keyboard input
37928
Capture Kempston joystick input
37959
Capture Fuller joystick input
37990
Capture cursor joystick input
38027
Capture ZX Interface 2 joystick 1 input
38060
Store a "left" input from control device
38063
Store a "right" input from control device
38066
Store an "up" input from control device
38069
Store a "down" input from control device
38072
Store a "fire" input from control device
38075
Set parameters for and play upward scale sound
38108
Set parameters for and play downward scale sound
38116
Set parameters for and play short downward scale sound
38124
Play hiss-type sound
38175
Set parameters (for "lift has arrived" sound) and jump to playing routine
38183
Set parameters (for cheat routine sound) and play
38212
Get current border colour
38221
Play "beep" sound (as in moving through instructions windows)
38242
Fill the interior of a drawn window with its specified attribute (i.e. background colour and colour of text within)
38296
Scroll hand cursor up a unit
38356
Scroll hand cursor down a unit
38417
Blank an area of the display file
38486
Set new random seed
38505
Load A with a random number less than or equal to B
38512
Set terrain interaction data for, and draw, all objects in Magic Knight's current room
38539
Set terrain interaction data for character blocks spanned by an object and draw the object
38674
Remove object C from a character's inventory and tidy up remaining entries
38693
Print command summary in command summary window at bottom of screen
38725
Display execute / reject command window and return if execute chosen, otherwise exit
38749
Display "PRESS SPACE OR FIRE TO CONTINUE" window and wait for space / fire
38795
Reset star to point of origin and generate a new direction and movement data
38884
Animate starfield until a key is pressed
38961
Reset all stars to point of origin and generate new velocities and movement data
39016
Set up star movement data based upon starting position and direction
39081
Move a star depending upon the signs and magnitudes of its "direction"
39125
Draw odd ball to screen
39175
Shift odd ball graphic data right by C pixels and load into D (L.H.S.) and A' (R.H.S.)
39200
Advance HL down one pixel row in display file
39224
Draw Magic Knight (erase old frame and draw new frame)
39989
Update attributes at Magic Knight's predicted position
54853
Call time-dependent routines (main interrupt routine)
54955
Interrupt routine: Update glowing character on input selection menu
54976
Interrupt routine: Write current attribute for a glowing block to attribute file
54983
Interrupt routine: Update glowing blocks' attribute to next colour in sequence
54996
Update game time, time left and, every minute, read-text of Crystal Ball
55077
Update all characters' stats (deteriorate or regenerate) and wake up / send to sleep if required
55219
Update characters' stats as they tire or regenerate
55233
Interrupt routine: If character is free and awake, then update their current room if possible
55349
Move the lift to a random floor if Magic Knight is not nearby
55404
Load A with new room index for a character to move into
55461
Interrupt routine: End game due to a character starving to death
55478
Interrupt routine: End game due to running out of time
55546
Store all registers on the stack
55574
Interrupt routine: Restore all registers from the stack
65524
Interrupt routine: second jump
65535
Interrupt routine: first jump