{
 "schema": 1,
 "platform": "spectrum",
 "game": "lords-of-chaos",
 "part": "designer",
 "build": "",
 "source": "control file",
 "regions": {
  "exclude": [
   [
    0,
    16383,
    "ROM"
   ],
   [
    0,
    53250,
    "The engine"
   ],
   [
    57889,
    65535,
    "The engine"
   ]
  ],
  "extra": [],
  "edges": [
   16384,
   32768,
   49152
  ],
  "elsewhere": [
   [
    0,
    53250,
    "The engine"
   ],
   [
    57889,
    65535,
    "The engine"
   ]
  ]
 },
 "blocks": [
  {
   "start": 53251,
   "end": 53252,
   "type": "Word"
  },
  {
   "start": 53253,
   "end": 53254,
   "type": "Word"
  },
  {
   "start": 53255,
   "end": 53256,
   "type": "Word"
  },
  {
   "start": 53257,
   "end": 53258,
   "type": "Word"
  },
  {
   "start": 53259,
   "end": 53260,
   "type": "Word"
  },
  {
   "start": 53261,
   "end": 53262,
   "type": "Word"
  },
  {
   "start": 53263,
   "end": 53264,
   "type": "Word"
  },
  {
   "start": 53265,
   "end": 53266,
   "type": "Word"
  },
  {
   "start": 53267,
   "end": 53268,
   "type": "Word"
  },
  {
   "start": 53269,
   "end": 53270,
   "type": "Word"
  },
  {
   "start": 53271,
   "end": 53272,
   "type": "Word"
  },
  {
   "start": 53273,
   "end": 53274,
   "type": "Word"
  },
  {
   "start": 53275,
   "end": 53277,
   "type": "Code"
  },
  {
   "start": 53278,
   "end": 53280,
   "type": "Code"
  },
  {
   "start": 53281,
   "end": 53283,
   "type": "Code"
  },
  {
   "start": 53284,
   "end": 53286,
   "type": "Code"
  },
  {
   "start": 53287,
   "end": 53289,
   "type": "Code"
  },
  {
   "start": 53290,
   "end": 53292,
   "type": "Code"
  },
  {
   "start": 53293,
   "end": 53295,
   "type": "Code"
  },
  {
   "start": 53296,
   "end": 53297,
   "type": "Word"
  },
  {
   "start": 53298,
   "end": 53299,
   "type": "Word"
  },
  {
   "start": 53300,
   "end": 53301,
   "type": "Word"
  },
  {
   "start": 53302,
   "end": 53303,
   "type": "Word"
  },
  {
   "start": 53304,
   "end": 53305,
   "type": "Word"
  },
  {
   "start": 53306,
   "end": 53307,
   "type": "Word"
  },
  {
   "start": 53308,
   "end": 53308,
   "type": "Byte"
  },
  {
   "start": 53309,
   "end": 53310,
   "type": "Word"
  },
  {
   "start": 53311,
   "end": 53311,
   "type": "Byte"
  },
  {
   "start": 53312,
   "end": 53312,
   "type": "Byte"
  },
  {
   "start": 53313,
   "end": 53313,
   "type": "Byte"
  },
  {
   "start": 53314,
   "end": 53314,
   "type": "Byte"
  },
  {
   "start": 53315,
   "end": 53315,
   "type": "Byte"
  },
  {
   "start": 53316,
   "end": 53316,
   "type": "Byte"
  },
  {
   "start": 53317,
   "end": 53317,
   "type": "Byte"
  },
  {
   "start": 53318,
   "end": 53318,
   "type": "Byte"
  },
  {
   "start": 53319,
   "end": 53319,
   "type": "Byte"
  },
  {
   "start": 53320,
   "end": 53320,
   "type": "Byte"
  },
  {
   "start": 53321,
   "end": 53322,
   "type": "Byte"
  },
  {
   "start": 53323,
   "end": 53327,
   "type": "Byte"
  },
  {
   "start": 53328,
   "end": 53331,
   "type": "Byte"
  },
  {
   "start": 53332,
   "end": 53335,
   "type": "Byte"
  },
  {
   "start": 53336,
   "end": 53339,
   "type": "Byte"
  },
  {
   "start": 53340,
   "end": 53343,
   "type": "Byte"
  },
  {
   "start": 53344,
   "end": 53345,
   "type": "Word"
  },
  {
   "start": 53346,
   "end": 53346,
   "type": "Byte"
  },
  {
   "start": 53347,
   "end": 53347,
   "type": "Byte"
  },
  {
   "start": 53348,
   "end": 53348,
   "type": "Byte"
  },
  {
   "start": 53349,
   "end": 53349,
   "type": "Byte"
  },
  {
   "start": 53350,
   "end": 53350,
   "type": "Byte"
  },
  {
   "start": 53351,
   "end": 53351,
   "type": "Byte"
  },
  {
   "start": 53352,
   "end": 53352,
   "type": "Byte"
  },
  {
   "start": 53353,
   "end": 53353,
   "type": "Byte"
  },
  {
   "start": 53354,
   "end": 53361,
   "type": "Word"
  },
  {
   "start": 53362,
   "end": 53369,
   "type": "Word"
  },
  {
   "start": 53370,
   "end": 53377,
   "type": "Word"
  },
  {
   "start": 53378,
   "end": 53447,
   "type": "Byte"
  },
  {
   "start": 53448,
   "end": 53449,
   "type": "Byte"
  },
  {
   "start": 53450,
   "end": 53451,
   "type": "Word"
  },
  {
   "start": 53452,
   "end": 53453,
   "type": "Byte"
  },
  {
   "start": 53454,
   "end": 53455,
   "type": "Word"
  },
  {
   "start": 53456,
   "end": 53456,
   "type": "Byte"
  },
  {
   "start": 53457,
   "end": 53458,
   "type": "Byte"
  },
  {
   "start": 53459,
   "end": 53460,
   "type": "Byte"
  },
  {
   "start": 53461,
   "end": 53462,
   "type": "Byte"
  },
  {
   "start": 53463,
   "end": 53463,
   "type": "Byte"
  },
  {
   "start": 53464,
   "end": 53464,
   "type": "Byte"
  },
  {
   "start": 53465,
   "end": 53465,
   "type": "Byte"
  },
  {
   "start": 53466,
   "end": 53466,
   "type": "Byte"
  },
  {
   "start": 53467,
   "end": 53468,
   "type": "Word"
  },
  {
   "start": 53469,
   "end": 53469,
   "type": "Byte"
  },
  {
   "start": 53470,
   "end": 53470,
   "type": "Byte"
  },
  {
   "start": 53471,
   "end": 53471,
   "type": "Byte"
  },
  {
   "start": 53472,
   "end": 53475,
   "type": "Byte"
  },
  {
   "start": 53476,
   "end": 53535,
   "type": "Byte"
  },
  {
   "start": 53536,
   "end": 53553,
   "type": "Byte"
  },
  {
   "start": 53554,
   "end": 53575,
   "type": "Byte"
  },
  {
   "start": 53576,
   "end": 53605,
   "type": "Byte"
  },
  {
   "start": 53606,
   "end": 53607,
   "type": "Byte"
  },
  {
   "start": 53608,
   "end": 53625,
   "type": "Byte"
  },
  {
   "start": 53626,
   "end": 53663,
   "type": "Byte"
  },
  {
   "start": 53664,
   "end": 53677,
   "type": "Byte"
  },
  {
   "start": 53678,
   "end": 53685,
   "type": "Byte"
  },
  {
   "start": 53686,
   "end": 53687,
   "type": "Word"
  },
  {
   "start": 53688,
   "end": 53695,
   "type": "Byte"
  },
  {
   "start": 53696,
   "end": 53715,
   "type": "Byte"
  },
  {
   "start": 53716,
   "end": 53735,
   "type": "Byte"
  },
  {
   "start": 53736,
   "end": 53749,
   "type": "Byte"
  },
  {
   "start": 53750,
   "end": 53754,
   "type": "Byte"
  },
  {
   "start": 53755,
   "end": 53767,
   "type": "Byte"
  },
  {
   "start": 53768,
   "end": 54157,
   "type": "Byte"
  },
  {
   "start": 54158,
   "end": 54235,
   "type": "Byte"
  },
  {
   "start": 54236,
   "end": 54292,
   "type": "Code"
  },
  {
   "start": 54293,
   "end": 54305,
   "type": "Code"
  },
  {
   "start": 54306,
   "end": 54317,
   "type": "Word"
  },
  {
   "start": 54318,
   "end": 54362,
   "type": "Code"
  },
  {
   "start": 54363,
   "end": 54444,
   "type": "Code"
  },
  {
   "start": 54445,
   "end": 54485,
   "type": "Code"
  },
  {
   "start": 54486,
   "end": 54538,
   "type": "Code"
  },
  {
   "start": 54539,
   "end": 54663,
   "type": "Code"
  },
  {
   "start": 54664,
   "end": 54707,
   "type": "Code"
  },
  {
   "start": 54708,
   "end": 54734,
   "type": "Code"
  },
  {
   "start": 54735,
   "end": 54777,
   "type": "Code"
  },
  {
   "start": 54778,
   "end": 54812,
   "type": "Code"
  },
  {
   "start": 54813,
   "end": 54840,
   "type": "Code"
  },
  {
   "start": 54841,
   "end": 54984,
   "type": "Byte"
  },
  {
   "start": 54985,
   "end": 55395,
   "type": "Byte"
  },
  {
   "start": 55396,
   "end": 55439,
   "type": "Byte"
  },
  {
   "start": 55440,
   "end": 55885,
   "type": "Byte"
  },
  {
   "start": 55886,
   "end": 55993,
   "type": "Byte"
  },
  {
   "start": 55994,
   "end": 56099,
   "type": "Code"
  },
  {
   "start": 56100,
   "end": 56147,
   "type": "Code"
  },
  {
   "start": 56148,
   "end": 56230,
   "type": "Code"
  },
  {
   "start": 56231,
   "end": 56278,
   "type": "Code"
  },
  {
   "start": 56279,
   "end": 56446,
   "type": "Code"
  },
  {
   "start": 56447,
   "end": 56448,
   "type": "Word"
  },
  {
   "start": 56449,
   "end": 56449,
   "type": "Byte"
  },
  {
   "start": 56450,
   "end": 56451,
   "type": "Word"
  },
  {
   "start": 56452,
   "end": 56541,
   "type": "Byte"
  },
  {
   "start": 56542,
   "end": 56545,
   "type": "Code"
  },
  {
   "start": 56546,
   "end": 56552,
   "type": "Byte"
  },
  {
   "start": 56553,
   "end": 56559,
   "type": "Byte"
  },
  {
   "start": 56560,
   "end": 56566,
   "type": "Byte"
  },
  {
   "start": 56567,
   "end": 56573,
   "type": "Byte"
  },
  {
   "start": 56574,
   "end": 56580,
   "type": "Byte"
  },
  {
   "start": 56581,
   "end": 56864,
   "type": "Code"
  },
  {
   "start": 56865,
   "end": 56928,
   "type": "Code"
  },
  {
   "start": 56929,
   "end": 56980,
   "type": "Code"
  },
  {
   "start": 56981,
   "end": 57002,
   "type": "Code"
  },
  {
   "start": 57003,
   "end": 57152,
   "type": "Code"
  },
  {
   "start": 57153,
   "end": 57189,
   "type": "Code"
  },
  {
   "start": 57190,
   "end": 57191,
   "type": "Word"
  },
  {
   "start": 57192,
   "end": 57230,
   "type": "Byte"
  },
  {
   "start": 57231,
   "end": 57282,
   "type": "Code"
  },
  {
   "start": 57283,
   "end": 57386,
   "type": "Code"
  },
  {
   "start": 57387,
   "end": 57398,
   "type": "Byte"
  },
  {
   "start": 57399,
   "end": 57761,
   "type": "Code"
  },
  {
   "start": 57762,
   "end": 57767,
   "type": "Word"
  },
  {
   "start": 57768,
   "end": 57783,
   "type": "Code"
  },
  {
   "start": 57784,
   "end": 57835,
   "type": "Code"
  },
  {
   "start": 57836,
   "end": 57836,
   "type": "Byte"
  },
  {
   "start": 57837,
   "end": 57888,
   "type": "Code"
  }
 ],
 "symbols": [
  {
   "address": 53251,
   "name": "scenario_types",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53253,
   "name": "scenario_objects",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53255,
   "name": "scenario_terrain_chars",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53257,
   "name": "scenario_small_font",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53259,
   "name": "scenario_messages",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53261,
   "name": "scenario_words",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53263,
   "name": "scenario_routes",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53265,
   "name": "scenario_route_flags",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53267,
   "name": "scenario_waypoints",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53269,
   "name": "scenario_independents",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53271,
   "name": "scenario_trip_squares",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53273,
   "name": "scenario_spell_routines",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53275,
   "name": "hook_start",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53278,
   "name": "hook_classify_step",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53281,
   "name": "hook_after_step",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53284,
   "name": "hook_use_square",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53287,
   "name": "hook_turn_start",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53290,
   "name": "hook_select_menu",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53293,
   "name": "hook_read",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53296,
   "name": "scenario_map",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53298,
   "name": "scenario_things",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53300,
   "name": "scenario_frames",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53302,
   "name": "scenario_colour_sets",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53304,
   "name": "scenario_graphics",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53306,
   "name": "scenario_names",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53308,
   "name": "charset_in_use",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53309,
   "name": "charset_address",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53311,
   "name": "scenario_number",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53312,
   "name": "portal_first_turn",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53313,
   "name": "portal_turn_range",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53314,
   "name": "portal_turns_left",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53315,
   "name": "start_square_count",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53316,
   "name": "portal_square_count",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53317,
   "name": "escape_bonus",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53318,
   "name": "computer_mana_reserve",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53319,
   "name": "route_count",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53320,
   "name": "one_player",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53321,
   "name": "dieback_terrain",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53323,
   "name": "fire_strength",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53328,
   "name": "blob_strength",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53332,
   "name": "shields",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53336,
   "name": "victory_points",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53340,
   "name": "final_scores",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53344,
   "name": "portal_square",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53346,
   "name": "portal_turn_number",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53347,
   "name": "computer_moving",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53348,
   "name": "versus_computer",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53349,
   "name": "turn_number",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53350,
   "name": "turn_hidden",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53351,
   "name": "player_count",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53352,
   "name": "saves_used",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53353,
   "name": "wizards_out",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53354,
   "name": "portal_squares",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53362,
   "name": "start_squares",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53370,
   "name": "charset_table",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53378,
   "name": "scenario_wizard",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53448,
   "name": "placement_chances",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53450,
   "name": "draw_map_screen",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53452,
   "name": "scan_square",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53454,
   "name": "draw_map_square",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53456,
   "name": "cursor_on",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53457,
   "name": "cursor_offset",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53459,
   "name": "cursor_square",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53461,
   "name": "draw_row",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53463,
   "name": "info_cleared",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53464,
   "name": "cursor_moved",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53465,
   "name": "in_use_type",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53466,
   "name": "in_use_index",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53467,
   "name": "in_use_entry",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53469,
   "name": "objects_here_count",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53470,
   "name": "carried_count",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53471,
   "name": "interrupt_flags",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53472,
   "name": "mana",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53476,
   "name": "enemy_list",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53536,
   "name": "flee_squares",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53554,
   "name": "object_counts",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53576,
   "name": "objects_seen",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53606,
   "name": "unused_D166",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53608,
   "name": "object_lists",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53626,
   "name": "computer_figures",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53664,
   "name": "found_count",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53678,
   "name": "creatures_here",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53686,
   "name": "computer_target",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53688,
   "name": "computer_scratch",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53696,
   "name": "carried_list",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53716,
   "name": "objects_here",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53736,
   "name": "menu_list",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53750,
   "name": "bar_lengths",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53755,
   "name": "figures",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 53768,
   "name": "terrain_records",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54158,
   "name": "terrain_flags",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54236,
   "name": "designer_panel",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54293,
   "name": "designer_option",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54306,
   "name": "designer_actions",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54318,
   "name": "draw_designer_panel",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54363,
   "name": "list_designer_wizards",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54445,
   "name": "design_wizard_option",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54486,
   "name": "load_wizard_option",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54539,
   "name": "save_wizard_option",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54664,
   "name": "delete_wizard_option",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54708,
   "name": "copy_name_to_slot",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54735,
   "name": "print_number_4",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54778,
   "name": "print_digit_4",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54813,
   "name": "print_designer_message",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54841,
   "name": "designer_messages",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 54985,
   "name": "designer_words",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 55396,
   "name": "designer_names",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 55440,
   "name": "designer_spell_names",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 55886,
   "name": "designer_screen_words",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 55994,
   "name": "spells_screen",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56100,
   "name": "show_spells",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56148,
   "name": "designer_spell_line",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56231,
   "name": "spell_figures",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56279,
   "name": "spells_edit",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56447,
   "name": "experience_points",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56449,
   "name": "original_level",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56450,
   "name": "spell_byte",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56452,
   "name": "spell_costs",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56542,
   "name": "unused_DCDE",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56546,
   "name": "start_figures",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56553,
   "name": "current_figures",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56560,
   "name": "most_figures",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56567,
   "name": "figure_costs",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56574,
   "name": "figure_divisors",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56581,
   "name": "character_screen",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56865,
   "name": "print_figures",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56929,
   "name": "highlight_figure",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 56981,
   "name": "figure_cost",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57003,
   "name": "name_screen",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57153,
   "name": "show_name_entry",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57190,
   "name": "name_pointer",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57192,
   "name": "name_keys",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57231,
   "name": "unused_highlight",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57283,
   "name": "unused_things",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57387,
   "name": "new_wizard_figures",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57399,
   "name": "design_wizard",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57675,
   "name": "design_exit",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57762,
   "name": "design_actions",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57768,
   "name": "run_design_action",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57784,
   "name": "highlight_design_option",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57836,
   "name": "design_choice",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 57837,
   "name": "program_start",
   "type": "UserDefined",
   "kind": "user"
  }
 ],
 "comments": [
  {
   "address": 53251,
   "type": "line",
   "text": "The scenario header starts here: the first of the pointers to the scenario's tables, to the creature types, twelve bytes for each type from $90 (type_record). The program's block carries scenario 1's header, its numbers, squares and wizard byte for byte, with every pointer in it turned to $D3DC, the designer's file panel (the names pointer to $D3D2), and the hooks at $D01B and $D01E turned to JP $D3DC. Its scenario number, $D03F, still reads 1, but the designer's panel offers no PLAY GAME; LOAD SCENARIO reads a real header over all of it."
  },
  {
   "address": 53253,
   "type": "line",
   "text": "Pointer to the scenario's object records, six bytes for each object type from $50 (object_record): its worth, weight, two figures that are combat and defence for a weapon and healing and mana for something to eat, thrown damage and flags."
  },
  {
   "address": 53255,
   "type": "line",
   "text": "Pointer to the big map's table of each terrain's character and colour (big_map_terrain)."
  },
  {
   "address": 53257,
   "type": "line",
   "text": "Pointer to the small font the big map draws its squares in (big_map)."
  },
  {
   "address": 53259,
   "type": "line",
   "text": "Pointer to the scenario's messages: each a length byte, then word numbers and control codes (print_message)."
  },
  {
   "address": 53261,
   "type": "line",
   "text": "Pointer to the scenario's words: each a length byte, then its characters."
  },
  {
   "address": 53263,
   "type": "line",
   "text": "Pointer to the computer's routes: each a length in its low seven bits, then waypoint numbers (route_address)."
  },
  {
   "address": 53265,
   "type": "line",
   "text": "Pointer to a flag byte for each route, which says what kind of creature may take it (add_to_wizard_list)."
  },
  {
   "address": 53267,
   "type": "line",
   "text": "Pointer to the waypoints the routes name: a square, two bytes, each (waypoint_square)."
  },
  {
   "address": 53269,
   "type": "line",
   "text": "Pointer to the independent creatures' orders: four bytes a creature, its entry, route, step on the route and orders (guard, wait, release group), as find_in_list reads them."
  },
  {
   "address": 53271,
   "type": "line",
   "text": "Pointer to the trip squares: three bytes each, row, column and the group of waiting creatures released when the square changes (a door there unlocked, opened or closed, a chest there opened, its terrain set), ending with $FE (trip_square)."
  },
  {
   "address": 53273,
   "type": "line",
   "text": "Pointer to the scenario's routines for the spells from $20 up, one word a spell, which the computer's wizard and scenario_spell jump to."
  },
  {
   "address": 53275,
   "type": "line",
   "text": "The scenario's first hook, a JP: start_game calls it before the start-up routine at $FE03."
  },
  {
   "address": 53278,
   "type": "line",
   "text": "The hook, a JP, that classify_step's verdict on a step ($FF8F) passes through, so that the scenario can change what a step means; select_ground and computer_try_steps both call it."
  },
  {
   "address": 53281,
   "type": "line",
   "text": "Three bytes, a RET or a JP: called after a creature has moved a square, by select_ground for a human's creature and by computer_step_move for the computer's."
  },
  {
   "address": 53284,
   "type": "line",
   "text": "Three bytes, the hook use_square ends at for everything it does not do itself: USE by a creature in the air, on a square where a creature stands on the ground or two creatures stand, and on anything but a door or chest that opens, closes or unlocks."
  },
  {
   "address": 53287,
   "type": "line",
   "text": "Three bytes: start_of_turn calls it for each of the player's creatures once that creature is the selected one, after its upkeep."
  },
  {
   "address": 53290,
   "type": "line",
   "text": "Three bytes: select_menu calls it just before it adds CANCEL, so that the scenario can add options of its own."
  },
  {
   "address": 53293,
   "type": "line",
   "text": "Three bytes: READ in the select menu (option $15 of select_actions) runs it."
  },
  {
   "address": 53296,
   "type": "line",
   "text": "Pointer to the map, 36 rows of 36 bytes, one a square (map_address)."
  },
  {
   "address": 53298,
   "type": "line",
   "text": "Pointer to the table of things, five bytes for each value a map byte can hold (terrain, object or creature): its character set, graphic and colour set, then its animation, the frames left and the next frame (thing_graphic)."
  },
  {
   "address": 53300,
   "type": "line",
   "text": "Pointer to the animation frames, four bytes each: graphic, colour set, count and next frame (next_frame)."
  },
  {
   "address": 53302,
   "type": "line",
   "text": "Pointer to the colour sets, nine attributes a set (draw_block)."
  },
  {
   "address": 53304,
   "type": "line",
   "text": "Pointer to the graphics, nine character numbers each, three rows of three (draw_block)."
  },
  {
   "address": 53306,
   "type": "line",
   "text": "Pointer to the table of the players' names, eleven bytes a player, which copy_wizard_name fills."
  },
  {
   "address": 53308,
   "type": "line",
   "text": "The number of the character set the map graphics are being drawn from (thing_graphic)."
  },
  {
   "address": 53309,
   "type": "line",
   "text": "The address of that character set, from charset_table."
  },
  {
   "address": 53311,
   "type": "line",
   "text": "The scenario's number, 1 to 3; 0 means no scenario is loaded, and PLAY GAME does nothing."
  },
  {
   "address": 53312,
   "type": "line",
   "text": "The earliest turn the portal can open on."
  },
  {
   "address": 53313,
   "type": "line",
   "text": "set_up_game adds a random number below this to portal_first_turn to choose the portal's turn."
  },
  {
   "address": 53314,
   "type": "line",
   "text": "How many turns the portal stays open; counted down once it has opened (portal_turn)."
  },
  {
   "address": 53315,
   "type": "line",
   "text": "How many of the start squares at start_squares to choose from."
  },
  {
   "address": 53316,
   "type": "line",
   "text": "How many of the squares at portal_squares the portal can open on."
  },
  {
   "address": 53317,
   "type": "line",
   "text": "The victory points a wizard earns for escaping through the portal (step_effects)."
  },
  {
   "address": 53318,
   "type": "line",
   "text": "The mana the computer's wizard keeps back when it summons with no enemy in view (computer_summon)."
  },
  {
   "address": 53319,
   "type": "line",
   "text": "How many routes the scenario has (add_to_wizard_list)."
  },
  {
   "address": 53320,
   "type": "line",
   "text": "Not 0 for a scenario that is for one player only: HOW MANY PLAYERS? is not asked, and each wizard starts on its own square."
  },
  {
   "address": 53321,
   "type": "line",
   "text": "The terrain that magic fire and gooey blob die back to, one byte each (spread_magic)."
  },
  {
   "address": 53323,
   "type": "line",
   "text": "The strength of each player's magic fire, players 0 to 4 (0 is the wild fire), set from the spell's level when it is cast and used to spread it and to hurt creatures in it."
  },
  {
   "address": 53328,
   "type": "line",
   "text": "The strength of each player's gooey blob, players 1 to 4, the spell's level less 1."
  },
  {
   "address": 53332,
   "type": "line",
   "text": "Each wizard's magic shield, the turns it has left; it adds to the wizard's defence (magic_shield)."
  },
  {
   "address": 53336,
   "type": "line",
   "text": "Each player's victory points, players 1 to 4."
  },
  {
   "address": 53340,
   "type": "line",
   "text": "Each player's score when the wizard leaves through the portal or the game ends (game_over)."
  },
  {
   "address": 53344,
   "type": "line",
   "text": "The square the portal opened on, row then column."
  },
  {
   "address": 53346,
   "type": "line",
   "text": "The turn the portal opens on, chosen by set_up_game."
  },
  {
   "address": 53347,
   "type": "line",
   "text": "Not 0 while the computer moves its creatures."
  },
  {
   "address": 53348,
   "type": "line",
   "text": "Not 0 in a game against the computer, who is player 2."
  },
  {
   "address": 53349,
   "type": "line",
   "text": "The game turn, from 1."
  },
  {
   "address": 53350,
   "type": "line",
   "text": "Not 0 while a turn is played out of sight: no messages, sounds or pictures."
  },
  {
   "address": 53351,
   "type": "line",
   "text": "How many players, 1 to 4 (2 in a game against the computer)."
  },
  {
   "address": 53352,
   "type": "line",
   "text": "How many times a game against the computer has been saved; the end of turn menu allows five."
  },
  {
   "address": 53353,
   "type": "line",
   "text": "How many wizards have died or left the map."
  },
  {
   "address": 53354,
   "type": "line",
   "text": "The squares the portal can open on, two bytes each, row then column (portal_turn)."
  },
  {
   "address": 53362,
   "type": "line",
   "text": "The wizards' starting squares, two bytes each, row then column; set_up_game marks each one it uses with $FF."
  },
  {
   "address": 53370,
   "type": "line",
   "text": "The four character sets the map graphics are drawn from."
  },
  {
   "address": 53378,
   "type": "line",
   "text": "The scenario's own wizard, a 70-byte wizard record (mana, level, the 45 spells, the twelve figures, the name and the score), which becomes wizard 2 in a game against the computer."
  },
  {
   "address": 53448,
   "type": "line",
   "text": "Read once, by the scenario's start-up routine at $FE03, before set_up_game: for each terrain from 0 to $34, two bytes, the chance in 200 that the routine puts objects on a square of that terrain and the number of the list in object_lists it takes them from. From set_up_game on, everything from here to $D207 is working storage for play, and these first two bytes hold the map window's top left square, row then column, the saved copy of the cursor's window (draw_map, restore_cursor)."
  },
  {
   "address": 53450,
   "type": "line",
   "text": "In play: draw_map's screen position as it works across the window."
  },
  {
   "address": 53452,
   "type": "line",
   "text": "In play: a square, row then column, that several routines step across the map with: draw_map across the window, spread_magic and big_map across the whole map, and spread_to_neighbours from it; map_address_window reads it."
  },
  {
   "address": 53454,
   "type": "line",
   "text": "In play: draw_map's map position as it works across the window."
  },
  {
   "address": 53456,
   "type": "line",
   "text": "In play: not 0 while the blinking cursor shows on the map window."
  },
  {
   "address": 53457,
   "type": "line",
   "text": "In play: the saved copy of the cursor's offset in the window, row then column."
  },
  {
   "address": 53459,
   "type": "line",
   "text": "In play: the square under the cursor, row then column."
  },
  {
   "address": 53461,
   "type": "line",
   "text": "In play: the character row and column (two bytes) at which draw_block_at draws."
  },
  {
   "address": 53463,
   "type": "line",
   "text": "In play: set while the information display is clear because the cursor is moving."
  },
  {
   "address": 53464,
   "type": "line",
   "text": "In play: set when the cursor has moved."
  },
  {
   "address": 53465,
   "type": "line",
   "text": "In play: the type of the object the creature being described has in use."
  },
  {
   "address": 53466,
   "type": "line",
   "text": "In play: its index in the object table."
  },
  {
   "address": 53467,
   "type": "line",
   "text": "In play: its entry in the object table."
  },
  {
   "address": 53469,
   "type": "line",
   "text": "In play: how many objects lie on the square, listed at objects_here."
  },
  {
   "address": 53470,
   "type": "line",
   "text": "In play: how many objects the creature carries, listed at carried_list."
  },
  {
   "address": 53471,
   "type": "line",
   "text": "In play: what the interrupt does on its working frames: bit 0 redraws the map window, bit 1 the information display's pictures and icons, bit 2 the first two pictures only, bit 3 the menu bar; bit 4 slides the bars, on every frame."
  },
  {
   "address": 53472,
   "type": "line",
   "text": "In play: each player's mana, players 1 to 4."
  },
  {
   "address": 53476,
   "type": "line",
   "text": "In play: the computer's list of the enemies its creature has seen, three bytes each (the creature, its combat, its defence), up to 20; cleared to $FF by clear_plan."
  },
  {
   "address": 53536,
   "type": "line",
   "text": "In play: the squares of the enemies a fleeing computer creature runs from, two bytes each (computer_flee)."
  },
  {
   "address": 53554,
   "type": "line",
   "text": "Read by the start-up routine: for each object type from $50 to $83, how many more of it may be placed; each one placed counts one off. In play these bytes are the end of flee_squares and the start of objects_seen."
  },
  {
   "address": 53576,
   "type": "line",
   "text": "In play: the entries of the objects a computer creature has seen, two bytes each, up to 24 (see_entry)."
  },
  {
   "address": 53606,
   "type": "line",
   "text": "Two bytes between the object counts and the lists that the start-up routine does not read; in play the middle of objects_seen."
  },
  {
   "address": 53608,
   "type": "line",
   "text": "Read by the start-up routine: ten lists of sixteen object types, from which it draws at random (0 places nothing); list 0 also fills each locked chest and list 1 each closed one. In play these bytes are the end of objects_seen and the computer's working figures below."
  },
  {
   "address": 53626,
   "type": "line",
   "text": "The computer's working figures for the creature it moves: the weight it can still carry ($D17A), the ranged combat and range of its weapon ($D17B, $D17C), its combat and defence ($D17D, $D17E), its type's weapon and USE bits ($D17F, $D180), why its move ended ($D181), its entry in the computer's list ($D182), the object table pointer and count of the computer's turn ($D184, $D186), then $D187-$D19F, bytes many routines keep: the enemies and objects a creature has noted (note_enemy, update_view, see_entry), the targets, flight and steps the computer's choices work with (computer_find_prey, computer_flee, computer_seek_object, computer_shoot, rank_neighbours, computer_cast), and a few that are not the computer's: $D190 and $D191, which can_fly_or_land sets for select_menu, and $D19F, the owner of the creature under the cursor (print_square_name)."
  },
  {
   "address": 53664,
   "type": "line",
   "text": "Working storage for describing a square: creatures found (find_creatures_at), the selected creature's entry ($D1A1), the partner's index ($D1A3) and the ten icon flags ($D1A4-$D1AD)."
  },
  {
   "address": 53678,
   "type": "line",
   "text": "The two creatures find_creatures_at finds on a square: type, entry and index of each."
  },
  {
   "address": 53686,
   "type": "line",
   "text": "The square the computer's creature is heading for, row then column."
  },
  {
   "address": 53688,
   "type": "line",
   "text": "More of the computer's working bytes: flee state ($D1B8), the spell it is trying ($D1B9), guard orders ($D1BA), the player whose turn starts ($D1BB), treasure for the wizard ($D1BC) the brewing state ($D1BD, $D1BE), and a distance the scenario's spell routines keep ($D1BF)."
  },
  {
   "address": 53696,
   "type": "line",
   "text": "The objects the creature carries, pairs of index and type (list_carried), up to ten."
  },
  {
   "address": 53716,
   "type": "line",
   "text": "The objects lying on a square, pairs of index and type (list_objects_at), up to ten."
  },
  {
   "address": 53736,
   "type": "line",
   "text": "The options of the menu being built (add_menu_option)."
  },
  {
   "address": 53750,
   "type": "line",
   "text": "The drawn length of each of the information display's five bars (slide_bars)."
  },
  {
   "address": 53755,
   "type": "line",
   "text": "The selected creature's figures (load_figures): action points, stamina, constitution, combat, defence; then the most of each ($D200-$D204). Nothing reads the last three in play; in the file they are the end of object_lists."
  },
  {
   "address": 53768,
   "type": "line",
   "text": "The terrain records, five bytes for each of the terrain types 0 to $4D (terrain_record): the action points a step onto it costs ($FF where nothing can walk), its toughness against attack, its resistance to flood and to tangle vine (four bits each), its susceptibility to fire and to blob (four bits each), and flags, whose top two bits name the terrain it breaks into."
  },
  {
   "address": 54158,
   "type": "line",
   "text": "A flag byte for each terrain type 0 to $4D: bit 2 is cover, from which a creature on the ground sees less, bit 3 a square magic lightning cannot target, and the bit that trace_line asks about blocks a line of sight. The table at $D3B9 that the computer's worth of each object type is read from starts inside this one: the worths, for types $50 up, lie from $D409."
  },
  {
   "address": 54236,
   "type": "line",
   "text": "The wizard designer's file panel, where SELECT CONTROLS and LOAD DESIGNER lead: interrupts off, IM 1, the stack at $606E. Draws the panel (draw_designer_panel), clears the menu choice and the panels' two kept values, and loops: runs the six-option menu (run_file_menu, layout 1), keeps the choice in panel_value_1 while its routine runs (designer_option) and puts it back after."
  },
  {
   "address": 54293,
   "type": "line",
   "text": "Jumps to the routine for option A from designer_actions."
  },
  {
   "address": 54306,
   "type": "line",
   "text": "DESIGN WIZARD, LOAD WIZARD, SAVE WIZARD, DELETE WIZARD, and the engine's LOAD SCENARIO and LOAD SAVED GAME."
  },
  {
   "address": 54318,
   "type": "line",
   "text": "Clears the screen, colours it $46 (yellow on black, bright), prints the panel's text (message $0B: WIZARD DESIGNER, SELECT OPTION, the six options, WIZARDS LOADED:) and draws two frames, rows 0 to 3 from column 7 to 23 round the title and rows 10 to 19 from column 16 to 31 round the wizards, then lists them."
  },
  {
   "address": 54363,
   "type": "line",
   "text": "Lists the four wizard slots, wizard 4 at row 17 up to wizard 1 at row 11, from column 17: a slot with a wizard (level not 0) has its name copied into the designer's name table (copy_name_to_slot) and printed, with its level eleven columns on; an empty one reads NONE (message $3A) in red."
  },
  {
   "address": 54445,
   "type": "line",
   "text": "DESIGN WIZARD: the bar moves to the wizard slots (layout 2, four options, from panel_value_2), the chosen slot is designed (design_wizard, player choice + 1), the choice is kept in panel_value_2 and the panel starts again."
  },
  {
   "address": 54486,
   "type": "line",
   "text": "LOAD WIZARD: picks a slot (layout 2), asks for the file name (ask_file_name) and loads the wizard into it (load_wizard); when the tape failed (tape_error) the slot's level is cleared, which leaves it empty. Lists the wizards again and clears the message line. Nothing in the program jumps here by address but designer_actions, so the disassembly of the block took these bytes for data."
  },
  {
   "address": 54539,
   "type": "line",
   "text": "SAVE WIZARD: picks a slot and, when it holds a wizard, makes the file name from its name in the designer's name table: the first eight characters, blanks ($FA) as spaces, cut at the first space within the first seven and the level put there as one character (0 to 9, then A on), so TORQUEMADA at level 1 saves as TORQUEM1 and JOE BLOGGS as JOE1. Then saves it (save_wizard, extension WIZ) and puts the bar back."
  },
  {
   "address": 54664,
   "type": "line",
   "text": "DELETE WIZARD: picks a slot, clears its wizard's level, which empties it, and lists the wizards again. Like load_wizard_option, only designer_actions points here."
  },
  {
   "address": 54708,
   "type": "line",
   "text": "Copies the ten characters of the current wizard's name (byte 59 of the record at $5B04) into player $5B11's slot of designer_names: the base is $D85A, eleven bytes before the first slot's characters, plus eleven a player."
  },
  {
   "address": 54735,
   "type": "line",
   "text": "Prints HL as a decimal number of up to four digits without leading zeros (0 prints as 0), then spaces to fill four columns, at row $5B15, column $5B16."
  },
  {
   "address": 54778,
   "type": "line",
   "text": "One digit of print_number_4: how many times DE goes into HL, printed unless it is a leading zero (B counts the digits printed; the units are always printed)."
  },
  {
   "address": 54813,
   "type": "line",
   "text": "Prints message A of the designer's own text (designer_messages, designer_words) in double height ($5B14 = 8) in the ROM's font ($3C00), through print_message, with the interrupts off."
  },
  {
   "address": 54841,
   "type": "line",
   "text": "The designer's 59 messages: each a length byte, then word numbers and control codes. Message 1 is the spells screen's headings, 2 the character screen's labels, 3 ENTER NAME, 4 and $0B the file panel, 5 TOO HEAVY on the message line, 6 the design menu, 7 to $0A the four names, $0C to $38 the 45 spell names, $39 the headings again, $3A NONE and $3B SELECT CONTROLS."
  },
  {
   "address": 54985,
   "type": "line",
   "text": "The designer's words 1 to 8, each a length byte and its characters, some holding control codes of their own: EP.s, COST, LEVEL; the character screen's labels (WIZARD=, LEVEL=, EXPERIENCE=, COST, MANA=, ACTION POINTS=, STAMINA=, CONSTITUTION=, COMBAT=, DEFENCE=, MAGIC RESISTANCE=, each with its position); ENTER NAME; the file panel's text; TOO HEAVY; and the design menu, WIZARD= with NAME, CHARACTER, SPELLS and EXIT."
  },
  {
   "address": 55396,
   "type": "line",
   "text": "Words 9 to 12, the four wizards' names, eleven bytes each (a length byte, $0B, and ten characters), filled by copy_name_to_slot before a name is printed. The tape's copy holds MERLINEEEE and JEVARRELEE in the first two, left over from when the block was saved, and spaces in the others."
  },
  {
   "address": 55440,
   "type": "line",
   "text": "Words 13 to 57, the names of the 45 spells in the order of the wizard record, GOLD DRAGON to MAGIC SHIELD."
  },
  {
   "address": 55886,
   "type": "line",
   "text": "Words 58 to 60: the spells screen's headings (EP.s= at row 0, column 11, COST at column 22, then LEVEL), NONE, and the SELECT CONTROLS screen with KEYBOARD, KEMPSTON JOYSTICK and SINCLAIR JOYSTICK."
  },
  {
   "address": 55994,
   "type": "line",
   "text": "SPELLS in the designer: clears the screen, prints the wizard's name and the headings (message $39), arrows at row 11 in columns 1 and 22 to mark the line of the spell being changed, and the experience points left at row 0, column 16; frames rows 2 to 21, shows the nine spells round the current one (show_spells) and lets the player change them (spells_edit) until fire is pressed."
  },
  {
   "address": 56100,
   "type": "line",
   "text": "Prints nine spells, from four before the current one ($FF3A) to four after, wrapping round the 45, two rows apart from row 3, column 2 (designer_spell_line)."
  },
  {
   "address": 56148,
   "type": "line",
   "text": "Prints spell A's line: its name (message A + $0C) in yellow, or in red when its level is 0, spaces up to column 21, then three columns on its cost (in green) and its level (in cyan)."
  },
  {
   "address": 56231,
   "type": "line",
   "text": "For spell A of the wizard at $5B04: spell_byte = the address of its byte in the record, original_level = its full level (the high four bits), $FF0B = its level now (the low four bits) and $FF39 = what raising it from this level costs, the spell's base cost plus its step for each level it has, from spell_costs."
  },
  {
   "address": 56279,
   "type": "line",
   "text": "Reads the controls until fire is pressed (sound 0, and back): down moves to the next spell and up to the one before, wrapping round; right raises the spell a level when it is below 8 and the experience points cover its cost, which is taken off; left lowers it a level, never below where it started, and gives back the cost of the level it falls to. After a change the experience points and the list are printed again, with sound 0; key_repeat paces it all."
  },
  {
   "address": 56447,
   "type": "line",
   "text": "The experience points left to spend: four times the wizard's score when designing began."
  },
  {
   "address": 56449,
   "type": "line",
   "text": "The full level of the spell on show, the level it had when designing began, below which LEFT cannot take it."
  },
  {
   "address": 56450,
   "type": "line",
   "text": "The address of that spell's byte in the wizard record."
  },
  {
   "address": 56452,
   "type": "line",
   "text": "Two bytes for each of the 45 spells: the experience points that raising it from level 0 costs, then how much more for each level it has. GOLD DRAGON costs 47 plus 23 a level, MAGIC SHIELD 6 plus 3."
  },
  {
   "address": 56542,
   "type": "line",
   "text": "CALL wizard_record then RET: four bytes nothing calls."
  },
  {
   "address": 56546,
   "type": "line",
   "text": "The seven figures the designer changes, as designing began: mana, action points, stamina, constitution, combat, defence and magic resistance. LEFT cannot take a figure below its value here."
  },
  {
   "address": 56553,
   "type": "line",
   "text": "The seven figures as they are being designed."
  },
  {
   "address": 56560,
   "type": "line",
   "text": "The most each figure can be raised to: mana 200, action points 40, stamina 90, constitution 90, combat 30, defence 30, magic resistance 100."
  },
  {
   "address": 56567,
   "type": "line",
   "text": "What raising each figure by one costs now, worked out by figure_cost."
  },
  {
   "address": 56574,
   "type": "line",
   "text": "What each figure is divided by to give that cost: mana 10, action points 4, stamina 8, constitution 10, combat 2, defence 2, magic resistance 16."
  },
  {
   "address": 56581,
   "type": "line",
   "text": "CHARACTER in the designer: black border, clears the screen, frames rows 0 to 23 from column 1 to 30, prints the labels (message 2), the wizard's name at row 2, column 10 and its level at column 27, works out each figure's cost (figure_cost), prints the figures and costs (print_figures) and highlights the first. Up and down move the highlight over the seven, wrapping round; right raises the figure by one when it is below its most and the experience points cover the cost, which is taken off and worked out again for the new figure; left lowers it, never below where it started, and gives back the cost of the new figure. Fire returns; key_repeat_slow paces it."
  },
  {
   "address": 56865,
   "type": "line",
   "text": "Prints the experience points at row 5, column 14, then the seven figures down column 21 and their costs down column 25, from row 8, two rows apart."
  },
  {
   "address": 56929,
   "type": "line",
   "text": "Swaps ink and paper, bright on, in two rows of 17 attribute cells from column 3 of row 8 + 2 x the choice ($C662), so that a second call puts the row back."
  },
  {
   "address": 56981,
   "type": "line",
   "text": "The cost of raising figure $C662: C, the figure, divided by its divisor in figure_divisors, into figure_costs."
  },
  {
   "address": 57003,
   "type": "line",
   "text": "NAME in the designer: clears the screen, prints ENTER NAME (message 3), frames rows 10 to 15 from column 9 to 22, shows the name (show_name_entry) and reads the keyboard through the ROM's KEY-SCAN ($028E): ENTER ends, with sound 0; 0 deletes the last letter, putting back $FA; a letter or SPACE (name_keys) is added while the name has fewer than ten. After each it waits for the key to be let go."
  },
  {
   "address": 57153,
   "type": "line",
   "text": "Copies the name into its slot (copy_name_to_slot) and prints it at row 12, column 11, then spaces to column 22."
  },
  {
   "address": 57190,
   "type": "line",
   "text": "The address of the name being entered: byte 59 of the wizard record."
  },
  {
   "address": 57192,
   "type": "line",
   "text": "The character each key gives in a name, in the order of the ROM's key codes (B, H, Y, 6, 5, T, G, V ... SPACE, ENTER, P, 0, 1, Q, A): the letters and SPACE; 0 for the digits, ENTER and SYMBOL SHIFT, which add nothing."
  },
  {
   "address": 57231,
   "type": "line",
   "text": "The same swap of ink and paper as highlight_figure, for two rows of twelve cells from column 2 of row 3 + 2 x the choice ($C662). Nothing calls it, so the disassembly of the block took it for data."
  },
  {
   "address": 57283,
   "type": "line",
   "text": "Prints the experience points at row 11, column 17, then draws a grid of things, two columns (24 and 28) by five rows from row 2, one for each byte that is not 0 among bytes 69 to 78 counted from the wizard record's start, past the 70 bytes a record has, and an empty block for each place left over. Nothing calls it."
  },
  {
   "address": 57387,
   "type": "line",
   "text": "The twelve figures (bytes 47 to 58 of the record, laid out like a creature type) a new wizard starts with: action points 34, flying 0, stamina 34, constitution 34, combat 5, defence 5, magic resistance 70, carrying 36, bodyguard chance 0, potion consumption 2, victory points 20, flags $8C."
  },
  {
   "address": 57399,
   "type": "line",
   "text": "DESIGN WIZARD for player $5B11. An empty slot (level 0) becomes a new wizard first: its 45 spells at level 0, mana 80, level 1, the figures from new_wizard_figures, a name of ten blanks ($FA) and a score of 150. Each spell's level now (low four bits) is set to its full level (high four bits); the seven figures (mana, bytes 47 and 49 to 53) go to start_figures and current_figures, and the experience points are four times the score. Then the design menu (message 6, the wizard's number at row 3, column 19, in a frame from row 7 to 18): up and down move the bar (highlight_design_option), fire runs NAME, CHARACTER or SPELLS (run_design_action) and draws the menu again."
  },
  {
   "address": 57675,
   "type": "line",
   "text": "EXIT: the figures go back into the record, the wizard's worth in victory points (byte 57) becomes four times its level plus 15, its score the experience points left divided by four (so up to three are lost), and each spell's full level its level now."
  },
  {
   "address": 57762,
   "type": "line",
   "text": "The routines for NAME, CHARACTER and SPELLS: name_screen, character_screen, spells_screen."
  },
  {
   "address": 57768,
   "type": "line",
   "text": "Jumps to the routine for design_choice from design_actions."
  },
  {
   "address": 57784,
   "type": "line",
   "text": "Swaps ink and paper on the design menu's bar: two rows of ten attribute cells from column 11 of row 9 + 2 x design_choice."
  },
  {
   "address": 57836,
   "type": "line",
   "text": "The design menu's option: 0 NAME, 1 CHARACTER, 2 SPELLS, 3 EXIT."
  },
  {
   "address": 57837,
   "type": "line",
   "text": "The game's first instruction, where the loader LOC2 jumps: interrupts off, the screen coloured $46, SELECT CONTROLS (message $3B) in a frame from row 6 to 15, a three-option menu (layout 3), and the choice becomes control_type; then on to the designer's file panel."
  }
 ]
}