{"schema":1,"platform":"gnw","game":"octopus","title":"Octopus","build":"MAME's ROM set gnw_octopus: oc-22, the Sharp SM5A's mask ROM of the Wide Screen Octopus (OC-22), 1,856 bytes, CRC32 bd27781d, SHA-1 07b4feb9265c83b159f96c7e8ee1c61a2cc17dc5, as MAME 0.289 lists it","symbols_sha256":"8d11a532110c8d5d9bc86ab27bb757f5741391d843c6705255f5ecf1590a88d1","snapshot":{"file":"work/play-gamea.gnw.json.gz","sha256":"dd3f9bdd5785b1a1b2caea9d1a435a70614872ceac2e4614c250b75fe3059689"},"index":[{"a":0,"n":"wake","k":"routine","len":4,"c":true},{"a":4,"n":"pass","k":"routine","len":10,"c":true},{"a":14,"n":"to_draw","k":"routine","len":3,"c":true},{"a":17,"n":"after_pass","k":"routine","len":10,"c":true},{"a":27,"n":"clock_second","k":"routine","len":7,"c":true},{"a":34,"n":"game_wait","k":"routine","len":15,"c":true},{"a":49,"n":"sleep","k":"routine","len":5,"c":true},{"a":54,"n":"after_draw","k":"routine","len":10,"c":true},{"a":64,"n":"wait_spin","k":"routine","len":5,"c":true},{"a":69,"n":"wait","k":"routine","len":11,"c":true},{"a":80,"n":"step","k":"routine","len":3,"c":true},{"a":83,"n":"caught_count","k":"routine","len":7,"c":true},{"a":90,"n":"grab_step","k":"routine","len":38,"c":true},{"a":128,"n":"after_catch_check","k":"routine","len":5,"c":true},{"a":133,"n":"add_point","k":"routine","len":52,"c":true},{"a":185,"n":"to_set_wait","k":"routine","len":2,"c":true},{"a":187,"n":"to_demo_step","k":"routine","len":5,"c":true},{"a":192,"n":"set_wait","k":"routine","len":41,"c":true},{"a":233,"n":"caught_step","k":"routine","len":23,"c":true},{"a":256,"n":"tentacle_turn","k":"routine","len":5,"c":true},{"a":261,"n":"t4_turn","k":"routine","len":31,"c":true},{"a":292,"n":"turn_select","k":"routine","len":5,"c":true},{"a":297,"n":"t3_turn","k":"routine","len":23,"c":true},{"a":320,"n":"t3_grow","k":"routine","len":17,"c":true},{"a":337,"n":"t1_turn","k":"routine","len":23,"c":true},{"a":360,"n":"t1_grow","k":"routine","len":15,"c":true},{"a":375,"n":"to_catch_check","k":"routine","len":2,"c":true},{"a":377,"n":"to_t1_start","k":"routine","len":7,"c":true},{"a":384,"n":"t1_start","k":"routine","len":18,"c":true},{"a":402,"n":"t1_or_t2","k":"routine","len":4,"c":true},{"a":406,"n":"t2_turn","k":"routine","len":19,"c":true},{"a":425,"n":"t2_grow","k":"routine","len":18,"c":true},{"a":443,"n":"to_catch_check_2","k":"routine","len":5,"c":true},{"a":448,"n":"catch_check","k":"routine","len":30,"c":true},{"a":478,"n":"caught_now","k":"routine","len":5,"c":true},{"a":483,"n":"to_after_catch","k":"routine","len":2,"c":true},{"a":485,"n":"catch_far","k":"routine","len":7,"c":true},{"a":492,"n":"page07_unused","k":"routine","len":20,"c":true},{"a":512,"n":"timekeep","k":"routine","len":45,"c":true},{"a":557,"n":"count_seconds","k":"routine","len":2,"c":true},{"a":559,"n":"add_minute","k":"routine","len":17,"c":true},{"a":576,"n":"add_hour","k":"routine","len":37,"c":true},{"a":613,"n":"page09_unused","k":"routine","len":4,"c":true},{"a":617,"n":"alarm_add_hour","k":"routine","len":3,"c":true},{"a":620,"n":"minute_rolled","k":"routine","len":5,"c":true},{"a":625,"n":"add_minute_39","k":"routine","len":3,"c":true},{"a":628,"n":"sound_done","k":"routine","len":7,"c":true},{"a":635,"n":"alarm_add_minute","k":"routine","len":5,"c":true},{"a":640,"n":"play_sounds","k":"routine","len":19,"c":true},{"a":659,"n":"alarm_buzz","k":"routine","len":10,"c":true},{"a":669,"n":"game_sounds","k":"routine","len":10,"c":true},{"a":679,"n":"click","k":"routine","len":7,"c":true},{"a":686,"n":"tone","k":"routine","len":18,"c":true},{"a":704,"n":"pad_in_wait","k":"routine","len":2,"c":true},{"a":706,"n":"pad_pressed","k":"routine","len":46,"c":true},{"a":752,"n":"time_set_done","k":"routine","len":4,"c":true},{"a":756,"n":"caught_sound","k":"routine","len":12,"c":true},{"a":768,"n":"move_on","k":"routine","len":23,"c":true},{"a":791,"n":"take_start","k":"routine","len":7,"c":true},{"a":798,"n":"move_bag_on","k":"routine","len":13,"c":true},{"a":811,"n":"move_done","k":"routine","len":6,"c":true},{"a":817,"n":"demo_move","k":"routine","len":3,"c":true},{"a":820,"n":"move_back","k":"routine","len":12,"c":true},{"a":832,"n":"move_back_chain","k":"routine","len":26,"c":true},{"a":858,"n":"move_bag_back","k":"routine","len":13,"c":true},{"a":871,"n":"deliver_step","k":"routine","len":14,"c":true},{"a":885,"n":"point_due","k":"routine","len":11,"c":true},{"a":896,"n":"read_pad","k":"routine","len":51,"c":true},{"a":947,"n":"pad_new","k":"routine","len":13,"c":true},{"a":960,"n":"power_on","k":"routine","len":32,"c":true},{"a":992,"n":"page0f_unused","k":"routine","len":5,"c":true},{"a":997,"n":"take_end","k":"routine","len":6,"c":true},{"a":1003,"n":"boat_leave","k":"routine","len":21,"c":true},{"a":1024,"n":"clear_40_41","k":"routine","len":2,"c":true},{"a":1026,"n":"clear_down","k":"routine","len":1,"c":true},{"a":1027,"n":"set_redraw","k":"routine","len":3,"c":true},{"a":1030,"n":"draw_cell","k":"routine","len":1,"c":true},{"a":1031,"n":"draw_a","k":"routine","len":7,"c":true},{"a":1038,"n":"c_not_game_b","k":"routine","len":1,"c":true},{"a":1039,"n":"skip_if_game","k":"routine","len":1,"c":true},{"a":1040,"n":"point_mode_or_3b","k":"routine","len":1,"c":true},{"a":1041,"n":"table_unused","k":"routine","len":6,"c":true},{"a":1047,"n":"skip_if_clear0","k":"routine","len":1,"c":true},{"a":1048,"n":"skip_if_clear1","k":"routine","len":1,"c":true},{"a":1049,"n":"skip_if_clear2","k":"routine","len":1,"c":true},{"a":1050,"n":"skip_if_3b_clear3","k":"routine","len":1,"c":true},{"a":1051,"n":"skip_if_clear3","k":"routine","len":1,"c":true},{"a":1052,"n":"skip_if_carry","k":"routine","len":1,"c":true},{"a":1053,"n":"point_01","k":"routine","len":1,"c":true},{"a":1054,"n":"point_03","k":"routine","len":1,"c":true},{"a":1055,"n":"point_04","k":"routine","len":1,"c":true},{"a":1056,"n":"point_05","k":"routine","len":1,"c":true},{"a":1057,"n":"point_07","k":"routine","len":1,"c":true},{"a":1058,"n":"point_08","k":"routine","len":1,"c":true},{"a":1059,"n":"point_11","k":"routine","len":1,"c":true},{"a":1060,"n":"point_13","k":"routine","len":1,"c":true},{"a":1061,"n":"point_14","k":"routine","len":1,"c":true},{"a":1062,"n":"point_18","k":"routine","len":1,"c":true},{"a":1063,"n":"select_r4","k":"routine","len":2,"c":true},{"a":1065,"n":"point_31","k":"routine","len":1,"c":true},{"a":1066,"n":"point_43","k":"routine","len":1,"c":true},{"a":1067,"n":"point_15","k":"routine","len":1,"c":true},{"a":1068,"n":"read_divider","k":"routine","len":1,"c":true},{"a":1069,"n":"take_cell","k":"routine","len":3,"c":true},{"a":1072,"n":"skip_if_nonzero","k":"routine","len":1,"c":true},{"a":1073,"n":"skip_if_18_bit3","k":"routine","len":1,"c":true},{"a":1074,"n":"skip_if_42_nonzero","k":"routine","len":1,"c":true},{"a":1075,"n":"skip_unless_redraw","k":"routine","len":1,"c":true},{"a":1076,"n":"skip_if_07_bit3","k":"routine","len":1,"c":true},{"a":1077,"n":"skip_if_43_nonzero","k":"routine","len":1,"c":true},{"a":1078,"n":"take_bit0","k":"routine","len":1,"c":true},{"a":1079,"n":"take_bit1","k":"routine","len":1,"c":true},{"a":1080,"n":"take_bit2","k":"routine","len":1,"c":true},{"a":1081,"n":"take_bit3","k":"routine","len":1,"c":true},{"a":1082,"n":"skip_if_mode_lt2","k":"routine","len":1,"c":true},{"a":1083,"n":"swap_c_bit0","k":"routine","len":1,"c":true},{"a":1084,"n":"swap_c_bit1","k":"routine","len":1,"c":true},{"a":1085,"n":"swap_c_bit2","k":"routine","len":1,"c":true},{"a":1086,"n":"swap_c_bit3","k":"routine","len":2,"c":true},{"a":1088,"n":"h_skip_if_clear1","k":"routine","len":3,"c":true},{"a":1091,"n":"h_point_18","k":"routine","len":3,"c":true},{"a":1094,"n":"h_point_01","k":"routine","len":3,"c":true},{"a":1097,"n":"h_point_31","k":"routine","len":3,"c":true},{"a":1100,"n":"h_take_bit3","k":"routine","len":4,"c":true},{"a":1104,"n":"h_point_08","k":"routine","len":3,"c":true},{"a":1107,"n":"h_point_13","k":"routine","len":3,"c":true},{"a":1110,"n":"h_point_13_tr","k":"routine","len":1,"c":true},{"a":1111,"n":"h_point_08_tr","k":"routine","len":1,"c":true},{"a":1112,"n":"h_take_bit0","k":"routine","len":4,"c":true},{"a":1116,"n":"h_skip_if_carry","k":"routine","len":3,"c":true},{"a":1119,"n":"h_skip_if_18_bit3","k":"routine","len":5,"c":true},{"a":1124,"n":"h_c_not_game_b","k":"routine","len":5,"c":true},{"a":1129,"n":"h_skip_if_07_bit3","k":"routine","len":3,"c":true},{"a":1132,"n":"h_skip_if_carry_tr","k":"routine","len":1,"c":true},{"a":1133,"n":"h_point_07","k":"routine","len":3,"c":true},{"a":1136,"n":"h_take_bit2","k":"routine","len":4,"c":true},{"a":1140,"n":"h_skip_if_game","k":"routine","len":7,"c":true},{"a":1147,"n":"h_point_18_tr","k":"routine","len":1,"c":true},{"a":1148,"n":"h_point_01_tr","k":"routine","len":1,"c":true},{"a":1149,"n":"h_point_31_tr","k":"routine","len":1,"c":true},{"a":1150,"n":"h_c_not_game_b_tr","k":"routine","len":2,"c":true},{"a":1152,"n":"h_skip_if_43_nonzero","k":"routine","len":6,"c":true},{"a":1158,"n":"h_point_mode_or_3b","k":"routine","len":6,"c":true},{"a":1164,"n":"h_point_14","k":"routine","len":3,"c":true},{"a":1167,"n":"h_skip_if_42_nonzero","k":"routine","len":3,"c":true},{"a":1170,"n":"h_point_43","k":"routine","len":4,"c":true},{"a":1174,"n":"h_skip_if_42_nonzero_tr","k":"routine","len":1,"c":true},{"a":1175,"n":"h_point_43_tr","k":"routine","len":1,"c":true},{"a":1176,"n":"h_clear_down","k":"routine","len":4,"c":true},{"a":1180,"n":"h_point_05","k":"routine","len":3,"c":true},{"a":1183,"n":"h_point_05_tr","k":"routine","len":1,"c":true},{"a":1184,"n":"h_take_bit1","k":"routine","len":4,"c":true},{"a":1188,"n":"h_point_03","k":"routine","len":5,"c":true},{"a":1193,"n":"h_skip_if_clear2","k":"routine","len":3,"c":true},{"a":1196,"n":"h_skip_unless_redraw","k":"routine","len":1,"c":true},{"a":1197,"n":"h_skip_if_clear0","k":"routine","len":3,"c":true},{"a":1200,"n":"h_point_15","k":"routine","len":4,"c":true},{"a":1204,"n":"h_skip_if_mode_lt2","k":"routine","len":5,"c":true},{"a":1209,"n":"h_skip_if_clear3","k":"routine","len":3,"c":true},{"a":1212,"n":"h_skip_if_clear3_tr","k":"routine","len":1,"c":true},{"a":1213,"n":"h_point_03_tr","k":"routine","len":1,"c":true},{"a":1214,"n":"h_point_mode_or_3b_tr","k":"routine","len":2,"c":true},{"a":1216,"n":"h_swap_c_bit3","k":"routine","len":13,"c":true},{"a":1229,"n":"h_swap_c_bit2","k":"routine","len":10,"c":true},{"a":1239,"n":"h_swap_c_bit2_tr","k":"routine","len":1,"c":true},{"a":1240,"n":"h_swap_c_bit1","k":"routine","len":10,"c":true},{"a":1250,"n":"h_point_11","k":"routine","len":3,"c":true},{"a":1253,"n":"h_point_04","k":"routine","len":3,"c":true},{"a":1256,"n":"h_read_divider","k":"routine","len":5,"c":true},{"a":1261,"n":"h_swap_c_bit0","k":"routine","len":10,"c":true},{"a":1271,"n":"h_skip_if_nonzero","k":"routine","len":4,"c":true},{"a":1275,"n":"h_point_11_tr","k":"routine","len":1,"c":true},{"a":1276,"n":"h_point_04_tr","k":"routine","len":1,"c":true},{"a":1277,"n":"h_read_divider_tr","k":"routine","len":1,"c":true},{"a":1278,"n":"h_skip_if_nonzero_tr","k":"routine","len":2,"c":true},{"a":1280,"n":"mode_start","k":"routine","len":4,"c":true},{"a":1284,"n":"read_keys","k":"routine","len":20,"c":true},{"a":1304,"n":"keys_act","k":"routine","len":40,"c":true},{"a":1344,"n":"keys_mode","k":"routine","len":41,"c":true},{"a":1385,"n":"keys_released","k":"routine","len":23,"c":true},{"a":1408,"n":"alarm_check","k":"routine","len":30,"c":true},{"a":1438,"n":"test_row_r3","k":"routine","len":6,"c":true},{"a":1444,"n":"alarm_ring","k":"routine","len":7,"c":true},{"a":1451,"n":"keys_done","k":"routine","len":7,"c":true},{"a":1458,"n":"test_k3","k":"routine","len":14,"c":true},{"a":1472,"n":"mode_setup","k":"routine","len":52,"c":true},{"a":1524,"n":"over_pose","k":"routine","len":12,"c":true},{"a":1536,"n":"draw_prep","k":"routine","len":22,"c":true},{"a":1558,"n":"draw_wanted","k":"routine","len":10,"c":true},{"a":1568,"n":"note_alarm_on","k":"routine","len":14,"c":true},{"a":1582,"n":"game_screen","k":"routine","len":15,"c":true},{"a":1597,"n":"no_draw","k":"routine","len":3,"c":true},{"a":1600,"n":"draw_screen","k":"routine","len":18,"c":true},{"a":1618,"n":"bonus_blink","k":"routine","len":37,"c":true},{"a":1655,"n":"after_drawing","k":"routine","len":6,"c":true},{"a":1661,"n":"page19_unused","k":"routine","len":3,"c":true},{"a":1664,"n":"time_screen","k":"routine","len":17,"c":true},{"a":1681,"n":"all_lit","k":"routine","len":21,"c":true},{"a":1702,"n":"alarm_screen","k":"routine","len":26,"c":true},{"a":1728,"n":"hours_ampm","k":"routine","len":18,"c":true},{"a":1746,"n":"digits_back","k":"routine","len":10,"c":true},{"a":1756,"n":"bonus_step","k":"routine","len":36,"c":true},{"a":1792,"n":"caught_show","k":"routine","len":43,"c":true},{"a":1835,"n":"caught_end","k":"routine","len":17,"c":true},{"a":1852,"n":"caught_done","k":"routine","len":4,"c":true}],"records":[{"a":0,"l":"wake","c":"wake: where the chip starts again after CEND, woken by a button of the selected row or by the 1 Hz flag. When no button of the row is down (it was the second that woke it), it asks for the screen to be drawn; then it makes a pass ($0004).","t":"code","b":[0],"m":"SKIP","x":[63]},{"a":1,"t":"code","b":[106],"m":"KTA"},{"a":2,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":3,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw","x":[239]},{"a":4,"l":"pass","c":"pass: one pass of the clock, the buttons and the screen. It calls timekeep ($0200), goes to read_keys ($0504) on page $14, which comes back to $0009, and calls read_pad ($0380): a new press of left or right goes to pad_pressed ($02C2). Then the screen: draw_prep ($0600), which comes back to after_draw ($0036), or to $0004 for another pass.","t":"code","b":[120],"m":"SSR","o":"8","x":[21,23,36,39,50,232,991,1022]},{"a":5,"t":"code","b":[192],"m":"TRS","oa":512,"o":"timekeep"},{"a":6,"t":"code","b":[109],"m":"COMCB"},{"a":7,"t":"code","b":[116],"m":"SSR","o":"4"},{"a":8,"t":"code","b":[188],"m":"TR","oa":260,"o":"$3C"},{"a":9,"t":"code","b":[126],"m":"SSR","o":"$E"},{"a":10,"t":"code","b":[192],"m":"TRS","oa":896,"o":"read_pad"},{"a":11,"s":"no new press of left or right: on to the drawing.","t":"code","b":[179],"m":"TR","oa":14,"o":"to_draw"},{"a":12,"t":"code","b":[123],"m":"SSR","o":"$B"},{"a":13,"t":"code","b":[176],"m":"TR","oa":706,"o":"pad_pressed"},{"a":14,"l":"to_draw","c":"to_draw: goes to draw_prep ($0600) on page $18.","t":"code","b":[109],"m":"COMCB","x":[11,57]},{"a":15,"t":"code","b":[120],"m":"SSR","o":"8"},{"a":16,"t":"code","b":[128],"m":"TR","oa":512,"o":"timekeep"},{"a":17,"l":"after_pass","c":"after_pass: what to do once the screen is drawn. In a game, game_wait ($0022). Out of one: in the alarm's setting (mode 8) and after power on (mode 0), another pass; in the clock, a second that has passed (tick_flags bit 2) runs the demo's next step ($001B), and otherwise the chip sleeps ($0031).","t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game","x":[60]},{"a":18,"t":"code","b":[181],"m":"TR","oa":20,"o":"$35"},{"a":19,"t":"code","b":[177],"m":"TR","oa":34,"o":"game_wait"},{"a":20,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3","x":[18]},{"a":21,"t":"code","b":[188],"m":"TR","oa":4,"o":"pass"},{"a":22,"t":"code","b":[84],"m":"TM","o":"0"},{"a":23,"t":"code","b":[188],"m":"TR","oa":4,"o":"pass"},{"a":24,"t":"code","b":[73],"m":"LB","oa":4122,"o":"tick_flags"},{"a":25,"t":"code","b":[212],"m":"TRS","oa":1080,"o":"take_bit2"},{"a":26,"t":"code","b":[164],"m":"TR","oa":49,"o":"sleep"},{"a":27,"l":"clock_second","c":"clock_second: the clock's demo steps once a second: asks for a redraw, then plays the caught diver's count if one is running ($0053), or else moves the demo's diver ($0331 on page $0C), which runs a whole step of the game without its points.","t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw"},{"a":28,"t":"code","b":[230],"m":"TRS","oa":1077,"o":"skip_if_43_nonzero"},{"a":29,"t":"code","b":[135],"m":"TR","oa":32,"o":"$07"},{"a":30,"t":"code","b":[113],"m":"SSR","o":"1"},{"a":31,"t":"code","b":[171],"m":"TR","oa":83,"o":"caught_count"},{"a":32,"t":"code","b":[124],"m":"SSR","o":"$C","x":[29]},{"a":33,"t":"code","b":[164],"m":"TR","oa":817,"o":"demo_move"},{"a":34,"l":"game_wait","c":"game_wait: in a game. With the game over (flag_07 bit 3) the chip sleeps ($0031); otherwise it copies delay ($49) into delay_left ($4A) and starts the wait before the next step ($0045). Two jumps here never ran in a coverage run of every mode: to a pass when a game key is held ($0024; read_keys does not read the keys during a game) and when the bonus is blinking ($0027; the bonus's passes do not come back here).","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[19]},{"a":35,"t":"code","b":[225],"m":"TRS","oa":1049,"o":"skip_if_clear2"},{"a":36,"t":"code","b":[188],"m":"TR","oa":4,"o":"pass"},{"a":37,"t":"code","b":[242],"m":"TRS","oa":1074,"o":"skip_if_42_nonzero"},{"a":38,"t":"code","b":[150],"m":"TR","oa":40,"o":"$16"},{"a":39,"t":"code","b":[188],"m":"TR","oa":4,"o":"pass"},{"a":40,"t":"code","b":[204],"m":"TRS","oa":1076,"o":"skip_if_07_bit3","x":[38]},{"a":41,"t":"code","b":[146],"m":"TR","oa":43,"o":"$12"},{"a":42,"t":"code","b":[164],"m":"TR","oa":49,"o":"sleep"},{"a":43,"t":"code","b":[95,73],"m":"LBL","oa":4169,"o":"delay","x":[41]},{"a":45,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":46,"t":"code","b":[100],"m":"INCB"},{"a":47,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":48,"t":"code","b":[130],"m":"TR","oa":61,"o":"$02"},{"a":49,"l":"sleep","c":"sleep: when nothing waits to be drawn, selects the R4 row of buttons and sleeps (CEND) until a button of that row or the 1 Hz flag wakes the chip at $0000. With a redraw waiting it makes another pass instead.","t":"code","b":[217],"m":"TRS","oa":1075,"o":"skip_unless_redraw","x":[26,42]},{"a":50,"t":"code","b":[188],"m":"TR","oa":4,"o":"pass"},{"a":51,"t":"code","b":[237],"m":"TRS","oa":1063,"o":"select_r4"},{"a":52,"t":"code","b":[94,0],"m":"CEND"},{"a":54,"l":"after_draw","c":"after_draw: where draw_prep comes back. Keeps time again ($0200, which also plays the sounds), draws again if something asked for it meanwhile, then: when tick_flags bit 3 says a press of left or right broke into the wait, the wait goes on where it was ($0045); otherwise after_pass ($0011).","t":"code","b":[120],"m":"SSR","o":"8","x":[754,814]},{"a":55,"t":"code","b":[192],"m":"TRS","oa":512,"o":"timekeep"},{"a":56,"t":"code","b":[217],"m":"TRS","oa":1075,"o":"skip_unless_redraw"},{"a":57,"t":"code","b":[179],"m":"TR","oa":14,"o":"to_draw"},{"a":58,"t":"code","b":[73],"m":"LB","oa":4122,"o":"tick_flags"},{"a":59,"t":"code","b":[234],"m":"TRS","oa":1081,"o":"take_bit3"},{"a":60,"t":"code","b":[174],"m":"TR","oa":17,"o":"after_pass"},{"a":61,"t":"code","b":[113],"m":"SSR","o":"1","x":[48]},{"a":62,"t":"code","b":[190],"m":"TR","oa":69,"o":"wait"},{"a":63,"s":"the step $3F that the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":0,"o":"wake"},{"a":64,"l":"wait_spin","c":"wait_spin: the body of one pass of the wait: 16 INCBs from LAX $B to $F, five rounds of a loop that INCB ends at column 8, about 160 cycles.","t":"code","b":[43],"m":"LAX","o":"$B","x":[77,127]},{"a":65,"t":"code","b":[100],"m":"INCB","x":[66,68]},{"a":66,"t":"code","b":[160],"m":"TR","oa":65,"o":"$20"},{"a":67,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":68,"t":"code","b":[160],"m":"TR","oa":65,"o":"$20"},{"a":69,"l":"wait","c":"wait: the wait between two steps of a game. Each pass takes one from delay_left ($4A), reads left and right (read_pad, $0380) and spins ($0040); a new press goes to pad_pressed ($02C0) at once, and the wait goes on after it. When delay_left reaches 0 the step starts ($0050). So the step's period is delay ($49) passes.","t":"code","b":[95,74],"m":"LBL","oa":4170,"o":"delay_left","x":[62]},{"a":71,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":72,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":73,"t":"code","b":[156],"m":"TR","oa":80,"o":"step"},{"a":74,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":75,"t":"code","b":[126],"m":"SSR","o":"$E"},{"a":76,"t":"code","b":[192],"m":"TRS","oa":896,"o":"read_pad"},{"a":77,"t":"code","b":[128],"m":"TR","oa":64,"o":"wait_spin"},{"a":78,"t":"code","b":[123],"m":"SSR","o":"$B"},{"a":79,"t":"code","b":[128],"m":"TR","oa":704,"o":"pad_in_wait"},{"a":80,"l":"step","c":"step: one step of a game, and of the clock's demo. Asks for a redraw. While a caught diver's count runs (caught, $43) it goes to caught_step ($00E9) instead. Otherwise the diver at the chest takes treasure (grab_step, $005A), the boat counts in a delivery (deliver_step, $0367), the diver may leave the boat by himself ($03EB), and then one tentacle moves (tentacle_turn, $0100), the catch is checked ($01C0), points are added and the next wait is set ($0080).","t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw","x":[73]},{"a":81,"t":"code","b":[230],"m":"TRS","oa":1077,"o":"skip_if_43_nonzero","x":[188]},{"a":82,"t":"code","b":[144],"m":"TR","oa":90,"o":"grab_step"},{"a":83,"l":"caught_count","c":"caught_count: with caught ($43) running, C = 1 on its even counts and 0 on its odd ones, which caught_step uses to swap the caught diver's two poses; A = caught.","t":"code","b":[102],"m":"RC","x":[31]},{"a":84,"t":"code","b":[229],"m":"TRS","oa":1066,"o":"point_43"},{"a":85,"t":"code","b":[84],"m":"TM","o":"0"},{"a":86,"t":"code","b":[103],"m":"SC"},{"a":87,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":88,"t":"code","b":[115],"m":"SSR","o":"3"},{"a":89,"t":"code","b":[139],"m":"TR","oa":233,"o":"caught_step"},{"a":90,"l":"grab_step","c":"grab_step: the diver taking a piece of treasure, a step at a time, while lcd_08 bit 0 says a take is under way. A press of right at the chest starts one ($0317) and puts a token in flag_07 bit 2. Each step moves the token one place: from flag_07 bit 2 to the arm reaching into the chest (0.1.1), to the standing pose (0.0.1) with flag_07 bit 1, to the arm lifting the treasure (1.2.1). When it reaches 1.2.1 the bag at the chest (1.2.0) lights, the diver carries treasure (redraw_flags bit 1) and, in a game, a point is due ($0375). On the next step the token leaves 1.2.1 in C, and $03E5 puts the diver back to standing and ends the take. A press at the chest while a take runs is ignored ($0303). In a game the token also sets pad_flags bit 1 on its way, which nothing reads.","t":"code","b":[102],"m":"RC","x":[82]},{"a":91,"t":"code","b":[74],"m":"LB","oa":4138,"o":"pad_flags"},{"a":92,"s":"SKIP: a no-operation.","t":"code","b":[0],"m":"SKIP"},{"a":93,"t":"code","b":[142],"m":"TR","oa":95,"o":"$0E"},{"a":94,"s":"never runs: the TR before it always jumps over it.","t":"code","b":[133],"m":"TR","oa":124,"o":"$05"},{"a":95,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08","x":[93]},{"a":96,"t":"code","b":[84],"m":"TM","o":"0"},{"a":97,"t":"code","b":[133],"m":"TR","oa":124,"o":"$05"},{"a":98,"t":"code","b":[108],"m":"DECB"},{"a":99,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":100,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":101,"t":"code","b":[139],"m":"TR","oa":105,"o":"$0B"},{"a":102,"t":"code","b":[74],"m":"LB","oa":4138,"o":"pad_flags"},{"a":103,"t":"code","b":[82],"m":"TC"},{"a":104,"t":"code","b":[13],"m":"SM","o":"1"},{"a":105,"t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18","x":[101]},{"a":106,"t":"code","b":[4],"m":"RM","o":"0"},{"a":107,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":108,"t":"code","b":[82],"m":"TC"},{"a":109,"t":"code","b":[12],"m":"SM","o":"0"},{"a":110,"t":"code","b":[227],"m":"TRS","oa":1057,"o":"point_07"},{"a":111,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":112,"t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10"},{"a":113,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":114,"t":"code","b":[86],"m":"TM","o":"2"},{"a":115,"t":"code","b":[133],"m":"TR","oa":124,"o":"$05"},{"a":116,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":117,"t":"code","b":[14],"m":"SM","o":"2"},{"a":118,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags"},{"a":119,"t":"code","b":[13],"m":"SM","o":"1"},{"a":120,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":121,"t":"code","b":[133],"m":"TR","oa":124,"o":"$05"},{"a":122,"t":"code","b":[125],"m":"SSR","o":"$D"},{"a":123,"t":"code","b":[166],"m":"TR","oa":885,"o":"point_due"},{"a":124,"t":"code","b":[125],"m":"SSR","o":"$D","x":[94,97,115,121]},{"a":125,"t":"code","b":[173],"m":"TR","oa":871,"o":"deliver_step"},{"a":126,"s":"padding: never runs.","t":"code","b":[0],"m":"SKIP"},{"a":127,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":64,"o":"wait_spin"},{"a":128,"l":"after_catch_check","c":"after_catch_check: out of a game, back to the step's start for the clock's demo ($0051, through $00BB). In a game, adds a point when one is due (events bit 0, $0085), then sets the next wait ($00C0).","t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game","x":[191,484,892]},{"a":129,"t":"code","b":[138],"m":"TR","oa":187,"o":"to_demo_step"},{"a":130,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events"},{"a":131,"t":"code","b":[211],"m":"TRS","oa":1078,"o":"take_bit0"},{"a":132,"t":"code","b":[170],"m":"TR","oa":185,"o":"to_set_wait"},{"a":133,"l":"add_point","c":"add_point: adds 1 to the score in digit_1 to digit_3 ($15-$17), in decimal. When the score reaches 200 or 500 it starts the bonus: bonus_blinks ($42) is set to 10 ($009D) and both spare divers come back at its end. At 999 the score goes on to 000, with no bonus.","t":"code","b":[95,23],"m":"LBL","oa":4119,"o":"digit_3"},{"a":135,"t":"code","b":[24],"m":"LDA","o":"0","x":[143]},{"a":136,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":137,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":138,"t":"code","b":[55],"m":"ADX","o":"7"},{"a":139,"t":"code","b":[156],"m":"TR","oa":144,"o":"$1C"},{"a":140,"t":"code","b":[28],"m":"EXCD","o":"0"},{"a":141,"t":"code","b":[36],"m":"LAX","o":"4"},{"a":142,"t":"code","b":[91],"m":"TABL"},{"a":143,"t":"code","b":[175],"m":"TR","oa":135,"o":"$2F"},{"a":144,"t":"code","b":[37],"m":"LAX","o":"5","x":[139]},{"a":145,"t":"code","b":[91],"m":"TABL"},{"a":146,"t":"code","b":[163],"m":"TR","oa":161,"o":"$23"},{"a":147,"t":"code","b":[34],"m":"LAX","o":"2"},{"a":148,"t":"code","b":[83],"m":"TAM"},{"a":149,"t":"code","b":[134],"m":"TR","oa":151,"o":"$06"},{"a":150,"t":"code","b":[144],"m":"TR","oa":154,"o":"$10"},{"a":151,"t":"code","b":[37],"m":"LAX","o":"5","x":[149]},{"a":152,"t":"code","b":[83],"m":"TAM"},{"a":153,"t":"code","b":[163],"m":"TR","oa":161,"o":"$23"},{"a":154,"t":"code","b":[206],"m":"TRS","oa":1055,"o":"point_04","x":[150]},{"a":155,"t":"code","b":[195],"m":"TRS","oa":1048,"o":"skip_if_clear1"},{"a":156,"t":"code","b":[163],"m":"TR","oa":161,"o":"$23"},{"a":157,"t":"code","b":[95,66],"m":"LBL","oa":4162,"o":"bonus_blinks"},{"a":159,"t":"code","b":[42],"m":"LAX","o":"$A"},{"a":160,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":161,"t":"code","b":[243],"m":"TRS","oa":1038,"o":"c_not_game_b","x":[146,153,156]},{"a":162,"t":"code","b":[210],"m":"TRS","oa":1067,"o":"point_15"},{"a":163,"t":"code","b":[107],"m":"RBM","x":[170]},{"a":164,"t":"code","b":[27],"m":"LDA","o":"3"},{"a":165,"t":"code","b":[82],"m":"TC"},{"a":166,"t":"code","b":[2],"m":"SBM"},{"a":167,"t":"code","b":[83],"m":"TAM"},{"a":168,"t":"code","b":[137],"m":"TR","oa":172,"o":"$09"},{"a":169,"t":"code","b":[23],"m":"EXCI","o":"3"},{"a":170,"t":"code","b":[152],"m":"TR","oa":163,"o":"$18"},{"a":171,"t":"code","b":[170],"m":"TR","oa":185,"o":"to_set_wait"},{"a":172,"t":"code","b":[10],"m":"COMA","x":[168]},{"a":173,"t":"code","b":[102],"m":"RC"},{"a":174,"t":"code","b":[9],"m":"ADDC"},{"a":175,"t":"code","b":[164],"m":"TR","oa":177,"o":"$24"},{"a":176,"t":"code","b":[170],"m":"TR","oa":185,"o":"to_set_wait"},{"a":177,"t":"code","b":[243],"m":"TRS","oa":1038,"o":"c_not_game_b","x":[175]},{"a":178,"t":"code","b":[210],"m":"TRS","oa":1067,"o":"point_15"},{"a":179,"t":"code","b":[107],"m":"RBM","x":[184]},{"a":180,"t":"code","b":[27],"m":"LDA","o":"3"},{"a":181,"t":"code","b":[82],"m":"TC"},{"a":182,"t":"code","b":[2],"m":"SBM"},{"a":183,"t":"code","b":[23],"m":"EXCI","o":"3"},{"a":184,"t":"code","b":[153],"m":"TR","oa":179,"o":"$19"},{"a":185,"l":"to_set_wait","c":"to_set_wait: goes on to set_wait ($00C0) on page $03.","t":"code","b":[115],"m":"SSR","o":"3","x":[132,171,176]},{"a":186,"t":"code","b":[128],"m":"TR","oa":192,"o":"set_wait"},{"a":187,"l":"to_demo_step","c":"to_demo_step: out of a game, back to $0051 for the rest of the demo's step.","t":"code","b":[113],"m":"SSR","o":"1","x":[129]},{"a":188,"t":"code","b":[174],"m":"TR","oa":81,"o":"$2E"},{"a":189,"s":"padding: never runs.","t":"code","b":[0],"m":"SKIP"},{"a":190,"t":"code","b":[0],"m":"SKIP"},{"a":191,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":128,"o":"after_catch_check"},{"a":192,"l":"set_wait","c":"set_wait: sets delay ($49), the passes of the wait before the next step, from the score: A = hundreds + tens + 1, then a ladder of ADX tests jumps into a run of LAX for the value: 10 when hundreds + tens is 0, 9 for 1, 8 for 2 or 3, 7 for 4-5, 6 for 6-8, 5 for 9-10, 4 for 11-12, 3 for 13-14, 2 from 15 on. In Game B the first two are 8 too ($00E0). Two more passes are added unless a take of treasure is under way (lcd_08 bit 0). So Game A starts at 12 and Game B at 10; the two differ only at 0-19 and 100-109 points; the game slows again at each hundred; and the tentacles step faster while the diver takes treasure.","t":"code","b":[103],"m":"SC","x":[186,255]},{"a":193,"t":"code","b":[210],"m":"TRS","oa":1067,"o":"point_15"},{"a":194,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":195,"t":"code","b":[100],"m":"INCB"},{"a":196,"t":"code","b":[9],"m":"ADDC"},{"a":197,"t":"code","b":[183],"m":"TR","oa":200,"o":"$37"},{"a":198,"t":"code","b":[34],"m":"LAX","o":"2"},{"a":199,"t":"code","b":[163],"m":"TR","oa":225,"o":"$23"},{"a":200,"t":"code","b":[62],"m":"ADX","o":"$E","x":[197]},{"a":201,"t":"code","b":[186],"m":"TR","oa":221,"o":"$3A"},{"a":202,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":203,"t":"code","b":[180],"m":"TR","oa":220,"o":"$34"},{"a":204,"t":"code","b":[62],"m":"ADX","o":"$E"},{"a":205,"t":"code","b":[168],"m":"TR","oa":219,"o":"$28"},{"a":206,"t":"code","b":[62],"m":"ADX","o":"$E"},{"a":207,"t":"code","b":[161],"m":"TR","oa":217,"o":"$21"},{"a":208,"t":"code","b":[61],"m":"ADX","o":"$D"},{"a":209,"t":"code","b":[131],"m":"TR","oa":216,"o":"$03"},{"a":210,"t":"code","b":[62],"m":"ADX","o":"$E"},{"a":211,"t":"code","b":[134],"m":"TR","oa":215,"o":"$06"},{"a":212,"t":"code","b":[62],"m":"ADX","o":"$E"},{"a":213,"s":"the value 4, for hundreds + tens of 11 or 12: the coverage run's games never scored there; setting the score there on the model takes this line.","t":"code","b":[36],"m":"LAX","o":"4"},{"a":214,"t":"code","b":[35],"m":"LAX","o":"3"},{"a":215,"t":"code","b":[37],"m":"LAX","o":"5","x":[211]},{"a":216,"t":"code","b":[38],"m":"LAX","o":"6","x":[209]},{"a":217,"t":"code","b":[39],"m":"LAX","o":"7","x":[207]},{"a":218,"t":"code","b":[163],"m":"TR","oa":225,"o":"$23"},{"a":219,"t":"code","b":[40],"m":"LAX","o":"8","x":[205]},{"a":220,"t":"code","b":[41],"m":"LAX","o":"9","x":[203]},{"a":221,"t":"code","b":[42],"m":"LAX","o":"$A","x":[201]},{"a":222,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":223,"t":"code","b":[86],"m":"TM","o":"2"},{"a":224,"t":"code","b":[40],"m":"LAX","o":"8"},{"a":225,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08","x":[199,218]},{"a":226,"t":"code","b":[84],"m":"TM","o":"0"},{"a":227,"t":"code","b":[50],"m":"ADX","o":"2"},{"a":228,"t":"code","b":[95,73],"m":"LBL","oa":4169,"o":"delay"},{"a":230,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":231,"t":"code","b":[112],"m":"SSR","o":"0"},{"a":232,"t":"code","b":[188],"m":"TR","oa":4,"o":"pass"},{"a":233,"l":"caught_step","c":"caught_step: a step of the caught diver's count: takes 1 from caught ($43). On the first step, 9 to 8, nothing else happens (the caught sound, asked for by caught_now, plays at this pass). On each of the next eight the diver is no longer taking treasure (lcd_08 bit 0), a buzz plays in a game (tone code $C, $00F7), and caught_show ($0700) draws the caught diver for the count, now 7 down to 0.","t":"code","b":[63],"m":"ADX","o":"$F","x":[89]},{"a":234,"s":"never runs: ADX $F always carries here, since caught is at least 1.","t":"code","b":[33],"m":"LAX","o":"1"},{"a":235,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":236,"t":"code","b":[55],"m":"ADX","o":"7"},{"a":237,"t":"code","b":[136],"m":"TR","oa":240,"o":"$08"},{"a":238,"t":"code","b":[112],"m":"SSR","o":"0"},{"a":239,"t":"code","b":[184],"m":"TR","oa":3,"o":"$38"},{"a":240,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08","x":[237]},{"a":241,"t":"code","b":[4],"m":"RM","o":"0"},{"a":242,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":243,"t":"code","b":[149],"m":"TR","oa":250,"o":"$15"},{"a":244,"t":"code","b":[204],"m":"TRS","oa":1076,"o":"skip_if_07_bit3"},{"a":245,"t":"code","b":[169],"m":"TR","oa":247,"o":"$29"},{"a":246,"s":"never runs: the game is never over during a caught diver's count; it ends at the count's end.","t":"code","b":[149],"m":"TR","oa":250,"o":"$15"},{"a":247,"t":"code","b":[44],"m":"LAX","o":"$C","x":[245]},{"a":248,"t":"code","b":[122],"m":"SSR","o":"$A"},{"a":249,"t":"code","b":[200],"m":"TRS","oa":688,"o":"$08"},{"a":250,"t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10","x":[243,246]},{"a":251,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":252,"t":"code","b":[109],"m":"COMCB"},{"a":253,"t":"code","b":[124],"m":"SSR","o":"$C"},{"a":254,"t":"code","b":[128],"m":"TR","oa":768,"o":"move_on"},{"a":255,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":192,"o":"set_wait"},{"a":256,"l":"tentacle_turn","c":"tentacle_turn: moves one of the four tentacles by one segment. tentacle_flags ($19) bits 2-3 count the turns, and the tentacles take them in the order T1 (the forked one on the left, $0151), T3 ($0129), T2 ($0196), T4 (the short one on the right, $0105). Each one grows a segment a turn from its base to its tip, its bit of tentacle_dirs ($09) then says it shrinks, and it shrinks a segment a turn. All four go on to the catch check ($01C0).","t":"code","b":[69],"m":"LB","oa":4121,"o":"tentacle_flags","x":[319,1020]},{"a":257,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":258,"t":"code","b":[52],"m":"ADX","o":"4"},{"a":259,"t":"code","b":[172],"m":"TR","oa":292,"o":"turn_select"},{"a":260,"t":"code","b":[16],"m":"EXC","o":"0","x":[8]},{"a":261,"l":"t4_turn","c":"t4_turn: T4, three segments: its base 1.3.0 (lcd_00 bit 3), 0.2.0 and the tip 0.1.0 (lcd_08 bits 2 and 1). Shrinking ($0108), the tip goes and the middle takes the tip's old state. When only the base was left, the base goes too and T4 turns to grow; in Game B and the clock's demo it stays when time_s1 bit 3 is set, so T4 starts again from its base at once. Growing ($0114), an empty T4 lights its base at once, except while time_s1 bit 3 is set (the seconds' units 8 or 9), when it waits; then each turn lights the next segment, and lighting the tip turns it to shrink.","t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs"},{"a":262,"t":"code","b":[87],"m":"TM","o":"3"},{"a":263,"t":"code","b":[181],"m":"TR","oa":276,"o":"$35"},{"a":264,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":265,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":266,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":267,"t":"code","b":[82],"m":"TC"},{"a":268,"t":"code","b":[138],"m":"TR","oa":315,"o":"$0A"},{"a":269,"t":"code","b":[220],"m":"TRS","oa":1040,"o":"point_mode_or_3b"},{"a":270,"t":"code","b":[174],"m":"TR","oa":273,"o":"$2E"},{"a":271,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3"},{"a":272,"t":"code","b":[163],"m":"TR","oa":289,"o":"$23"},{"a":273,"t":"code","b":[64],"m":"LB","oa":4096,"o":"lcd_00","x":[270]},{"a":274,"t":"code","b":[7],"m":"RM","o":"3"},{"a":275,"t":"code","b":[163],"m":"TR","oa":289,"o":"$23"},{"a":276,"t":"code","b":[64],"m":"LB","oa":4096,"o":"lcd_00","x":[263]},{"a":277,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3"},{"a":278,"t":"code","b":[161],"m":"TR","oa":281,"o":"$21"},{"a":279,"t":"code","b":[208],"m":"TRS","oa":1050,"o":"skip_if_3b_clear3"},{"a":280,"t":"code","b":[138],"m":"TR","oa":315,"o":"$0A"},{"a":281,"t":"code","b":[103],"m":"SC","x":[278]},{"a":282,"t":"code","b":[64],"m":"LB","oa":4096,"o":"lcd_00"},{"a":283,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":284,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":285,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":286,"t":"code","b":[244],"m":"TRS","oa":1052,"o":"skip_if_carry"},{"a":287,"t":"code","b":[138],"m":"TR","oa":315,"o":"$0A"},{"a":288,"t":"code","b":[13],"m":"SM","o":"1"},{"a":289,"t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs","x":[272,275]},{"a":290,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":291,"t":"code","b":[138],"m":"TR","oa":315,"o":"$0A"},{"a":292,"l":"turn_select","c":"turn_select: stores the turn counter and goes to T3's turn ($0129), or through $0192 to T1's ($0151) or T2's ($0196).","t":"code","b":[16],"m":"EXC","o":"0","x":[259]},{"a":293,"t":"code","b":[86],"m":"TM","o":"2"},{"a":294,"t":"code","b":[139],"m":"TR","oa":297,"o":"t3_turn"},{"a":295,"t":"code","b":[118],"m":"SSR","o":"6"},{"a":296,"t":"code","b":[151],"m":"TR","oa":402,"o":"t1_or_t2"},{"a":297,"l":"t3_turn","c":"t3_turn: T3, four segments from its base 2.2.0 and 2.3.0 (lcd_01 bits 2 and 3) to 1.0.0 and the tip 1.1.0 (lcd_00 bits 0 and 1), which reaches the diver's fourth place. Shrinking here: the tip goes and each segment takes the state of the one beyond it. When the last segment past the base has gone, the base goes too and T3 turns to grow; in Game B and the demo the base stays when time_s1 bit 1 is clear. Growing is at $0140.","t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs","x":[294]},{"a":298,"t":"code","b":[86],"m":"TM","o":"2"},{"a":299,"t":"code","b":[130],"m":"TR","oa":317,"o":"$02"},{"a":300,"t":"code","b":[64],"m":"LB","oa":4096,"o":"lcd_00"},{"a":301,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":302,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":303,"t":"code","b":[100],"m":"INCB"},{"a":304,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":305,"t":"code","b":[82],"m":"TC"},{"a":306,"t":"code","b":[138],"m":"TR","oa":315,"o":"$0A"},{"a":307,"t":"code","b":[220],"m":"TRS","oa":1040,"o":"point_mode_or_3b"},{"a":308,"t":"code","b":[169],"m":"TR","oa":311,"o":"$29"},{"a":309,"t":"code","b":[85],"m":"TM","o":"1"},{"a":310,"t":"code","b":[170],"m":"TR","oa":313,"o":"$2A"},{"a":311,"t":"code","b":[250],"m":"TRS","oa":1053,"o":"point_01","x":[308]},{"a":312,"t":"code","b":[6],"m":"RM","o":"2"},{"a":313,"t":"code","b":[117],"m":"SSR","o":"5","x":[310]},{"a":314,"t":"code","b":[179],"m":"TR","oa":334,"o":"$33"},{"a":315,"t":"code","b":[119],"m":"SSR","o":"7","x":[268,280,287,291,306]},{"a":316,"t":"code","b":[128],"m":"TR","oa":448,"o":"catch_check"},{"a":317,"t":"code","b":[117],"m":"SSR","o":"5","x":[299]},{"a":318,"t":"code","b":[128],"m":"TR","oa":320,"o":"t3_grow"},{"a":319,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":256,"o":"tentacle_turn"},{"a":320,"l":"t3_grow","c":"t3_grow: T3 growing: an empty T3 lights its base at once, except while time_s1 bit 3 is set (the seconds' units 8 or 9), when it waits; then each turn lights the next segment, and lighting the tip (1.1.0) turns it to shrink.","t":"code","b":[250],"m":"TRS","oa":1053,"o":"point_01","x":[318,383]},{"a":321,"t":"code","b":[225],"m":"TRS","oa":1049,"o":"skip_if_clear2"},{"a":322,"t":"code","b":[190],"m":"TR","oa":325,"o":"$3E"},{"a":323,"t":"code","b":[208],"m":"TRS","oa":1050,"o":"skip_if_3b_clear3"},{"a":324,"t":"code","b":[169],"m":"TR","oa":375,"o":"to_catch_check"},{"a":325,"t":"code","b":[103],"m":"SC","x":[322]},{"a":326,"t":"code","b":[250],"m":"TRS","oa":1053,"o":"point_01"},{"a":327,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":328,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":329,"t":"code","b":[108],"m":"DECB"},{"a":330,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":331,"t":"code","b":[244],"m":"TRS","oa":1052,"o":"skip_if_carry"},{"a":332,"t":"code","b":[169],"m":"TR","oa":375,"o":"to_catch_check"},{"a":333,"t":"code","b":[13],"m":"SM","o":"1"},{"a":334,"t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs","x":[314]},{"a":335,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":336,"t":"code","b":[169],"m":"TR","oa":375,"o":"to_catch_check"},{"a":337,"l":"t1_turn","c":"t1_turn: T1, the forked tentacle: its base 4.0.1 (lcd_13 bit 0), then either the upper branch 4.2.1 and the tip 4.1.1 (lcd_13 bits 2 and 1), which reaches the diver on the rope, or the lower branch 4.3.1 (lcd_13 bit 3), 3.0.1 and the tip 3.2.1 (lcd_12 bits 0 and 2), which reaches the diver's second place. Shrinking ($0154) takes back the branch that is out, tip first; when only the base was left, the base goes too and T1 turns to grow, but in Game B and the demo the base stays when time_s1 bit 0 is clear. Growing ($0168) lights the next segment of the branch that is out, and lighting its tip turns it to shrink; with no branch out it goes to t1_start ($0180).","t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs","x":[405]},{"a":338,"t":"code","b":[84],"m":"TM","o":"0"},{"a":339,"t":"code","b":[150],"m":"TR","oa":360,"o":"t1_grow"},{"a":340,"t":"code","b":[236],"m":"TRS","oa":1060,"o":"point_13"},{"a":341,"t":"code","b":[86],"m":"TM","o":"2"},{"a":342,"t":"code","b":[144],"m":"TR","oa":346,"o":"$10"},{"a":343,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":344,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":345,"t":"code","b":[142],"m":"TR","oa":351,"o":"$0E"},{"a":346,"t":"code","b":[108],"m":"DECB","x":[342]},{"a":347,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":348,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":349,"t":"code","b":[100],"m":"INCB"},{"a":350,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":351,"t":"code","b":[82],"m":"TC","x":[345]},{"a":352,"t":"code","b":[169],"m":"TR","oa":375,"o":"to_catch_check"},{"a":353,"t":"code","b":[220],"m":"TRS","oa":1040,"o":"point_mode_or_3b"},{"a":354,"t":"code","b":[182],"m":"TR","oa":357,"o":"$36"},{"a":355,"t":"code","b":[84],"m":"TM","o":"0"},{"a":356,"t":"code","b":[166],"m":"TR","oa":373,"o":"$26"},{"a":357,"t":"code","b":[236],"m":"TRS","oa":1060,"o":"point_13","x":[354]},{"a":358,"t":"code","b":[4],"m":"RM","o":"0"},{"a":359,"t":"code","b":[166],"m":"TR","oa":373,"o":"$26"},{"a":360,"l":"t1_grow","c":"t1_grow: T1 growing along the branch that is out: the upper one's tip at once after its first segment, the lower one's two segments after its first. Lighting a tip turns T1 to shrink.","t":"code","b":[103],"m":"SC","x":[339]},{"a":361,"t":"code","b":[236],"m":"TRS","oa":1060,"o":"point_13"},{"a":362,"t":"code","b":[86],"m":"TM","o":"2"},{"a":363,"t":"code","b":[162],"m":"TR","oa":366,"o":"$22"},{"a":364,"t":"code","b":[13],"m":"SM","o":"1"},{"a":365,"t":"code","b":[166],"m":"TR","oa":373,"o":"$26"},{"a":366,"t":"code","b":[87],"m":"TM","o":"3","x":[363]},{"a":367,"t":"code","b":[170],"m":"TR","oa":377,"o":"to_t1_start"},{"a":368,"t":"code","b":[108],"m":"DECB"},{"a":369,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":370,"t":"code","b":[244],"m":"TRS","oa":1052,"o":"skip_if_carry"},{"a":371,"t":"code","b":[169],"m":"TR","oa":375,"o":"to_catch_check"},{"a":372,"t":"code","b":[14],"m":"SM","o":"2"},{"a":373,"t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs","x":[356,359,365]},{"a":374,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":375,"l":"to_catch_check","c":"to_catch_check: goes on to the catch check ($01C0) on page $07.","t":"code","b":[119],"m":"SSR","o":"7","x":[324,332,336,352,371]},{"a":376,"t":"code","b":[128],"m":"TR","oa":448,"o":"catch_check"},{"a":377,"l":"to_t1_start","c":"to_t1_start: goes on to t1_start ($0180) on page $06.","t":"code","b":[118],"m":"SSR","o":"6","x":[367]},{"a":378,"t":"code","b":[128],"m":"TR","oa":384,"o":"t1_start"},{"a":379,"t":"code","b":[0],"m":"SKIP"},{"a":380,"t":"code","b":[0],"m":"SKIP"},{"a":381,"t":"code","b":[0],"m":"SKIP"},{"a":382,"t":"code","b":[0],"m":"SKIP"},{"a":383,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":320,"o":"t3_grow"},{"a":384,"l":"t1_start","c":"t1_start: T1 with no branch out. An empty T1 lights its base at once, except while time_s1 bit 3 is set (the seconds' units 8 or 9), when it waits. With the base already lit it picks a branch by time_s10 ($3A), the tens of seconds: odd, the lower branch toward the diver's second place (4.3.1); even, the upper branch toward the rope (4.2.1).","t":"code","b":[198],"m":"TRS","oa":1047,"o":"skip_if_clear0","x":[378,447]},{"a":385,"t":"code","b":[188],"m":"TR","oa":388,"o":"$3C"},{"a":386,"t":"code","b":[208],"m":"TRS","oa":1050,"o":"skip_if_3b_clear3"},{"a":387,"t":"code","b":[138],"m":"TR","oa":443,"o":"to_catch_check_2"},{"a":388,"t":"code","b":[236],"m":"TRS","oa":1060,"o":"point_13","x":[385]},{"a":389,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":390,"t":"code","b":[244],"m":"TRS","oa":1052,"o":"skip_if_carry"},{"a":391,"t":"code","b":[138],"m":"TR","oa":443,"o":"to_catch_check_2"},{"a":392,"t":"code","b":[75],"m":"LB","oa":4154,"o":"time_s10"},{"a":393,"t":"code","b":[84],"m":"TM","o":"0"},{"a":394,"t":"code","b":[102],"m":"RC"},{"a":395,"t":"code","b":[236],"m":"TRS","oa":1060,"o":"point_13"},{"a":396,"t":"code","b":[82],"m":"TC"},{"a":397,"t":"code","b":[156],"m":"TR","oa":400,"o":"$1C"},{"a":398,"t":"code","b":[14],"m":"SM","o":"2"},{"a":399,"t":"code","b":[138],"m":"TR","oa":443,"o":"to_catch_check_2"},{"a":400,"t":"code","b":[15],"m":"SM","o":"3","x":[397]},{"a":401,"t":"code","b":[138],"m":"TR","oa":443,"o":"to_catch_check_2"},{"a":402,"l":"t1_or_t2","c":"t1_or_t2: turn counter bit 3 clear is T1's turn ($0151), set is T2's.","t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3","x":[296]},{"a":403,"t":"code","b":[141],"m":"TR","oa":406,"o":"t2_turn"},{"a":404,"t":"code","b":[117],"m":"SSR","o":"5"},{"a":405,"t":"code","b":[174],"m":"TR","oa":337,"o":"t1_turn"},{"a":406,"l":"t2_turn","c":"t2_turn: T2, five segments: its base 4.0.0 and 4.3.0 (lcd_03 bits 0 and 3), 3.0.0 and 3.3.0 (lcd_02 bits 0 and 3) and the tip 2.0.0 (lcd_01 bit 0), which reaches the diver's third place. Shrinking: the tip goes and each segment takes the state of the one beyond it; when only the base was left, the base goes too and T2 turns to grow, but in Game B and the demo it stays when time_s1 bit 2 is clear. Growing ($01A9): an empty T2 lights its base at once, except while time_s1 bit 3 is set (the seconds' units 8 or 9), when it waits; then each turn lights the next segment, and lighting the tip turns it to shrink.","t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs","x":[403]},{"a":407,"t":"code","b":[85],"m":"TM","o":"1"},{"a":408,"t":"code","b":[139],"m":"TR","oa":425,"o":"t2_grow"},{"a":409,"t":"code","b":[250],"m":"TRS","oa":1053,"o":"point_01"},{"a":410,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":411,"t":"code","b":[100],"m":"INCB"},{"a":412,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":413,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":414,"t":"code","b":[100],"m":"INCB"},{"a":415,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":416,"t":"code","b":[82],"m":"TC"},{"a":417,"t":"code","b":[138],"m":"TR","oa":443,"o":"to_catch_check_2"},{"a":418,"t":"code","b":[220],"m":"TRS","oa":1040,"o":"point_mode_or_3b"},{"a":419,"t":"code","b":[155],"m":"TR","oa":422,"o":"$1B"},{"a":420,"t":"code","b":[86],"m":"TM","o":"2"},{"a":421,"t":"code","b":[170],"m":"TR","oa":441,"o":"$2A"},{"a":422,"t":"code","b":[221],"m":"TRS","oa":1054,"o":"point_03","x":[419]},{"a":423,"t":"code","b":[4],"m":"RM","o":"0"},{"a":424,"t":"code","b":[170],"m":"TR","oa":441,"o":"$2A"},{"a":425,"l":"t2_grow","c":"t2_grow: T2 growing, as t2_turn says.","t":"code","b":[221],"m":"TRS","oa":1054,"o":"point_03","x":[408]},{"a":426,"t":"code","b":[198],"m":"TRS","oa":1047,"o":"skip_if_clear0"},{"a":427,"t":"code","b":[162],"m":"TR","oa":430,"o":"$22"},{"a":428,"t":"code","b":[208],"m":"TRS","oa":1050,"o":"skip_if_3b_clear3"},{"a":429,"t":"code","b":[138],"m":"TR","oa":443,"o":"to_catch_check_2"},{"a":430,"t":"code","b":[103],"m":"SC","x":[427]},{"a":431,"t":"code","b":[221],"m":"TRS","oa":1054,"o":"point_03"},{"a":432,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":433,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":434,"t":"code","b":[108],"m":"DECB"},{"a":435,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":436,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":437,"t":"code","b":[244],"m":"TRS","oa":1052,"o":"skip_if_carry"},{"a":438,"t":"code","b":[138],"m":"TR","oa":443,"o":"to_catch_check_2"},{"a":439,"t":"code","b":[108],"m":"DECB"},{"a":440,"t":"code","b":[12],"m":"SM","o":"0"},{"a":441,"t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs","x":[421,424]},{"a":442,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":443,"l":"to_catch_check_2","c":"to_catch_check_2: goes on to the catch check ($01C0).","t":"code","b":[119],"m":"SSR","o":"7","x":[387,391,399,401,417,429,438]},{"a":444,"t":"code","b":[128],"m":"TR","oa":448,"o":"catch_check"},{"a":445,"t":"code","b":[0],"m":"SKIP"},{"a":446,"t":"code","b":[0],"m":"SKIP"},{"a":447,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":384,"o":"t1_start"},{"a":448,"l":"catch_check","c":"catch_check: after each tentacle's turn. Asks for the step's click (sound_flags bit 3), then, unless a key of the R2 test row is held (MAME's \"Invincibility\" pad) or the mode is the alarm's setting, compares the diver's place with the tip that reaches it: on the rope with T1's upper tip (4.1.1), at the second place with T1's lower tip (3.2.1), at the third with T2's tip (2.0.0), at the fourth with T3's tip (1.1.0), at the chest with T4's tip (0.1.0). A diver under a lit tip is caught ($01DE). Then after_catch_check ($0080).","t":"code","b":[45],"m":"LAX","o":"$D","x":[316,376,444,511]},{"a":449,"t":"code","b":[1],"m":"ATR"},{"a":450,"t":"code","b":[66],"m":"LB","oa":4128,"o":"sound_flags"},{"a":451,"t":"code","b":[15],"m":"SM","o":"3"},{"a":452,"t":"code","b":[106],"m":"KTA"},{"a":453,"t":"code","b":[90],"m":"TA0"},{"a":454,"t":"code","b":[152],"m":"TR","oa":483,"o":"to_after_catch"},{"a":455,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":456,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3"},{"a":457,"t":"code","b":[152],"m":"TR","oa":483,"o":"to_after_catch"},{"a":458,"t":"code","b":[221],"m":"TRS","oa":1054,"o":"point_03"},{"a":459,"t":"code","b":[85],"m":"TM","o":"1"},{"a":460,"t":"code","b":[174],"m":"TR","oa":465,"o":"$2E"},{"a":461,"t":"code","b":[25],"m":"LDA","o":"1","x":[487]},{"a":462,"t":"code","b":[85],"m":"TM","o":"1","x":[491]},{"a":463,"t":"code","b":[152],"m":"TR","oa":483,"o":"to_after_catch"},{"a":464,"t":"code","b":[157],"m":"TR","oa":478,"o":"caught_now"},{"a":465,"t":"code","b":[108],"m":"DECB","x":[460]},{"a":466,"t":"code","b":[86],"m":"TM","o":"2"},{"a":467,"t":"code","b":[131],"m":"TR","oa":472,"o":"$03"},{"a":468,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":469,"t":"code","b":[86],"m":"TM","o":"2"},{"a":470,"t":"code","b":[152],"m":"TR","oa":483,"o":"to_after_catch"},{"a":471,"t":"code","b":[157],"m":"TR","oa":478,"o":"caught_now"},{"a":472,"t":"code","b":[216],"m":"TRS","oa":1059,"o":"point_11","x":[467]},{"a":473,"t":"code","b":[84],"m":"TM","o":"0"},{"a":474,"t":"code","b":[182],"m":"TR","oa":485,"o":"catch_far"},{"a":475,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":476,"t":"code","b":[84],"m":"TM","o":"0"},{"a":477,"t":"code","b":[152],"m":"TR","oa":483,"o":"to_after_catch"},{"a":478,"l":"caught_now","c":"caught_now: the diver is caught: tentacle_flags bit 1 asks for the caught sound, and caught ($43) is set to 9; the caught diver's count starts at the next step.","t":"code","b":[69],"m":"LB","oa":4121,"o":"tentacle_flags","x":[464,471]},{"a":479,"t":"code","b":[13],"m":"SM","o":"1"},{"a":480,"t":"code","b":[229],"m":"TRS","oa":1066,"o":"point_43"},{"a":481,"t":"code","b":[41],"m":"LAX","o":"9"},{"a":482,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":483,"l":"to_after_catch","c":"to_after_catch: goes on to after_catch_check ($0080) on page $02.","t":"code","b":[114],"m":"SSR","o":"2","x":[454,457,463,470,477,489]},{"a":484,"t":"code","b":[128],"m":"TR","oa":128,"o":"after_catch_check"},{"a":485,"l":"catch_far","c":"catch_far: the diver at the fourth place (1.0.1) is checked against T3's tip; at the chest (1.3.1) against T4's; with no diver in the water there is nothing to check.","t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10","x":[474]},{"a":486,"t":"code","b":[198],"m":"TRS","oa":1047,"o":"skip_if_clear0"},{"a":487,"t":"code","b":[167],"m":"TR","oa":461,"o":"$27"},{"a":488,"t":"code","b":[87],"m":"TM","o":"3"},{"a":489,"t":"code","b":[152],"m":"TR","oa":483,"o":"to_after_catch"},{"a":490,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":491,"t":"code","b":[179],"m":"TR","oa":462,"o":"$33"},{"a":492,"l":"page07_unused","c":"page07_unused: three SKIPs and a run of bytes that no jump reaches; the coverage run never ran them.","t":"code","b":[0],"m":"SKIP"},{"a":493,"t":"code","b":[0],"m":"SKIP"},{"a":494,"t":"code","b":[0],"m":"SKIP"},{"a":495,"t":"code","b":[13],"m":"SM","o":"1"},{"a":496,"t":"code","b":[77],"m":"LB","oa":4123,"o":"tone_count"},{"a":497,"t":"code","b":[73],"m":"LB","oa":4122,"o":"tick_flags"},{"a":498,"t":"code","b":[84],"m":"TM","o":"0"},{"a":499,"t":"code","b":[83],"m":"TAM"},{"a":500,"t":"code","b":[85],"m":"TM","o":"1"},{"a":501,"t":"code","b":[82],"m":"TC"},{"a":502,"t":"code","b":[85],"m":"TM","o":"1"},{"a":503,"t":"code","b":[0],"m":"SKIP"},{"a":504,"t":"code","b":[89],"m":"PTW"},{"a":505,"t":"code","b":[79],"m":"LB","oa":4155,"o":"time_s1"},{"a":506,"t":"code","b":[83],"m":"TAM"},{"a":507,"t":"code","b":[72],"m":"LB","oa":4106,"o":"8"},{"a":508,"t":"code","b":[73],"m":"LB","oa":4122,"o":"tick_flags"},{"a":509,"t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs"},{"a":510,"t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10"},{"a":511,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":448,"o":"catch_check"},{"a":512,"l":"timekeep","c":"timekeep: called on every pass ($0005, $0037). Without a new second (TG) it plays any sound waiting ($0280). On a new second it turns the screen on (ATBP) and, except just after power on (mode 0), keeps time: while the alarm rings (lcd_18 bit 3) it asks for the alarm's sound again (sound_flags bit 0), sets tick_flags bit 2 (a second for the clock's demo), asks for a redraw and adds one to boat_timer ($40-$41). When boat_timer passes 255 seconds after a game is over (or in the alarm's setting, a jump the coverage run never took, $021D) it goes back to the clock: mode 1, and the screen set up again. Then the seconds ($022D).","t":"code","b":[88],"m":"TG","x":[5,16,55,575]},{"a":513,"t":"code","b":[184],"m":"TR","oa":515,"o":"$38"},{"a":514,"s":"A jump, inside timekeep: to play_sounds ($0280).","t":"code","b":[224],"m":"TRS","oa":1025,"o":"$20"},{"a":515,"t":"code","b":[33],"m":"LAX","o":"1","x":[513]},{"a":516,"t":"code","b":[3],"m":"ATBP"},{"a":517,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":518,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":519,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":520,"t":"code","b":[110],"m":"RTN"},{"a":521,"t":"code","b":[95,24],"m":"LBL","oa":4120,"o":"lcd_18"},{"a":523,"t":"code","b":[87],"m":"TM","o":"3"},{"a":524,"t":"code","b":[185],"m":"TR","oa":527,"o":"$39"},{"a":525,"t":"code","b":[66],"m":"LB","oa":4128,"o":"sound_flags"},{"a":526,"t":"code","b":[12],"m":"SM","o":"0"},{"a":527,"t":"code","b":[73],"m":"LB","oa":4122,"o":"tick_flags","x":[524]},{"a":528,"t":"code","b":[14],"m":"SM","o":"2"},{"a":529,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags"},{"a":530,"t":"code","b":[12],"m":"SM","o":"0"},{"a":531,"t":"code","b":[95,65],"m":"LBL","oa":4161,"o":"boat_timer_lo"},{"a":533,"t":"code","b":[24],"m":"LDA","o":"0","x":[537]},{"a":534,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":535,"t":"code","b":[137],"m":"TR","oa":556,"o":"$09"},{"a":536,"t":"code","b":[28],"m":"EXCD","o":"0"},{"a":537,"t":"code","b":[154],"m":"TR","oa":533,"o":"$1A"},{"a":538,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":539,"t":"code","b":[87],"m":"TM","o":"3"},{"a":540,"t":"code","b":[157],"m":"TR","oa":542,"o":"$1D"},{"a":541,"s":"never runs in the coverage run: 256 seconds in the alarm's setting.","t":"code","b":[177],"m":"TR","oa":546,"o":"$31"},{"a":542,"t":"code","b":[95,7],"m":"LBL","oa":4103,"o":"flag_07","x":[540]},{"a":544,"t":"code","b":[87],"m":"TM","o":"3"},{"a":545,"t":"code","b":[132],"m":"TR","oa":557,"o":"count_seconds"},{"a":546,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[541]},{"a":547,"t":"code","b":[15],"m":"SM","o":"3"},{"a":548,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":549,"t":"code","b":[33],"m":"LAX","o":"1"},{"a":550,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":551,"t":"code","b":[46],"m":"LAX","o":"$E"},{"a":552,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":553,"t":"code","b":[73],"m":"LB","oa":4122,"o":"tick_flags"},{"a":554,"t":"code","b":[6],"m":"RM","o":"2"},{"a":555,"t":"code","b":[132],"m":"TR","oa":557,"o":"count_seconds"},{"a":556,"t":"code","b":[16],"m":"EXC","o":"0","x":[535]},{"a":557,"l":"count_seconds","c":"count_seconds: adds a second to the time, the units in time_s1 ($3B), the tens in time_s10 ($3A); when the tens roll over at 60, minute_rolled ($026C). Then play_sounds.","t":"code","b":[102],"m":"RC","x":[545,555]},{"a":558,"t":"code","b":[79],"m":"LB","oa":4155,"o":"time_s1"},{"a":559,"l":"add_minute","c":"add_minute: adds one to the minutes at B: units to 9, then the tens to 5, then the hours (minute_rolled). Entered at $023E from add_minute_39 and alarm_add_minute with C set.","t":"code","b":[24],"m":"LDA","o":"0","x":[574]},{"a":560,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":561,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":562,"t":"code","b":[55],"m":"ADX","o":"7"},{"a":563,"s":"A jump, inside timekeep: to play_sounds ($0280).","t":"code","b":[224],"m":"TRS","oa":1025,"o":"$20"},{"a":564,"t":"code","b":[28],"m":"EXCD","o":"0"},{"a":565,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":566,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":567,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":568,"t":"code","b":[59],"m":"ADX","o":"$B"},{"a":569,"t":"code","b":[138],"m":"TR","oa":571,"o":"$0A"},{"a":570,"s":"A jump, inside timekeep: to minute_rolled ($026C).","t":"code","b":[217],"m":"TRS","oa":1075,"o":"skip_unless_redraw"},{"a":571,"s":"A jump, inside timekeep: to play_sounds ($0280).","t":"code","b":[224],"m":"TRS","oa":1025,"o":"$20","x":[569]},{"a":572,"t":"code","b":[0],"m":"SKIP"},{"a":573,"t":"code","b":[0],"m":"SKIP"},{"a":574,"t":"code","b":[145],"m":"TR","oa":559,"o":"add_minute"},{"a":575,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":512,"o":"timekeep"},{"a":576,"l":"add_hour","c":"add_hour: adds one to the hours at B ($37, or $33 for the alarm, at $0242): 12 goes to 1, 9 to 10, and at 11 to 12 AM and PM swap (bit 3 of the tens). Left adds an hour when the time is set after power on ($02CC). The same as Popeye's (games/gnw/popeye, $0240).","t":"code","b":[95,55],"m":"LBL","oa":4151,"o":"time_h1","x":[612,639,716]},{"a":578,"t":"code","b":[24],"m":"LDA","o":"0","x":[619]},{"a":579,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":580,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":581,"t":"code","b":[35],"m":"LAX","o":"3"},{"a":582,"t":"code","b":[83],"m":"TAM"},{"a":583,"t":"code","b":[185],"m":"TR","oa":591,"o":"$39"},{"a":584,"t":"code","b":[108],"m":"DECB"},{"a":585,"t":"code","b":[84],"m":"TM","o":"0"},{"a":586,"t":"code","b":[135],"m":"TR","oa":608,"o":"$07"},{"a":587,"t":"code","b":[4],"m":"RM","o":"0"},{"a":588,"t":"code","b":[100],"m":"INCB"},{"a":589,"t":"code","b":[5],"m":"RM","o":"1"},{"a":590,"t":"code","b":[135],"m":"TR","oa":608,"o":"$07"},{"a":591,"t":"code","b":[42],"m":"LAX","o":"$A","x":[583]},{"a":592,"t":"code","b":[83],"m":"TAM"},{"a":593,"t":"code","b":[141],"m":"TR","oa":598,"o":"$0D"},{"a":594,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":595,"t":"code","b":[28],"m":"EXCD","o":"0"},{"a":596,"t":"code","b":[12],"m":"SM","o":"0"},{"a":597,"t":"code","b":[135],"m":"TR","oa":608,"o":"$07"},{"a":598,"t":"code","b":[34],"m":"LAX","o":"2","x":[593]},{"a":599,"t":"code","b":[83],"m":"TAM"},{"a":600,"t":"code","b":[135],"m":"TR","oa":608,"o":"$07"},{"a":601,"t":"code","b":[108],"m":"DECB"},{"a":602,"t":"code","b":[84],"m":"TM","o":"0"},{"a":603,"t":"code","b":[135],"m":"TR","oa":608,"o":"$07"},{"a":604,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":605,"t":"code","b":[56],"m":"ADX","o":"8"},{"a":606,"t":"code","b":[0],"m":"SKIP"},{"a":607,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":608,"s":"A jump, inside timekeep: to play_sounds ($0280).","t":"code","b":[224],"m":"TRS","oa":1025,"o":"$20","x":[586,590,597,600,603]},{"a":609,"t":"code","b":[11],"m":"EXBLA","x":[622]},{"a":610,"t":"code","b":[56],"m":"ADX","o":"8"},{"a":611,"s":"never runs: the TR after ADX 8 is always skipped or jumped over.","t":"code","b":[139],"m":"TR","oa":617,"o":"alarm_add_hour"},{"a":612,"t":"code","b":[128],"m":"TR","oa":576,"o":"add_hour"},{"a":613,"l":"page09_unused","c":"page09_unused: four SKIPs that nothing reaches; Popeye's ROM has its request_click here.","t":"code","b":[0],"m":"SKIP"},{"a":614,"t":"code","b":[0],"m":"SKIP"},{"a":615,"t":"code","b":[0],"m":"SKIP"},{"a":616,"t":"code","b":[0],"m":"SKIP"},{"a":617,"l":"alarm_add_hour","c":"alarm_add_hour: points B at the alarm's hours ($33) and adds one ($0242).","t":"code","b":[95,51],"m":"LBL","oa":4147,"o":"alarm_h1","x":[611,734]},{"a":619,"t":"code","b":[176],"m":"TR","oa":578,"o":"$30"},{"a":620,"l":"minute_rolled","c":"minute_rolled: the tens of seconds or of minutes rolled over. After the seconds, flags the minute for the alarm (events bit 1) and adds a minute; after the minutes, adds an hour.","t":"code","b":[16],"m":"EXC","o":"0"},{"a":621,"t":"code","b":[82],"m":"TC"},{"a":622,"t":"code","b":[163],"m":"TR","oa":609,"o":"$23"},{"a":623,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events"},{"a":624,"t":"code","b":[13],"m":"SM","o":"1"},{"a":625,"l":"add_minute_39","c":"add_minute_39: adds a minute to the time ($39), as right does when the time is set after power on.","t":"code","b":[71],"m":"LB","oa":4153,"o":"time_m1","x":[719]},{"a":626,"t":"code","b":[103],"m":"SC","x":[637]},{"a":627,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":628,"l":"sound_done","c":"sound_done: asks for the screen to be drawn, clears every sound request (sound_flags, $20) and returns from timekeep: the end of every sound. $027E clears the requests without the redraw.","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags"},{"a":629,"t":"code","b":[12],"m":"SM","o":"0"},{"a":630,"t":"code","b":[66],"m":"LB","oa":4128,"o":"sound_flags","x":[638]},{"a":631,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":632,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":633,"t":"code","b":[110],"m":"RTN"},{"a":634,"t":"code","b":[0],"m":"SKIP"},{"a":635,"l":"alarm_add_minute","c":"alarm_add_minute: adds a minute to the alarm's time ($35).","t":"code","b":[95,53],"m":"LBL","oa":4149,"o":"alarm_m1","x":[748]},{"a":637,"t":"code","b":[178],"m":"TR","oa":626,"o":"$32"},{"a":638,"t":"code","b":[147],"m":"TR","oa":630,"o":"$13"},{"a":639,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":576,"o":"add_hour"},{"a":640,"l":"play_sounds","c":"play_sounds: plays only when nothing is waiting to be drawn. The alarm's sound first (sound_flags bit 0): after power on, in the clock, in the alarm's setting ($028E) and after a game is over, it buzzes ($0293) and ends at sound_done ($0274), which clears every request, so no other sound plays on that pass; in a game under way the request is dropped and the routine returns ($0292). With no alarm's sound asked for, game_sounds ($029D).","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[703]},{"a":641,"t":"code","b":[84],"m":"TM","o":"0"},{"a":642,"t":"code","b":[188],"m":"TR","oa":644,"o":"$3C"},{"a":643,"t":"code","b":[110],"m":"RTN"},{"a":644,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[642]},{"a":645,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":646,"t":"code","b":[66],"m":"LB","oa":4128,"o":"sound_flags"},{"a":647,"t":"code","b":[84],"m":"TM","o":"0"},{"a":648,"t":"code","b":[186],"m":"TR","oa":669,"o":"game_sounds"},{"a":649,"t":"code","b":[4],"m":"RM","o":"0"},{"a":650,"t":"code","b":[62],"m":"ADX","o":"$E"},{"a":651,"t":"code","b":[171],"m":"TR","oa":659,"o":"alarm_buzz"},{"a":652,"t":"code","b":[59],"m":"ADX","o":"$B"},{"a":653,"t":"code","b":[185],"m":"TR","oa":655,"o":"$39"},{"a":654,"s":"never runs in the coverage run: the alarm ringing while its time is being set.","t":"code","b":[171],"m":"TR","oa":659,"o":"alarm_buzz"},{"a":655,"t":"code","b":[95,7],"m":"LBL","oa":4103,"o":"flag_07","x":[653]},{"a":657,"t":"code","b":[87],"m":"TM","o":"3"},{"a":658,"t":"code","b":[110],"m":"RTN"},{"a":659,"l":"alarm_buzz","c":"alarm_buzz: toggles R1, the buzzer, 16 times a loop for as long as the divider's bits 11-14 read below 4, a quarter of each second.","t":"code","b":[94,4],"m":"DTA","x":[651,654,668]},{"a":661,"t":"code","b":[60],"m":"ADX","o":"$C"},{"a":662,"t":"code","b":[131],"m":"TR","oa":664,"o":"$03"},{"a":663,"s":"A jump, inside a subroutine: to sound_done ($0274).","t":"code","b":[220],"m":"TRS","oa":1040,"o":"point_mode_or_3b"},{"a":664,"t":"code","b":[32],"m":"LAX","o":"0","x":[662]},{"a":665,"t":"code","b":[1],"m":"ATR","x":[667]},{"a":666,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":667,"t":"code","b":[161],"m":"TR","oa":665,"o":"$21"},{"a":668,"t":"code","b":[171],"m":"TR","oa":659,"o":"alarm_buzz"},{"a":669,"l":"game_sounds","c":"game_sounds: no alarm's sound waiting. After power on, in the clock and in the alarm's setting the requests are cleared unplayed ($027E). In a game, one sound a pass, in priority: a point (sound_flags bit 2, a tone of length code $E, $02AF), the click of a step (bit 3, $02A7), the caught sound ($02F4).","t":"code","b":[62],"m":"ADX","o":"$E","x":[648]},{"a":670,"s":"A jump, inside a subroutine: to $027E, the requests cleared unplayed.","t":"code","b":[209],"m":"TRS","oa":1071,"o":"$11"},{"a":671,"t":"code","b":[59],"m":"ADX","o":"$B"},{"a":672,"t":"code","b":[177],"m":"TR","oa":674,"o":"$31"},{"a":673,"s":"A jump, inside a subroutine: to $027E, the requests cleared unplayed.","t":"code","b":[209],"m":"TRS","oa":1071,"o":"$11"},{"a":674,"t":"code","b":[86],"m":"TM","o":"2","x":[672]},{"a":675,"t":"code","b":[182],"m":"TR","oa":677,"o":"$36"},{"a":676,"t":"code","b":[145],"m":"TR","oa":687,"o":"$11"},{"a":677,"t":"code","b":[87],"m":"TM","o":"3","x":[675]},{"a":678,"s":"A jump, inside a subroutine: to caught_sound ($02F4).","t":"code","b":[252],"m":"TRS","oa":1028,"o":"$3C"},{"a":679,"l":"click","c":"click: the click of every step: R1 written 24 times from a value that EXBLA swaps with BL's count each time, about 100 cycles (98 on the model).","t":"code","b":[47],"m":"LAX","o":"$F"},{"a":680,"t":"code","b":[79],"m":"LB","oa":4155,"o":"time_s1"},{"a":681,"t":"code","b":[11],"m":"EXBLA","x":[684]},{"a":682,"t":"code","b":[1],"m":"ATR"},{"a":683,"t":"code","b":[108],"m":"DECB"},{"a":684,"t":"code","b":[139],"m":"TR","oa":681,"o":"$0B"},{"a":685,"s":"A jump, inside a subroutine: to sound_done ($0274).","t":"code","b":[220],"m":"TRS","oa":1040,"o":"point_mode_or_3b"},{"a":686,"l":"tone","c":"tone: a tone on R1: each inner loop toggles the buzzer every three instructions. A, the length code, sets how many loops it makes: from A up to 15, each longer, so a larger code is a shorter sound. Entries: $02AE with $B (the bonus's beep, from $06E8), $02AF with $E (a point), $02B0 with the code in A (the caught diver's sound: $C from caught_step and 0, the longest, from caught_sound). The same routine as Popeye's.","t":"code","b":[43],"m":"LAX","o":"$B"},{"a":687,"t":"code","b":[46],"m":"LAX","o":"$E","x":[676]},{"a":688,"t":"code","b":[77],"m":"LB","oa":4123,"o":"tone_count","x":[249]},{"a":689,"t":"code","b":[16],"m":"EXC","o":"0","x":[701]},{"a":690,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":691,"t":"code","b":[11],"m":"EXBLA"},{"a":692,"t":"code","b":[32],"m":"LAX","o":"0","x":[697]},{"a":693,"t":"code","b":[1],"m":"ATR","x":[695]},{"a":694,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":695,"t":"code","b":[166],"m":"TR","oa":693,"o":"$26"},{"a":696,"t":"code","b":[108],"m":"DECB"},{"a":697,"t":"code","b":[140],"m":"TR","oa":692,"o":"$0C"},{"a":698,"t":"code","b":[77],"m":"LB","oa":4123,"o":"tone_count"},{"a":699,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":700,"t":"code","b":[49],"m":"ADX","o":"1"},{"a":701,"t":"code","b":[164],"m":"TR","oa":689,"o":"$24"},{"a":702,"s":"A jump, inside a subroutine: to sound_done ($0274).","t":"code","b":[220],"m":"TRS","oa":1040,"o":"point_mode_or_3b"},{"a":703,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":640,"o":"play_sounds"},{"a":704,"l":"pad_in_wait","c":"pad_in_wait: a press during the wait between steps: tick_flags bit 3 says the wait is to go on after it ($003A), then pad_pressed.","t":"code","b":[73],"m":"LB","oa":4122,"o":"tick_flags","x":[79,767]},{"a":705,"t":"code","b":[15],"m":"SM","o":"3"},{"a":706,"l":"pad_pressed","c":"pad_pressed: a new press of left or right. After power on (mode 0) left adds an hour and right a minute. In the alarm's setting (mode 8) left adds an hour to the alarm and right a minute, the alarm's octopus (lcd_18 bit 3) goes out, and the demo's diver steps ($0331). Otherwise, in a game, right moves the diver toward the chest (move_on, $0300) and left back toward the boat (move_back, $0334). Both held at once does nothing: the jumps for it ($02CA, $02DC, $02E6) never ran.","t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[13]},{"a":707,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":708,"t":"code","b":[90],"m":"TA0"},{"a":709,"t":"code","b":[174],"m":"TR","oa":721,"o":"$2E"},{"a":710,"t":"code","b":[81],"m":"TB"},{"a":711,"t":"code","b":[179],"m":"TR","oa":718,"o":"$33"},{"a":712,"t":"code","b":[80],"m":"TA"},{"a":713,"t":"code","b":[158],"m":"TR","oa":715,"o":"$1E"},{"a":714,"s":"never runs: left and right held together.","t":"code","b":[164],"m":"TR","oa":753,"o":"$24"},{"a":715,"t":"code","b":[121],"m":"SSR","o":"9","x":[713]},{"a":716,"t":"code","b":[192],"m":"TRS","oa":576,"o":"add_hour"},{"a":717,"t":"code","b":[136],"m":"TR","oa":752,"o":"time_set_done"},{"a":718,"t":"code","b":[121],"m":"SSR","o":"9","x":[711]},{"a":719,"t":"code","b":[228],"m":"TRS","oa":625,"o":"add_minute_39"},{"a":720,"t":"code","b":[136],"m":"TR","oa":752,"o":"time_set_done"},{"a":721,"t":"code","b":[40],"m":"LAX","o":"8","x":[709]},{"a":722,"t":"code","b":[83],"m":"TAM"},{"a":723,"t":"code","b":[135],"m":"TR","oa":736,"o":"$07"},{"a":724,"t":"code","b":[192],"m":"TRS","oa":1024,"o":"clear_40_41"},{"a":725,"t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18"},{"a":726,"t":"code","b":[7],"m":"RM","o":"3"},{"a":727,"t":"code","b":[102],"m":"RC"},{"a":728,"t":"code","b":[81],"m":"TB"},{"a":729,"t":"code","b":[146],"m":"TR","oa":747,"o":"$12"},{"a":730,"t":"code","b":[80],"m":"TA"},{"a":731,"t":"code","b":[186],"m":"TR","oa":733,"o":"$3A"},{"a":732,"s":"never runs: left and right held together.","t":"code","b":[164],"m":"TR","oa":753,"o":"$24"},{"a":733,"t":"code","b":[121],"m":"SSR","o":"9","x":[731]},{"a":734,"t":"code","b":[203],"m":"TRS","oa":617,"o":"alarm_add_hour"},{"a":735,"t":"code","b":[132],"m":"TR","oa":749,"o":"$04"},{"a":736,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw","x":[723]},{"a":737,"t":"code","b":[102],"m":"RC"},{"a":738,"t":"code","b":[81],"m":"TB"},{"a":739,"t":"code","b":[173],"m":"TR","oa":743,"o":"$2D"},{"a":740,"t":"code","b":[80],"m":"TA"},{"a":741,"t":"code","b":[139],"m":"TR","oa":745,"o":"$0B"},{"a":742,"s":"never runs: left and right held together.","t":"code","b":[164],"m":"TR","oa":753,"o":"$24"},{"a":743,"t":"code","b":[124],"m":"SSR","o":"$C","x":[739]},{"a":744,"t":"code","b":[128],"m":"TR","oa":768,"o":"move_on"},{"a":745,"t":"code","b":[124],"m":"SSR","o":"$C","x":[741]},{"a":746,"t":"code","b":[140],"m":"TR","oa":820,"o":"move_back"},{"a":747,"t":"code","b":[121],"m":"SSR","o":"9","x":[729]},{"a":748,"t":"code","b":[202],"m":"TRS","oa":635,"o":"alarm_add_minute"},{"a":749,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw","x":[735]},{"a":750,"t":"code","b":[124],"m":"SSR","o":"$C"},{"a":751,"t":"code","b":[164],"m":"TR","oa":817,"o":"demo_move"},{"a":752,"l":"time_set_done","c":"time_set_done: after a press that set the time, asks for a redraw and goes back to after_draw ($0036).","t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw","x":[717,720]},{"a":753,"t":"code","b":[112],"m":"SSR","o":"0","x":[714,732,742]},{"a":754,"t":"code","b":[147],"m":"TR","oa":54,"o":"after_draw"},{"a":755,"t":"code","b":[0],"m":"SKIP"},{"a":756,"l":"caught_sound","c":"caught_sound: when tentacle_flags bit 1 asks for it, clears it and plays the caught diver's sound: the tone with length code 0, the longest ($02B0).","t":"code","b":[69],"m":"LB","oa":4121,"o":"tentacle_flags"},{"a":757,"t":"code","b":[85],"m":"TM","o":"1"},{"a":758,"t":"code","b":[110],"m":"RTN"},{"a":759,"t":"code","b":[5],"m":"RM","o":"1"},{"a":760,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":761,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3"},{"a":762,"t":"code","b":[0],"m":"SKIP"},{"a":763,"t":"code","b":[0],"m":"SKIP"},{"a":764,"t":"code","b":[0],"m":"SKIP"},{"a":765,"t":"code","b":[0],"m":"SKIP"},{"a":766,"t":"code","b":[0],"m":"SKIP"},{"a":767,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":704,"o":"pad_in_wait"},{"a":768,"l":"move_on","c":"move_on: right, in a game or the clock's demo: the diver one place toward the chest. While a take is under way (lcd_08 bit 0) the press is ignored. Otherwise the boat's diver loses his hand and bag (5.1.1, 5.2.1, lcd_14 bits 1 and 2) and a chain of swaps moves the diver one place: the boat 5.3.1 (lcd_14 bit 3), the rope 4.1.0 (lcd_03 bit 1), 3.2.0 (lcd_02 bit 2), 2.0.1 (lcd_11 bit 0), 1.0.1 (lcd_10 bit 0), the chest 1.3.1 (lcd_10 bit 3). Reaching the chest lights the standing pose 0.0.1. A press with the diver already at the chest moves him out of the chain and back, and starts a take ($0317). The bag he carries moves with him ($031E). Then $032B.","t":"code","b":[102],"m":"RC","x":[254,744,819,831]},{"a":769,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":770,"t":"code","b":[198],"m":"TRS","oa":1047,"o":"skip_if_clear0"},{"a":771,"t":"code","b":[146],"m":"TR","oa":811,"o":"move_done"},{"a":772,"t":"code","b":[246],"m":"TRS","oa":1061,"o":"point_14"},{"a":773,"t":"code","b":[5],"m":"RM","o":"1"},{"a":774,"t":"code","b":[6],"m":"RM","o":"2"},{"a":775,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":776,"t":"code","b":[221],"m":"TRS","oa":1054,"o":"point_03"},{"a":777,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":778,"t":"code","b":[108],"m":"DECB"},{"a":779,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":780,"t":"code","b":[216],"m":"TRS","oa":1059,"o":"point_11"},{"a":781,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":782,"t":"code","b":[108],"m":"DECB"},{"a":783,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":784,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":785,"t":"code","b":[87],"m":"TM","o":"3"},{"a":786,"t":"code","b":[154],"m":"TR","oa":789,"o":"$1A"},{"a":787,"t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18"},{"a":788,"t":"code","b":[12],"m":"SM","o":"0"},{"a":789,"t":"code","b":[244],"m":"TRS","oa":1052,"o":"skip_if_carry","x":[786]},{"a":790,"t":"code","b":[157],"m":"TR","oa":798,"o":"move_bag_on"},{"a":791,"l":"take_start","c":"take_start: right at the chest: puts the diver back at the chest, marks the take under way (lcd_08 bit 0) and puts grab_step's token in flag_07 bit 2.","t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10"},{"a":792,"t":"code","b":[15],"m":"SM","o":"3"},{"a":793,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":794,"t":"code","b":[12],"m":"SM","o":"0"},{"a":795,"t":"code","b":[108],"m":"DECB"},{"a":796,"t":"code","b":[14],"m":"SM","o":"2"},{"a":797,"t":"code","b":[5],"m":"RM","o":"1"},{"a":798,"l":"move_bag_on","c":"move_bag_on: the treasure bag one place toward the chest, with the diver: 4.2.0 (lcd_03 bit 2), 3.3.1 (lcd_12 bit 3), 2.1.1 (lcd_11 bit 1), 1.1.1 (lcd_10 bit 1), 1.2.0 (lcd_00 bit 2).","t":"code","b":[102],"m":"RC","x":[790]},{"a":799,"t":"code","b":[221],"m":"TRS","oa":1054,"o":"point_03"},{"a":800,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":801,"t":"code","b":[95,18],"m":"LBL","oa":4114,"o":"lcd_12"},{"a":803,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":804,"t":"code","b":[108],"m":"DECB"},{"a":805,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":806,"t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10"},{"a":807,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":808,"t":"code","b":[64],"m":"LB","oa":4096,"o":"lcd_00"},{"a":809,"t":"code","b":[82],"m":"TC"},{"a":810,"t":"code","b":[14],"m":"SM","o":"2"},{"a":811,"l":"move_done","c":"move_done: in a game, back to after_draw ($0036). In the clock's demo, on to the tentacle's turn ($03FA, $0100), so the demo's step is a whole step of the game.","t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game","x":[771,823,870]},{"a":812,"t":"code","b":[145],"m":"TR","oa":815,"o":"$11"},{"a":813,"t":"code","b":[112],"m":"SSR","o":"0"},{"a":814,"t":"code","b":[147],"m":"TR","oa":54,"o":"after_draw"},{"a":815,"t":"code","b":[127],"m":"SSR","o":"$F","x":[812]},{"a":816,"t":"code","b":[149],"m":"TR","oa":1018,"o":"$15"},{"a":817,"l":"demo_move","c":"demo_move: the clock's demo diver, once a second (clock_second, $001B) and after a press in the alarm's setting: back toward the boat while he carries treasure (redraw_flags bit 1), on toward the chest otherwise.","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[33,751]},{"a":818,"t":"code","b":[85],"m":"TM","o":"1"},{"a":819,"t":"code","b":[128],"m":"TR","oa":768,"o":"move_on"},{"a":820,"l":"move_back","c":"move_back: left, in a game or the demo: nothing when the diver is in the boat. Otherwise the take ends (lcd_08 bit 0), the arms' poses go out (lcd_18 bits 0 and 1), and move_back_chain ($0340) moves him one place back.","t":"code","b":[102],"m":"RC","x":[746]},{"a":821,"t":"code","b":[246],"m":"TRS","oa":1061,"o":"point_14"},{"a":822,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3"},{"a":823,"t":"code","b":[146],"m":"TR","oa":811,"o":"move_done"},{"a":824,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":825,"t":"code","b":[4],"m":"RM","o":"0"},{"a":826,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":827,"t":"code","b":[5],"m":"RM","o":"1"},{"a":828,"t":"code","b":[4],"m":"RM","o":"0"},{"a":829,"t":"code","b":[125],"m":"SSR","o":"$D"},{"a":830,"t":"code","b":[128],"m":"TR","oa":832,"o":"move_back_chain"},{"a":831,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":768,"o":"move_on"},{"a":832,"l":"move_back_chain","c":"move_back_chain: the diver one place toward the boat, the chain of move_on the other way, with the raised arm 1.2.1 put out. Off the rope he climbs into the boat only with treasure (the bag on the rope, 4.2.0): the boat shows him with his bag (lcd_14 = $C), points_left ($29) is set to 3 in a game (6 in the demo), and boat_timer starts again. Without treasure he stays on the rope ($0359). Then the bag moves back with him ($035A).","t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10","x":[830,895]},{"a":833,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":834,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":835,"t":"code","b":[6],"m":"RM","o":"2"},{"a":836,"t":"code","b":[100],"m":"INCB"},{"a":837,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":838,"t":"code","b":[95,2],"m":"LBL","oa":4098,"o":"lcd_02"},{"a":840,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":841,"t":"code","b":[100],"m":"INCB"},{"a":842,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":843,"t":"code","b":[244],"m":"TRS","oa":1052,"o":"skip_if_carry"},{"a":844,"t":"code","b":[144],"m":"TR","oa":858,"o":"move_bag_back"},{"a":845,"t":"code","b":[86],"m":"TM","o":"2"},{"a":846,"t":"code","b":[161],"m":"TR","oa":857,"o":"$21"},{"a":847,"t":"code","b":[246],"m":"TRS","oa":1061,"o":"point_14"},{"a":848,"t":"code","b":[44],"m":"LAX","o":"$C"},{"a":849,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":850,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":851,"t":"code","b":[38],"m":"LAX","o":"6"},{"a":852,"t":"code","b":[35],"m":"LAX","o":"3"},{"a":853,"t":"code","b":[70],"m":"LB","oa":4137,"o":"points_left"},{"a":854,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":855,"t":"code","b":[192],"m":"TRS","oa":1024,"o":"clear_40_41"},{"a":856,"t":"code","b":[144],"m":"TR","oa":858,"o":"move_bag_back"},{"a":857,"t":"code","b":[13],"m":"SM","o":"1","x":[846]},{"a":858,"l":"move_bag_back","c":"move_bag_back: the treasure bag one place toward the boat, from the chest to the rope; off the rope it is gone (the boat's bag was lit above).","t":"code","b":[102],"m":"RC","x":[844,856]},{"a":859,"t":"code","b":[64],"m":"LB","oa":4096,"o":"lcd_00"},{"a":860,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":861,"t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10"},{"a":862,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":863,"t":"code","b":[100],"m":"INCB"},{"a":864,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":865,"t":"code","b":[100],"m":"INCB"},{"a":866,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":867,"t":"code","b":[221],"m":"TRS","oa":1054,"o":"point_03"},{"a":868,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":869,"t":"code","b":[124],"m":"SSR","o":"$C"},{"a":870,"t":"code","b":[146],"m":"TR","oa":811,"o":"move_done"},{"a":871,"l":"deliver_step","c":"deliver_step: in each step while points_left ($29) is not 0: takes one from it, ends the carrying (redraw_flags bit 1) when it reaches 1, swaps the boat's bag and hand (5.2.1 and 5.1.1) so the diver waves the bag, and adds a point with its sound ($0375). In a game the step then skips the tentacle's turn ($037B to $0080): the octopus waits while the boat counts the treasure in, as it does on the step a treasure is lifted.","t":"code","b":[70],"m":"LB","oa":4137,"o":"points_left","x":[125]},{"a":872,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":873,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":874,"t":"code","b":[130],"m":"TR","oa":893,"o":"$02"},{"a":875,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":876,"t":"code","b":[33],"m":"LAX","o":"1"},{"a":877,"t":"code","b":[83],"m":"TAM"},{"a":878,"t":"code","b":[164],"m":"TR","oa":881,"o":"$24"},{"a":879,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags"},{"a":880,"t":"code","b":[5],"m":"RM","o":"1"},{"a":881,"t":"code","b":[246],"m":"TRS","oa":1061,"o":"point_14","x":[878]},{"a":882,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":883,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":884,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":885,"l":"point_due","c":"point_due: asks for a point (events bit 0) and the point's sound (sound_flags bit 2). In a game it goes straight to after_catch_check ($0080), with no tentacle's turn; in the demo on to $03E5.","t":"code","b":[76],"m":"LB","oa":4107,"o":"events","x":[123]},{"a":886,"t":"code","b":[12],"m":"SM","o":"0"},{"a":887,"t":"code","b":[66],"m":"LB","oa":4128,"o":"sound_flags"},{"a":888,"t":"code","b":[14],"m":"SM","o":"2"},{"a":889,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":890,"t":"code","b":[130],"m":"TR","oa":893,"o":"$02"},{"a":891,"t":"code","b":[114],"m":"SSR","o":"2"},{"a":892,"t":"code","b":[128],"m":"TR","oa":128,"o":"after_catch_check"},{"a":893,"t":"code","b":[127],"m":"SSR","o":"$F","x":[874,890]},{"a":894,"t":"code","b":[182],"m":"TR","oa":997,"o":"take_end"},{"a":895,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":832,"o":"move_back_chain"},{"a":896,"l":"read_pad","c":"read_pad: reads left and right; returns with a skip for a new press. In the clock nothing counts (the demo plays by itself), nor during a caught diver's count, nor while the boat counts in treasure (points_left). Left and right together count as neither and end the hold (pad_flags bit 0). A press that pad_flags says was already held counts again only after power on and in the alarm's setting, as a repeat when the divider reaches repeat_at ($28), four times a second; in a game it repeats too while a key of the R2 test row is held ($03B9).","t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[10,76,959]},{"a":897,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":898,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":899,"t":"code","b":[151],"m":"TR","oa":914,"o":"$17"},{"a":900,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":901,"t":"code","b":[110],"m":"RTN"},{"a":902,"t":"code","b":[87],"m":"TM","o":"3"},{"a":903,"t":"code","b":[187],"m":"TR","oa":905,"o":"$3B"},{"a":904,"t":"code","b":[151],"m":"TR","oa":914,"o":"$17"},{"a":905,"t":"code","b":[95,67],"m":"LBL","oa":4163,"o":"caught","x":[903]},{"a":907,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":908,"t":"code","b":[90],"m":"TA0"},{"a":909,"t":"code","b":[110],"m":"RTN"},{"a":910,"t":"code","b":[70],"m":"LB","oa":4137,"o":"points_left"},{"a":911,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":912,"t":"code","b":[90],"m":"TA0"},{"a":913,"t":"code","b":[110],"m":"RTN"},{"a":914,"t":"code","b":[74],"m":"LB","oa":4138,"o":"pad_flags","x":[899,904]},{"a":915,"t":"code","b":[81],"m":"TB"},{"a":916,"t":"code","b":[161],"m":"TR","oa":921,"o":"$21"},{"a":917,"t":"code","b":[80],"m":"TA"},{"a":918,"t":"code","b":[168],"m":"TR","oa":923,"o":"$28"},{"a":919,"t":"code","b":[4],"m":"RM","o":"0","x":[922]},{"a":920,"t":"code","b":[110],"m":"RTN"},{"a":921,"t":"code","b":[80],"m":"TA","x":[916]},{"a":922,"t":"code","b":[134],"m":"TR","oa":919,"o":"$06"},{"a":923,"t":"code","b":[84],"m":"TM","o":"0","x":[918]},{"a":924,"t":"code","b":[153],"m":"TR","oa":947,"o":"pad_new"},{"a":925,"t":"code","b":[45],"m":"LAX","o":"$D"},{"a":926,"t":"code","b":[1],"m":"ATR"},{"a":927,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":928,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":929,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":930,"t":"code","b":[182],"m":"TR","oa":933,"o":"$36"},{"a":931,"t":"code","b":[57],"m":"ADX","o":"9"},{"a":932,"t":"code","b":[170],"m":"TR","oa":953,"o":"$2A"},{"a":933,"t":"code","b":[94,4],"m":"DTA","x":[930,955]},{"a":935,"t":"code","b":[95,40],"m":"LBL","oa":4136,"o":"repeat_at"},{"a":937,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":938,"t":"code","b":[12],"m":"SM","o":"0"},{"a":939,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":940,"t":"code","b":[83],"m":"TAM"},{"a":941,"t":"code","b":[110],"m":"RTN"},{"a":942,"t":"code","b":[52],"m":"ADX","o":"4","x":[952]},{"a":943,"t":"code","b":[0],"m":"SKIP"},{"a":944,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":945,"t":"code","b":[12],"m":"SM","o":"0"},{"a":946,"t":"code","b":[111],"m":"RTNS"},{"a":947,"l":"pad_new","c":"pad_new: a new press: marks it held (pad_flags bit 0) and sets repeat_at to the divider's count plus 4, with bit 0 set ($03AE).","t":"code","b":[12],"m":"SM","o":"0","x":[924]},{"a":948,"t":"code","b":[94,4],"m":"DTA"},{"a":950,"t":"code","b":[95,40],"m":"LBL","oa":4136,"o":"repeat_at"},{"a":952,"t":"code","b":[162],"m":"TR","oa":942,"o":"$22"},{"a":953,"t":"code","b":[106],"m":"KTA","x":[932]},{"a":954,"t":"code","b":[90],"m":"TA0"},{"a":955,"t":"code","b":[182],"m":"TR","oa":933,"o":"$36"},{"a":956,"t":"code","b":[110],"m":"RTN"},{"a":957,"t":"code","b":[0],"m":"SKIP"},{"a":958,"t":"code","b":[0],"m":"SKIP"},{"a":959,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":896,"o":"read_pad"},{"a":960,"l":"power_on","c":"power_on: where the chip starts at power on and after ACL. Clears the data cells of rows 0 to 4 (clear_down from column 12 of each), selects the R4 row, asks for a redraw, sets the time to 12:00 AM ($36 = 1, $37 = 2) and the alarm to 12:00 PM ($32 = 9, $33 = 2), turns the screen on and makes a pass. Mode 0 shows every segment until Time is pressed.","t":"code","b":[0],"m":"SKIP","x":[1023]},{"a":961,"t":"code","b":[95,76],"m":"LBL","oa":4172,"o":"$4C"},{"a":963,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":964,"t":"code","b":[95,60],"m":"LBL","oa":4156,"o":"$3C"},{"a":966,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":967,"t":"code","b":[95,44],"m":"LBL","oa":4140,"o":"$2C"},{"a":969,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":970,"t":"code","b":[95,28],"m":"LBL","oa":4124,"o":"$1C"},{"a":972,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":973,"t":"code","b":[95,12],"m":"LBL","oa":4108,"o":"$0C"},{"a":975,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":976,"t":"code","b":[237],"m":"TRS","oa":1063,"o":"select_r4"},{"a":977,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw"},{"a":978,"t":"code","b":[95,54],"m":"LBL","oa":4150,"o":"time_h10"},{"a":980,"t":"code","b":[33],"m":"LAX","o":"1"},{"a":981,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":982,"t":"code","b":[13],"m":"SM","o":"1"},{"a":983,"t":"code","b":[95,50],"m":"LBL","oa":4146,"o":"alarm_h10"},{"a":985,"t":"code","b":[41],"m":"LAX","o":"9"},{"a":986,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":987,"t":"code","b":[13],"m":"SM","o":"1"},{"a":988,"t":"code","b":[33],"m":"LAX","o":"1"},{"a":989,"t":"code","b":[3],"m":"ATBP"},{"a":990,"t":"code","b":[112],"m":"SSR","o":"0"},{"a":991,"t":"code","b":[188],"m":"TR","oa":4,"o":"pass"},{"a":992,"l":"page0f_unused","c":"page0f_unused: five SKIPs that nothing reaches.","t":"code","b":[0],"m":"SKIP"},{"a":993,"t":"code","b":[0],"m":"SKIP"},{"a":994,"t":"code","b":[0],"m":"SKIP"},{"a":995,"t":"code","b":[0],"m":"SKIP"},{"a":996,"t":"code","b":[0],"m":"SKIP"},{"a":997,"l":"take_end","c":"take_end: in each step, the token leaving the raised arm (C from grab_step) puts the diver back to standing (0.0.1) and ends the take (lcd_08 bit 0). The SM 0 and RM 0 run only then: in the demo and in a game.","t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18","x":[894]},{"a":998,"t":"code","b":[82],"m":"TC"},{"a":999,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1000,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":1001,"t":"code","b":[82],"m":"TC"},{"a":1002,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1003,"l":"boat_leave","c":"boat_leave: after 8 seconds in the boat (boat_timer bit 3), the diver goes down the rope by himself, unless T1's upper branch is out (4.2.1, lcd_13 bit 2): the boat's segments go out (lcd_14 = 0) and the rope's diver lights (4.1.0). Then, in a game, the tentacle's turn ($03FA, $0100); in the demo a plain pass.","t":"code","b":[95,65],"m":"LBL","oa":4161,"o":"boat_timer_lo"},{"a":1005,"t":"code","b":[87],"m":"TM","o":"3"},{"a":1006,"t":"code","b":[148],"m":"TR","oa":1016,"o":"$14"},{"a":1007,"t":"code","b":[236],"m":"TRS","oa":1060,"o":"point_13"},{"a":1008,"t":"code","b":[225],"m":"TRS","oa":1049,"o":"skip_if_clear2"},{"a":1009,"t":"code","b":[148],"m":"TR","oa":1016,"o":"$14"},{"a":1010,"t":"code","b":[100],"m":"INCB"},{"a":1011,"t":"code","b":[87],"m":"TM","o":"3"},{"a":1012,"t":"code","b":[148],"m":"TR","oa":1016,"o":"$14"},{"a":1013,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":1014,"t":"code","b":[29],"m":"EXCD","o":"1"},{"a":1015,"t":"code","b":[13],"m":"SM","o":"1"},{"a":1016,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game","x":[1006,1009,1012]},{"a":1017,"t":"code","b":[130],"m":"TR","oa":1021,"o":"$02"},{"a":1018,"t":"code","b":[102],"m":"RC","x":[816]},{"a":1019,"t":"code","b":[116],"m":"SSR","o":"4"},{"a":1020,"t":"code","b":[128],"m":"TR","oa":256,"o":"tentacle_turn"},{"a":1021,"t":"code","b":[112],"m":"SSR","o":"0","x":[1017]},{"a":1022,"t":"code","b":[188],"m":"TR","oa":4,"o":"pass"},{"a":1023,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":960,"o":"power_on"},{"a":1024,"l":"clear_40_41","c":"clear_40_41: sets boat_timer ($40, $41) to 0, through clear_down from $41. It runs when the buttons change, when a caught diver's count ends ($0739), when the diver reaches the boat and when a game starts.","t":"code","b":[95,65],"m":"LBL","oa":4161,"o":"boat_timer_lo","x":[724,855,1087,1328,1395,1776,1849]},{"a":1026,"l":"clear_down","c":"clear_down: writes 0 to the cell at B and each one below it in the row, down to column 0 (LAX 0, EXCD in a loop until BL wraps; $0498 on page $12).","t":"code","b":[227],"m":"TRS","oa":1176,"o":"h_clear_down","x":[963,966,969,972,975,1473,1475,1478,1696]},{"a":1027,"l":"set_redraw","c":"set_redraw: sets redraw_flags ($2B) bit 0, which asks for the screen to be drawn again.","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[3,27,80,736,749,752,977,1304,1327,1450,1461,1484,1557]},{"a":1028,"t":"code","b":[12],"m":"SM","o":"0","x":[678,1783]},{"a":1029,"t":"code","b":[110],"m":"RTN"},{"a":1030,"l":"draw_cell","c":"draw_cell: shifts the cell at B into the screen's W' latches (bit 3 by WS or WR, as A's bit 3 says) and moves B on one column. The drawing routine calls it once for each segment cell.","t":"code","b":[24],"m":"LDA","o":"0","x":[1610,1612,1613,1614,1615,1626,1639,1641,1642,1643,1644,1645]},{"a":1031,"l":"draw_a","c":"draw_a: draw_cell from its second instruction, shifting A as it is. Nothing calls it directly.","t":"code","b":[87],"m":"TM","o":"3"},{"a":1032,"t":"code","b":[158],"m":"TR","oa":1035,"o":"$1E"},{"a":1033,"t":"code","b":[99],"m":"WS","x":[1468]},{"a":1034,"t":"code","b":[143],"m":"TR","oa":1036,"o":"$0F"},{"a":1035,"t":"code","b":[98],"m":"WR","x":[1032]},{"a":1036,"t":"code","b":[100],"m":"INCB","x":[1034]},{"a":1037,"t":"code","b":[110],"m":"RTN"},{"a":1038,"l":"c_not_game_b","c":"c_not_game_b: points B at mode ($30) and sets C unless the mode is Game B (2): C clear means Game B. It runs by $0410's code on page $11 ($0464).","t":"code","b":[209],"m":"TRS","oa":1150,"o":"h_c_not_game_b_tr","x":[161,177,1511,1585]},{"a":1039,"l":"skip_if_game","c":"skip_if_game: points B at mode ($30) and returns with a skip when the mode is Game A (4) or Game B (2).","t":"code","b":[220],"m":"TRS","oa":1140,"o":"h_skip_if_game","x":[17,100,120,128,242,811,850,889,1016,1287,1319,1546,1561,1752,1835]},{"a":1040,"l":"point_mode_or_3b","c":"point_mode_or_3b: in Game A returns with B at mode ($30); in anything else returns with a skip and B at time_s1 ($3B), the seconds' units. The tentacles' steps call it to take a bit of the clock's seconds as their chance in Game B and the clock ($010D, $0133, $0161, $01A2).","t":"code","b":[225],"m":"TRS","oa":1214,"o":"h_point_mode_or_3b_tr","x":[269,307,353,418,663,685,702]},{"a":1041,"l":"table_unused","c":"table_unused: three LAX, an LBL $21 and a TR that nothing reaches: no TRS lands on these steps of page $10 (a coverage run of every mode never ran them).","t":"code","b":[33],"m":"LAX","o":"1"},{"a":1042,"t":"code","b":[38],"m":"LAX","o":"6"},{"a":1043,"t":"code","b":[41],"m":"LAX","o":"9"},{"a":1044,"t":"code","b":[95,33],"m":"LBL","oa":4129,"o":"$21"},{"a":1046,"t":"code","b":[162],"m":"TR","oa":1070,"o":"$22"},{"a":1047,"l":"skip_if_clear0","c":"skip_if_clear0: returns with a skip when bit 0 of the cell at B is clear.","t":"code","b":[228],"m":"TRS","oa":1197,"o":"h_skip_if_clear0","x":[384,426,486,770,1375,1667]},{"a":1048,"l":"skip_if_clear1","c":"skip_if_clear1: returns with a skip when bit 1 of the cell at B is clear (its body is on page $11, $0440). Only add_point calls it, for the bonus ($009B).","t":"code","b":[208],"m":"TRS","oa":1088,"o":"h_skip_if_clear1","x":[155]},{"a":1049,"l":"skip_if_clear2","c":"skip_if_clear2: returns with a skip when bit 2 of the cell at B is clear.","t":"code","b":[235],"m":"TRS","oa":1193,"o":"h_skip_if_clear2","x":[35,321,1008,1285]},{"a":1050,"l":"skip_if_3b_clear3","c":"skip_if_3b_clear3: points B at time_s1 ($3B), the seconds' units, and returns with a skip when its bit 3 is clear. The four tentacles use it to hold an empty tentacle back while the seconds' units are 8 or 9 ($0117, $0143, $0182, $01AC).","t":"code","b":[79],"m":"LB","oa":4155,"o":"time_s1","x":[279,323,386,428]},{"a":1051,"l":"skip_if_clear3","c":"skip_if_clear3: returns with a skip when bit 3 of the cell at B is clear.","t":"code","b":[229],"m":"TRS","oa":1212,"o":"h_skip_if_clear3_tr","x":[20,271,277,402,456,761,822,1411,1509,1563,1838]},{"a":1052,"l":"skip_if_carry","c":"skip_if_carry: returns with a skip when C is set (TC skips the RTNS when C is clear).","t":"code","b":[217],"m":"TRS","oa":1132,"o":"h_skip_if_carry_tr","x":[286,331,370,390,437,789,843]},{"a":1053,"l":"point_01","c":"point_01: B = $01. Each point_xx entry sets B to one cell and returns: point_03, point_04, point_05, point_07, point_08, point_11, point_13, point_14, point_18, point_15 and point_43 the same way.","t":"code","b":[213],"m":"TRS","oa":1148,"o":"h_point_01_tr","x":[311,320,326,409]},{"a":1054,"l":"point_03","c":"point_03: B = $03.","t":"code","b":[226],"m":"TRS","oa":1213,"o":"h_point_03_tr","x":[422,425,431,458,776,799,867]},{"a":1055,"l":"point_04","c":"point_04: B = $04.","t":"code","b":[245],"m":"TRS","oa":1276,"o":"h_point_04_tr","x":[154,1733,1737,1773,1817,1828,1843]},{"a":1056,"l":"point_05","c":"point_05: B = $05.","t":"code","b":[238],"m":"TRS","oa":1183,"o":"h_point_05_tr","x":[1586,1622,1742]},{"a":1057,"l":"point_07","c":"point_07: B = $07.","t":"code","b":[212],"m":"TRS","oa":1133,"o":"h_point_07","x":[110,1552,1840]},{"a":1058,"l":"point_08","c":"point_08: B = $08.","t":"code","b":[214],"m":"TRS","oa":1111,"o":"h_point_08_tr","x":[95,225,240,264,284,490,769,793,824,1555,1572,1609,1683]},{"a":1059,"l":"point_11","c":"point_11: B = $11.","t":"code","b":[250],"m":"TRS","oa":1275,"o":"h_point_11_tr","x":[472,780,1530,1845]},{"a":1060,"l":"point_13","c":"point_13: B = $13.","t":"code","b":[221],"m":"TRS","oa":1110,"o":"h_point_13_tr","x":[340,357,361,388,395,1007]},{"a":1061,"l":"point_14","c":"point_14: B = $14.","t":"code","b":[239],"m":"TRS","oa":1164,"o":"h_point_14","x":[772,821,847,881,1479,1837]},{"a":1062,"l":"point_18","c":"point_18: B = $18.","t":"code","b":[218],"m":"TRS","oa":1147,"o":"h_point_18_tr","x":[105,725,787,997,1413,1444,1474,1655,1695,1714,1798]},{"a":1063,"l":"select_r4","c":"select_r4: ATR 7 selects the R4 row of buttons (Time, Game B, Game A, Alarm) and keeps the buzzer's pin R1 low, then points B at keys ($31).","t":"code","b":[39],"m":"LAX","o":"7","x":[51,976,1291]},{"a":1064,"t":"code","b":[1],"m":"ATR"},{"a":1065,"l":"point_31","c":"point_31: B = keys ($31).","t":"code","b":[210],"m":"TRS","oa":1149,"o":"h_point_31_tr","x":[1666]},{"a":1066,"l":"point_43","c":"point_43: B = caught ($43).","t":"code","b":[230],"m":"TRS","oa":1175,"o":"h_point_43_tr","x":[84,480,1494,1813]},{"a":1067,"l":"point_15","c":"point_15: B = digit_1 ($15).","t":"code","b":[232],"m":"TRS","oa":1200,"o":"h_point_15","x":[162,178,193,1388,1600,1697,1746]},{"a":1068,"l":"read_divider","c":"read_divider: DTA, A = the divider's bits 11-14, a count that steps 16 times a second.","t":"code","b":[242],"m":"TRS","oa":1277,"o":"h_read_divider_tr","x":[1544,1756]},{"a":1069,"l":"take_cell","c":"take_cell: A = the cell at B, and the cell set to 0.","t":"code","b":[32],"m":"LAX","o":"0","x":[1363,1459,1465,1487,1491,1495]},{"a":1070,"t":"code","b":[16],"m":"EXC","o":"0","x":[1046]},{"a":1071,"t":"code","b":[110],"m":"RTN","x":[670,673]},{"a":1072,"l":"skip_if_nonzero","c":"skip_if_nonzero: A = the cell at B; returns with a skip when it is not 0.","t":"code","b":[241],"m":"TRS","oa":1278,"o":"h_skip_if_nonzero_tr","x":[1537]},{"a":1073,"l":"skip_if_18_bit3","c":"skip_if_18_bit3: returns with a skip when $18 bit 3, the alarm's octopus (0.3.1) beside the clock, is set; B is left at $18.","t":"code","b":[222],"m":"TRS","oa":1119,"o":"h_skip_if_18_bit3","x":[1308,1539,1565,1709,1854]},{"a":1074,"l":"skip_if_42_nonzero","c":"skip_if_42_nonzero: returns with a skip when bonus_blinks ($42) is not 0, during the bonus.","t":"code","b":[237],"m":"TRS","oa":1174,"o":"h_skip_if_42_nonzero_tr","x":[37,1616,1754,1770]},{"a":1075,"l":"skip_unless_redraw","c":"skip_unless_redraw: returns with a skip when redraw_flags ($2B) bit 0 is clear, nothing waiting to be drawn.","t":"code","b":[233],"m":"TRS","oa":1196,"o":"h_skip_unless_redraw","x":[49,56,570]},{"a":1076,"l":"skip_if_07_bit3","c":"skip_if_07_bit3: returns with a skip when $07 bit 3, the game over flag, is set.","t":"code","b":[219],"m":"TRS","oa":1129,"o":"h_skip_if_07_bit3","x":[40,244,1289,1321,1524,1548]},{"a":1077,"l":"skip_if_43_nonzero","c":"skip_if_43_nonzero: returns with a skip when caught ($43) is not 0, a caught diver's count running.","t":"code","b":[224],"m":"TRS","oa":1152,"o":"h_skip_if_43_nonzero","x":[28,81]},{"a":1078,"l":"take_bit0","c":"take_bit0: when bit 0 of the cell at B is set, clears it and returns with a skip; otherwise returns. take_bit1, take_bit2 and take_bit3 the same for their bit.","t":"code","b":[211],"m":"TRS","oa":1112,"o":"h_take_bit0","x":[131,1553,1559,1786]},{"a":1079,"l":"take_bit1","c":"take_bit1: when bit 1 of the cell at B is set, clears it and returns with a skip.","t":"code","b":[231],"m":"TRS","oa":1184,"o":"h_take_bit1","x":[1408]},{"a":1080,"l":"take_bit2","c":"take_bit2: when bit 2 of the cell at B is set, clears it and returns with a skip.","t":"code","b":[216],"m":"TRS","oa":1136,"o":"h_take_bit2","x":[25,1380,1386,1656]},{"a":1081,"l":"take_bit3","c":"take_bit3: when bit 3 of the cell at B is set, clears it and returns with a skip.","t":"code","b":[223],"m":"TRS","oa":1100,"o":"h_take_bit3","x":[59,1302,1452]},{"a":1082,"l":"skip_if_mode_lt2","c":"skip_if_mode_lt2: returns with a skip when mode ($30) is 0 or 1: just after power on, or the clock.","t":"code","b":[236],"m":"TRS","oa":1204,"o":"h_skip_if_mode_lt2","x":[1496,1566,1574]},{"a":1083,"l":"swap_c_bit0","c":"swap_c_bit0: exchanges C and bit 0 of the cell at B: the bit takes C's value and C the bit's (A is 0 after when the bit was set). swap_c_bit1, swap_c_bit2 and swap_c_bit3 the same for their bit. A chain of these shifts a lit segment along a tentacle or a diver along his path, one place a call.","t":"code","b":[244],"m":"TRS","oa":1261,"o":"h_swap_c_bit0","x":[302,330,348,369,374,389,410,413,432,435,781,783,834,837,1741]},{"a":1084,"l":"swap_c_bit1","c":"swap_c_bit1: exchanges C and bit 1 of the cell at B.","t":"code","b":[243],"m":"TRS","oa":1240,"o":"h_swap_c_bit1","x":[107,111,265,301,343,442,777,805,807,842,862,864,883,1829]},{"a":1085,"l":"swap_c_bit2","c":"swap_c_bit2: exchanges C and bit 2 of the cell at B.","t":"code","b":[246],"m":"TRS","oa":1239,"o":"h_swap_c_bit2_tr","x":[99,113,266,285,327,335,344,347,779,800,840,860,868,882,884,1818,1830]},{"a":1086,"l":"swap_c_bit3","c":"swap_c_bit3: exchanges C and bit 3 of the cell at B. The step after it, $043F, is the step $3F that the program counter never reaches.","t":"code","b":[240],"m":"TRS","oa":1216,"o":"h_swap_c_bit3","x":[283,290,304,328,350,412,415,433,436,627,775,784,803,833,866,1573]},{"a":1087,"t":"code","b":[128],"m":"TR","oa":1024,"o":"clear_40_41"},{"a":1088,"l":"h_skip_if_clear1","c":"h_skip_if_clear1: the body of skip_if_clear1 ($0418).","t":"code","b":[85],"m":"TM","o":"1","x":[1048,1151]},{"a":1089,"t":"code","b":[111],"m":"RTNS"},{"a":1090,"t":"code","b":[110],"m":"RTN"},{"a":1091,"l":"h_point_18","c":"h_point_18: the body of point_18 ($0426).","t":"code","b":[95,24],"m":"LBL","oa":4120,"o":"lcd_18","x":[1147]},{"a":1093,"t":"code","b":[110],"m":"RTN"},{"a":1094,"l":"h_point_01","c":"h_point_01: the body of point_01 ($041D).","t":"code","b":[95,1],"m":"LBL","oa":4097,"o":"lcd_01","x":[1148]},{"a":1096,"t":"code","b":[110],"m":"RTN"},{"a":1097,"l":"h_point_31","c":"h_point_31: the body of point_31 ($0429).","t":"code","b":[95,49],"m":"LBL","oa":4145,"o":"keys","x":[1149]},{"a":1099,"t":"code","b":[110],"m":"RTN"},{"a":1100,"l":"h_take_bit3","c":"h_take_bit3: the body of take_bit3 ($0439).","t":"code","b":[87],"m":"TM","o":"3","x":[1081]},{"a":1101,"t":"code","b":[110],"m":"RTN"},{"a":1102,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1103,"t":"code","b":[111],"m":"RTNS"},{"a":1104,"l":"h_point_08","c":"h_point_08: the body of point_08 ($0422).","t":"code","b":[95,8],"m":"LBL","oa":4104,"o":"lcd_08","x":[1111]},{"a":1106,"t":"code","b":[110],"m":"RTN"},{"a":1107,"l":"h_point_13","c":"h_point_13: the body of point_13 ($0424).","t":"code","b":[95,19],"m":"LBL","oa":4115,"o":"lcd_13","x":[1110]},{"a":1109,"t":"code","b":[110],"m":"RTN"},{"a":1110,"l":"h_point_13_tr","c":"h_point_13_tr: a jump on to the body of point_13 ($0453), from its entry in the call table ($0424); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[171],"m":"TR","oa":1107,"o":"h_point_13","x":[1060]},{"a":1111,"l":"h_point_08_tr","c":"h_point_08_tr: a jump on to the body of point_08 ($0450), from its entry in the call table ($0422); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[156],"m":"TR","oa":1104,"o":"h_point_08","x":[1058]},{"a":1112,"l":"h_take_bit0","c":"h_take_bit0: the body of take_bit0 ($0436).","t":"code","b":[84],"m":"TM","o":"0","x":[1078]},{"a":1113,"t":"code","b":[110],"m":"RTN"},{"a":1114,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1115,"t":"code","b":[111],"m":"RTNS"},{"a":1116,"l":"h_skip_if_carry","c":"h_skip_if_carry: the body of skip_if_carry ($041C).","t":"code","b":[82],"m":"TC","x":[1132]},{"a":1117,"t":"code","b":[111],"m":"RTNS"},{"a":1118,"t":"code","b":[110],"m":"RTN"},{"a":1119,"l":"h_skip_if_18_bit3","c":"h_skip_if_18_bit3: the body of skip_if_18_bit3 ($0431). Its TM 3 and returns at $0461 are shared with skip_if_07_bit3 ($0469).","t":"code","b":[95,24],"m":"LBL","oa":4120,"o":"lcd_18","x":[1073]},{"a":1121,"t":"code","b":[87],"m":"TM","o":"3","x":[1131]},{"a":1122,"t":"code","b":[110],"m":"RTN"},{"a":1123,"t":"code","b":[111],"m":"RTNS"},{"a":1124,"l":"h_c_not_game_b","c":"h_c_not_game_b: the body of c_not_game_b ($040E).","t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[1150]},{"a":1125,"t":"code","b":[102],"m":"RC"},{"a":1126,"t":"code","b":[85],"m":"TM","o":"1"},{"a":1127,"t":"code","b":[103],"m":"SC"},{"a":1128,"t":"code","b":[110],"m":"RTN"},{"a":1129,"l":"h_skip_if_07_bit3","c":"h_skip_if_07_bit3: the body of skip_if_07_bit3 ($0434).","t":"code","b":[95,7],"m":"LBL","oa":4103,"o":"flag_07","x":[1076]},{"a":1131,"t":"code","b":[163],"m":"TR","oa":1121,"o":"$23"},{"a":1132,"l":"h_skip_if_carry_tr","c":"h_skip_if_carry_tr: a jump on to the body of skip_if_carry ($045C), from its entry in the call table ($041C); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[180],"m":"TR","oa":1116,"o":"h_skip_if_carry","x":[1052]},{"a":1133,"l":"h_point_07","c":"h_point_07: the body of point_07 ($0421).","t":"code","b":[95,7],"m":"LBL","oa":4103,"o":"flag_07","x":[1057]},{"a":1135,"t":"code","b":[110],"m":"RTN"},{"a":1136,"l":"h_take_bit2","c":"h_take_bit2: the body of take_bit2 ($0438).","t":"code","b":[86],"m":"TM","o":"2","x":[1080]},{"a":1137,"t":"code","b":[110],"m":"RTN"},{"a":1138,"t":"code","b":[6],"m":"RM","o":"2"},{"a":1139,"t":"code","b":[111],"m":"RTNS"},{"a":1140,"l":"h_skip_if_game","c":"h_skip_if_game: the body of skip_if_game ($040F).","t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[1039]},{"a":1141,"t":"code","b":[85],"m":"TM","o":"1"},{"a":1142,"t":"code","b":[148],"m":"TR","oa":1144,"o":"$14"},{"a":1143,"t":"code","b":[111],"m":"RTNS"},{"a":1144,"t":"code","b":[86],"m":"TM","o":"2","x":[1142]},{"a":1145,"t":"code","b":[110],"m":"RTN"},{"a":1146,"t":"code","b":[111],"m":"RTNS"},{"a":1147,"l":"h_point_18_tr","c":"h_point_18_tr: a jump on to the body of point_18 ($0443), from its entry in the call table ($0426); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[184],"m":"TR","oa":1091,"o":"h_point_18","x":[1062]},{"a":1148,"l":"h_point_01_tr","c":"h_point_01_tr: a jump on to the body of point_01 ($0446), from its entry in the call table ($041D); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[159],"m":"TR","oa":1094,"o":"h_point_01","x":[1053]},{"a":1149,"l":"h_point_31_tr","c":"h_point_31_tr: a jump on to the body of point_31 ($0449), from its entry in the call table ($0429); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[187],"m":"TR","oa":1097,"o":"h_point_31","x":[1065]},{"a":1150,"l":"h_c_not_game_b_tr","c":"h_c_not_game_b_tr: a jump on to the body of c_not_game_b ($0464), from its entry in the call table ($040E); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[172],"m":"TR","oa":1124,"o":"h_c_not_game_b","x":[1038]},{"a":1151,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1088,"o":"h_skip_if_clear1"},{"a":1152,"l":"h_skip_if_43_nonzero","c":"h_skip_if_43_nonzero: the body of skip_if_43_nonzero ($0435). Its test at $0482 is shared with skip_if_42_nonzero ($048F).","t":"code","b":[95,67],"m":"LBL","oa":4163,"o":"caught","x":[1077,1215]},{"a":1154,"t":"code","b":[24],"m":"LDA","o":"0","x":[1169]},{"a":1155,"t":"code","b":[90],"m":"TA0"},{"a":1156,"t":"code","b":[111],"m":"RTNS"},{"a":1157,"t":"code","b":[110],"m":"RTN"},{"a":1158,"l":"h_point_mode_or_3b","c":"h_point_mode_or_3b: the body of point_mode_or_3b ($0410).","t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[1214]},{"a":1159,"t":"code","b":[86],"m":"TM","o":"2"},{"a":1160,"t":"code","b":[189],"m":"TR","oa":1162,"o":"$3D"},{"a":1161,"t":"code","b":[110],"m":"RTN"},{"a":1162,"t":"code","b":[79],"m":"LB","oa":4155,"o":"time_s1","x":[1160]},{"a":1163,"t":"code","b":[111],"m":"RTNS"},{"a":1164,"l":"h_point_14","c":"h_point_14: the body of point_14 ($0425).","t":"code","b":[95,20],"m":"LBL","oa":4116,"o":"lcd_14","x":[1061]},{"a":1166,"t":"code","b":[110],"m":"RTN"},{"a":1167,"l":"h_skip_if_42_nonzero","c":"h_skip_if_42_nonzero: the body of skip_if_42_nonzero ($0432).","t":"code","b":[95,66],"m":"LBL","oa":4162,"o":"bonus_blinks","x":[1174]},{"a":1169,"t":"code","b":[176],"m":"TR","oa":1154,"o":"$30"},{"a":1170,"l":"h_point_43","c":"h_point_43: the body of point_43 ($042A).","t":"code","b":[95,67],"m":"LBL","oa":4163,"o":"caught","x":[1175]},{"a":1172,"t":"code","b":[110],"m":"RTN"},{"a":1173,"t":"code","b":[0],"m":"SKIP"},{"a":1174,"l":"h_skip_if_42_nonzero_tr","c":"h_skip_if_42_nonzero_tr: a jump on to the body of skip_if_42_nonzero ($048F), from its entry in the call table ($0432); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[185],"m":"TR","oa":1167,"o":"h_skip_if_42_nonzero","x":[1074]},{"a":1175,"l":"h_point_43_tr","c":"h_point_43_tr: a jump on to the body of point_43 ($0492), from its entry in the call table ($042A); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[151],"m":"TR","oa":1170,"o":"h_point_43","x":[1066]},{"a":1176,"l":"h_clear_down","c":"h_clear_down: the body of clear_down ($0402).","t":"code","b":[32],"m":"LAX","o":"0","x":[1026,1178]},{"a":1177,"t":"code","b":[28],"m":"EXCD","o":"0"},{"a":1178,"t":"code","b":[131],"m":"TR","oa":1176,"o":"h_clear_down"},{"a":1179,"t":"code","b":[110],"m":"RTN"},{"a":1180,"l":"h_point_05","c":"h_point_05: the body of point_05 ($0420).","t":"code","b":[95,5],"m":"LBL","oa":4101,"o":"flag_05","x":[1183]},{"a":1182,"t":"code","b":[110],"m":"RTN"},{"a":1183,"l":"h_point_05_tr","c":"h_point_05_tr: a jump on to the body of point_05 ($049C), from its entry in the call table ($0420); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[180],"m":"TR","oa":1180,"o":"h_point_05","x":[1056]},{"a":1184,"l":"h_take_bit1","c":"h_take_bit1: the body of take_bit1 ($0437).","t":"code","b":[85],"m":"TM","o":"1","x":[1079]},{"a":1185,"t":"code","b":[110],"m":"RTN"},{"a":1186,"t":"code","b":[5],"m":"RM","o":"1"},{"a":1187,"t":"code","b":[111],"m":"RTNS"},{"a":1188,"l":"h_point_03","c":"h_point_03: the body of point_03 ($041E).","t":"code","b":[95,3],"m":"LBL","oa":4099,"o":"lcd_03","x":[1213]},{"a":1190,"t":"code","b":[110],"m":"RTN"},{"a":1191,"t":"code","b":[0],"m":"SKIP"},{"a":1192,"t":"code","b":[0],"m":"SKIP"},{"a":1193,"l":"h_skip_if_clear2","c":"h_skip_if_clear2: the body of skip_if_clear2 ($0419).","t":"code","b":[86],"m":"TM","o":"2","x":[1049]},{"a":1194,"t":"code","b":[111],"m":"RTNS"},{"a":1195,"t":"code","b":[110],"m":"RTN"},{"a":1196,"l":"h_skip_unless_redraw","c":"h_skip_unless_redraw: the body of skip_unless_redraw ($0433).","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[1075]},{"a":1197,"l":"h_skip_if_clear0","c":"h_skip_if_clear0: the body of skip_if_clear0 ($0417).","t":"code","b":[84],"m":"TM","o":"0","x":[1047]},{"a":1198,"t":"code","b":[111],"m":"RTNS"},{"a":1199,"t":"code","b":[110],"m":"RTN"},{"a":1200,"l":"h_point_15","c":"h_point_15: the body of point_15 ($042B).","t":"code","b":[95,21],"m":"LBL","oa":4117,"o":"digit_1","x":[1067]},{"a":1202,"t":"code","b":[110],"m":"RTN"},{"a":1203,"t":"code","b":[0],"m":"SKIP"},{"a":1204,"l":"h_skip_if_mode_lt2","c":"h_skip_if_mode_lt2: the body of skip_if_mode_lt2 ($043A).","t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[1082]},{"a":1205,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":1206,"t":"code","b":[62],"m":"ADX","o":"$E"},{"a":1207,"t":"code","b":[111],"m":"RTNS"},{"a":1208,"t":"code","b":[110],"m":"RTN"},{"a":1209,"l":"h_skip_if_clear3","c":"h_skip_if_clear3: the body of skip_if_clear3 ($041B).","t":"code","b":[87],"m":"TM","o":"3","x":[1212]},{"a":1210,"t":"code","b":[111],"m":"RTNS"},{"a":1211,"t":"code","b":[110],"m":"RTN"},{"a":1212,"l":"h_skip_if_clear3_tr","c":"h_skip_if_clear3_tr: a jump on to the body of skip_if_clear3 ($04B9), from its entry in the call table ($041B); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[170],"m":"TR","oa":1209,"o":"h_skip_if_clear3","x":[1051]},{"a":1213,"l":"h_point_03_tr","c":"h_point_03_tr: a jump on to the body of point_03 ($04A4), from its entry in the call table ($041E); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[172],"m":"TR","oa":1188,"o":"h_point_03","x":[1054]},{"a":1214,"l":"h_point_mode_or_3b_tr","c":"h_point_mode_or_3b_tr: a jump on to the body of point_mode_or_3b ($0486), from its entry in the call table ($0410); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[159],"m":"TR","oa":1158,"o":"h_point_mode_or_3b","x":[1040]},{"a":1215,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1152,"o":"h_skip_if_43_nonzero"},{"a":1216,"l":"h_swap_c_bit3","c":"h_swap_c_bit3: the body of swap_c_bit3 ($043E).","t":"code","b":[87],"m":"TM","o":"3","x":[1086,1279]},{"a":1217,"t":"code","b":[183],"m":"TR","oa":1224,"o":"$37"},{"a":1218,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1219,"t":"code","b":[82],"m":"TC"},{"a":1220,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1221,"t":"code","b":[103],"m":"SC","x":[1234,1245,1266]},{"a":1222,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":1223,"t":"code","b":[110],"m":"RTN"},{"a":1224,"t":"code","b":[7],"m":"RM","o":"3","x":[1217]},{"a":1225,"t":"code","b":[82],"m":"TC"},{"a":1226,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1227,"t":"code","b":[102],"m":"RC","x":[1238,1249,1270]},{"a":1228,"t":"code","b":[110],"m":"RTN"},{"a":1229,"l":"h_swap_c_bit2","c":"h_swap_c_bit2: the body of swap_c_bit2 ($043D).","t":"code","b":[86],"m":"TM","o":"2","x":[1239]},{"a":1230,"t":"code","b":[171],"m":"TR","oa":1235,"o":"$2B"},{"a":1231,"t":"code","b":[6],"m":"RM","o":"2"},{"a":1232,"t":"code","b":[82],"m":"TC"},{"a":1233,"t":"code","b":[14],"m":"SM","o":"2"},{"a":1234,"t":"code","b":[190],"m":"TR","oa":1221,"o":"$3E"},{"a":1235,"t":"code","b":[6],"m":"RM","o":"2","x":[1230]},{"a":1236,"t":"code","b":[82],"m":"TC"},{"a":1237,"t":"code","b":[14],"m":"SM","o":"2"},{"a":1238,"t":"code","b":[158],"m":"TR","oa":1227,"o":"$1E"},{"a":1239,"l":"h_swap_c_bit2_tr","c":"h_swap_c_bit2_tr: a jump on to the body of swap_c_bit2 ($04CD), from its entry in the call table ($043D); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[167],"m":"TR","oa":1229,"o":"h_swap_c_bit2","x":[1085]},{"a":1240,"l":"h_swap_c_bit1","c":"h_swap_c_bit1: the body of swap_c_bit1 ($043C). The SM 1 at $04DC never runs: with the bit clear the swap takes $04DE.","t":"code","b":[85],"m":"TM","o":"1","x":[1084]},{"a":1241,"t":"code","b":[157],"m":"TR","oa":1246,"o":"$1D"},{"a":1242,"t":"code","b":[5],"m":"RM","o":"1"},{"a":1243,"t":"code","b":[82],"m":"TC"},{"a":1244,"t":"code","b":[13],"m":"SM","o":"1"},{"a":1245,"t":"code","b":[190],"m":"TR","oa":1221,"o":"$3E"},{"a":1246,"t":"code","b":[5],"m":"RM","o":"1","x":[1241]},{"a":1247,"t":"code","b":[82],"m":"TC"},{"a":1248,"t":"code","b":[13],"m":"SM","o":"1"},{"a":1249,"t":"code","b":[158],"m":"TR","oa":1227,"o":"$1E"},{"a":1250,"l":"h_point_11","c":"h_point_11: the body of point_11 ($0423).","t":"code","b":[95,17],"m":"LBL","oa":4113,"o":"lcd_11","x":[1275]},{"a":1252,"t":"code","b":[110],"m":"RTN"},{"a":1253,"l":"h_point_04","c":"h_point_04: the body of point_04 ($041F).","t":"code","b":[95,4],"m":"LBL","oa":4100,"o":"lcd_04","x":[1276]},{"a":1255,"t":"code","b":[110],"m":"RTN"},{"a":1256,"l":"h_read_divider","c":"h_read_divider: the body of read_divider ($042C).","t":"code","b":[94,4],"m":"DTA","x":[1277]},{"a":1258,"t":"code","b":[110],"m":"RTN"},{"a":1259,"t":"code","b":[0],"m":"SKIP"},{"a":1260,"t":"code","b":[0],"m":"SKIP"},{"a":1261,"l":"h_swap_c_bit0","c":"h_swap_c_bit0: the body of swap_c_bit0 ($043B). Its two exits, $04C5 (C set, A = 0) and $04CB (C clear), are shared by all four swaps.","t":"code","b":[84],"m":"TM","o":"0","x":[1083]},{"a":1262,"t":"code","b":[153],"m":"TR","oa":1267,"o":"$19"},{"a":1263,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1264,"t":"code","b":[82],"m":"TC"},{"a":1265,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1266,"t":"code","b":[190],"m":"TR","oa":1221,"o":"$3E"},{"a":1267,"t":"code","b":[4],"m":"RM","o":"0","x":[1262]},{"a":1268,"t":"code","b":[82],"m":"TC"},{"a":1269,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1270,"t":"code","b":[158],"m":"TR","oa":1227,"o":"$1E"},{"a":1271,"l":"h_skip_if_nonzero","c":"h_skip_if_nonzero: the body of skip_if_nonzero ($0430).","t":"code","b":[24],"m":"LDA","o":"0","x":[1278]},{"a":1272,"t":"code","b":[90],"m":"TA0"},{"a":1273,"t":"code","b":[111],"m":"RTNS"},{"a":1274,"t":"code","b":[110],"m":"RTN"},{"a":1275,"l":"h_point_11_tr","c":"h_point_11_tr: a jump on to the body of point_11 ($04E2), from its entry in the call table ($0423); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[177],"m":"TR","oa":1250,"o":"h_point_11","x":[1059]},{"a":1276,"l":"h_point_04_tr","c":"h_point_04_tr: a jump on to the body of point_04 ($04E5), from its entry in the call table ($041F); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[182],"m":"TR","oa":1253,"o":"h_point_04","x":[1055]},{"a":1277,"l":"h_read_divider_tr","c":"h_read_divider_tr: a jump on to the body of read_divider ($04E8), from its entry in the call table ($042C); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[150],"m":"TR","oa":1256,"o":"h_read_divider","x":[1068]},{"a":1278,"l":"h_skip_if_nonzero_tr","c":"h_skip_if_nonzero_tr: a jump on to the body of skip_if_nonzero ($04F7), from its entry in the call table ($0430); a TRS inside a subroutine is a jump (gnw-reference, \"Jumps and calls\").","t":"code","b":[169],"m":"TR","oa":1271,"o":"h_skip_if_nonzero","x":[1072]},{"a":1279,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1216,"o":"h_swap_c_bit3"},{"a":1280,"l":"mode_start","c":"mode_start: after a mode's screen is set up ($05EF), delay ($49) is set to 11, then read_keys.","t":"code","b":[95,73],"m":"LBL","oa":4169,"o":"delay","x":[1343,1520]},{"a":1282,"t":"code","b":[43],"m":"LAX","o":"$B"},{"a":1283,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1284,"l":"read_keys","c":"read_keys: reads the R4 row (Time, Game B, Game A, Alarm) into keys ($31), except in a game under way, where they are not read unless a game key is still held from its start (redraw_flags bit 2). Alarm held masks the other three. A change sets events bit 3, asks for a redraw and starts boat_timer again; the keys are acted on at the next reading that agrees ($0518). Then the R3 test row ($059E).","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags"},{"a":1285,"t":"code","b":[225],"m":"TRS","oa":1049,"o":"skip_if_clear2"},{"a":1286,"t":"code","b":[158],"m":"TR","oa":1291,"o":"$1E"},{"a":1287,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":1288,"t":"code","b":[158],"m":"TR","oa":1291,"o":"$1E"},{"a":1289,"t":"code","b":[204],"m":"TRS","oa":1076,"o":"skip_if_07_bit3"},{"a":1290,"t":"code","b":[164],"m":"TR","oa":1329,"o":"$24"},{"a":1291,"t":"code","b":[237],"m":"TRS","oa":1063,"o":"select_r4","x":[1286,1288]},{"a":1292,"t":"code","b":[106],"m":"KTA"},{"a":1293,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1294,"t":"code","b":[87],"m":"TM","o":"3"},{"a":1295,"t":"code","b":[171],"m":"TR","oa":1299,"o":"$2B"},{"a":1296,"t":"code","b":[6],"m":"RM","o":"2"},{"a":1297,"t":"code","b":[5],"m":"RM","o":"1"},{"a":1298,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1299,"t":"code","b":[83],"m":"TAM","x":[1295]},{"a":1300,"t":"code","b":[132],"m":"TR","oa":1325,"o":"$04"},{"a":1301,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events"},{"a":1302,"t":"code","b":[234],"m":"TRS","oa":1081,"o":"take_bit3"},{"a":1303,"t":"code","b":[164],"m":"TR","oa":1329,"o":"$24"},{"a":1304,"l":"keys_act","c":"keys_act: the same keys at two readings. In the clock, keys that include Time stop the alarm's ringing (lcd_18 bit 3, $0521; the cell is swapped with A to test the keys' bit 0 and swapped back, $0524 without Time). Keys let go: a game key that was held starts its game ($0569). Keys down, out of a game under way: the mode they choose ($0540).","t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw"},{"a":1305,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":1306,"t":"code","b":[84],"m":"TM","o":"0"},{"a":1307,"t":"code","b":[182],"m":"TR","oa":1317,"o":"$36"},{"a":1308,"t":"code","b":[228],"m":"TRS","oa":1073,"o":"skip_if_18_bit3"},{"a":1309,"t":"code","b":[182],"m":"TR","oa":1317,"o":"$36"},{"a":1310,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1311,"t":"code","b":[84],"m":"TM","o":"0"},{"a":1312,"s":"runs only when the keys held in the clock while the alarm rings do not include Time; the coverage run always pressed Time.","t":"code","b":[172],"m":"TR","oa":1316,"o":"$2C"},{"a":1313,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1314,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1315,"t":"code","b":[182],"m":"TR","oa":1317,"o":"$36"},{"a":1316,"t":"code","b":[16],"m":"EXC","o":"0","x":[1312]},{"a":1317,"t":"code","b":[63],"m":"ADX","o":"$F","x":[1307,1309,1315]},{"a":1318,"t":"code","b":[153],"m":"TR","oa":1331,"o":"$19"},{"a":1319,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":1320,"t":"code","b":[146],"m":"TR","oa":1323,"o":"$12"},{"a":1321,"t":"code","b":[204],"m":"TRS","oa":1076,"o":"skip_if_07_bit3"},{"a":1322,"t":"code","b":[164],"m":"TR","oa":1329,"o":"$24"},{"a":1323,"t":"code","b":[117],"m":"SSR","o":"5","x":[1320]},{"a":1324,"t":"code","b":[128],"m":"TR","oa":1344,"o":"keys_mode"},{"a":1325,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events","x":[1300]},{"a":1326,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1327,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw"},{"a":1328,"t":"code","b":[192],"m":"TRS","oa":1024,"o":"clear_40_41"},{"a":1329,"t":"code","b":[118],"m":"SSR","o":"6","x":[1290,1303,1322]},{"a":1330,"t":"code","b":[157],"m":"TR","oa":1438,"o":"test_row_r3"},{"a":1331,"t":"code","b":[117],"m":"SSR","o":"5","x":[1318]},{"a":1332,"t":"code","b":[139],"m":"TR","oa":1385,"o":"keys_released"},{"a":1333,"t":"code","b":[0],"m":"SKIP"},{"a":1334,"t":"code","b":[0],"m":"SKIP"},{"a":1335,"t":"code","b":[0],"m":"SKIP"},{"a":1336,"t":"code","b":[0],"m":"SKIP"},{"a":1337,"t":"code","b":[0],"m":"SKIP"},{"a":1338,"t":"code","b":[0],"m":"SKIP"},{"a":1339,"t":"code","b":[0],"m":"SKIP"},{"a":1340,"t":"code","b":[0],"m":"SKIP"},{"a":1341,"t":"code","b":[0],"m":"SKIP"},{"a":1342,"t":"code","b":[0],"m":"SKIP"},{"a":1343,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1280,"o":"mode_start"},{"a":1344,"l":"keys_mode","c":"keys_mode: a ladder of ADX on keys minus 1 picks the mode: Time 1 (the clock), Game B 2, Game A 4, Alarm 8 (the alarm's time shown and set). Time with Game A, or Game A with Game B, give 4; Time with Game B gives 2; all three give 8. Leaving mode 0 (power on) zeroes the seconds and the divider ($054E), so the clock starts at :00. Leaving the alarm's setting checks the alarm at once (events bit 1). Every press of Alarm turns the alarm on or off (events bit 2, $0563). A new mode asks for its screen to be set up (redraw_flags bit 3).","t":"code","b":[63],"m":"ADX","o":"$F","x":[1324,1407]},{"a":1345,"t":"code","b":[187],"m":"TR","oa":1353,"o":"$3B"},{"a":1346,"t":"code","b":[62],"m":"ADX","o":"$E"},{"a":1347,"t":"code","b":[183],"m":"TR","oa":1352,"o":"$37"},{"a":1348,"t":"code","b":[61],"m":"ADX","o":"$D"},{"a":1349,"t":"code","b":[175],"m":"TR","oa":1351,"o":"$2F"},{"a":1350,"t":"code","b":[40],"m":"LAX","o":"8"},{"a":1351,"t":"code","b":[36],"m":"LAX","o":"4","x":[1349]},{"a":1352,"t":"code","b":[34],"m":"LAX","o":"2","x":[1347]},{"a":1353,"t":"code","b":[33],"m":"LAX","o":"1","x":[1345]},{"a":1354,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":1355,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1356,"t":"code","b":[90],"m":"TA0"},{"a":1357,"t":"code","b":[181],"m":"TR","oa":1364,"o":"$35"},{"a":1358,"t":"code","b":[101],"m":"IDIV"},{"a":1359,"t":"code","b":[75],"m":"LB","oa":4154,"o":"time_s10"},{"a":1360,"t":"code","b":[88],"m":"TG"},{"a":1361,"t":"code","b":[0],"m":"SKIP"},{"a":1362,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1363,"t":"code","b":[196],"m":"TRS","oa":1069,"o":"take_cell"},{"a":1364,"t":"code","b":[56],"m":"ADX","o":"8","x":[1357]},{"a":1365,"t":"code","b":[144],"m":"TR","oa":1370,"o":"$10"},{"a":1366,"t":"code","b":[56],"m":"ADX","o":"8"},{"a":1367,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events"},{"a":1368,"t":"code","b":[13],"m":"SM","o":"1"},{"a":1369,"t":"code","b":[180],"m":"TR","oa":1372,"o":"$34"},{"a":1370,"t":"code","b":[56],"m":"ADX","o":"8","x":[1365]},{"a":1371,"t":"code","b":[0],"m":"SKIP"},{"a":1372,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[1369]},{"a":1373,"t":"code","b":[83],"m":"TAM"},{"a":1374,"t":"code","b":[163],"m":"TR","oa":1377,"o":"$23"},{"a":1375,"t":"code","b":[198],"m":"TRS","oa":1047,"o":"skip_if_clear0"},{"a":1376,"t":"code","b":[140],"m":"TR","oa":1396,"o":"$0C"},{"a":1377,"t":"code","b":[87],"m":"TM","o":"3","x":[1374]},{"a":1378,"t":"code","b":[155],"m":"TR","oa":1382,"o":"$1B"},{"a":1379,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events"},{"a":1380,"t":"code","b":[212],"m":"TRS","oa":1080,"o":"take_bit2"},{"a":1381,"t":"code","b":[14],"m":"SM","o":"2"},{"a":1382,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[1378]},{"a":1383,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1384,"t":"code","b":[140],"m":"TR","oa":1396,"o":"$0C"},{"a":1385,"l":"keys_released","c":"keys_released: when the key let go was a game key (redraw_flags bit 2), the game starts: the score is set to 000, the octopus's body (7.0.0, flag_06 bit 0) lights and boat_timer starts again.","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[1332]},{"a":1386,"t":"code","b":[212],"m":"TRS","oa":1080,"o":"take_bit2"},{"a":1387,"t":"code","b":[140],"m":"TR","oa":1396,"o":"$0C"},{"a":1388,"t":"code","b":[210],"m":"TRS","oa":1067,"o":"point_15"},{"a":1389,"t":"code","b":[32],"m":"LAX","o":"0","x":[1391]},{"a":1390,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1391,"t":"code","b":[132],"m":"TR","oa":1389,"o":"$04"},{"a":1392,"t":"code","b":[95,6],"m":"LBL","oa":4102,"o":"flag_06"},{"a":1394,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1395,"t":"code","b":[192],"m":"TRS","oa":1024,"o":"clear_40_41"},{"a":1396,"t":"code","b":[118],"m":"SSR","o":"6","x":[1376,1384,1387]},{"a":1397,"t":"code","b":[157],"m":"TR","oa":1438,"o":"test_row_r3"},{"a":1398,"t":"code","b":[0],"m":"SKIP"},{"a":1399,"t":"code","b":[0],"m":"SKIP"},{"a":1400,"t":"code","b":[0],"m":"SKIP"},{"a":1401,"t":"code","b":[0],"m":"SKIP"},{"a":1402,"t":"code","b":[0],"m":"SKIP"},{"a":1403,"t":"code","b":[0],"m":"SKIP"},{"a":1404,"t":"code","b":[0],"m":"SKIP"},{"a":1405,"t":"code","b":[0],"m":"SKIP"},{"a":1406,"t":"code","b":[0],"m":"SKIP"},{"a":1407,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1344,"o":"keys_mode"},{"a":1408,"l":"alarm_check","c":"alarm_check: once a minute (events bit 1, set by minute_rolled), except in the alarm's setting: the ringing stops (lcd_18 bit 3, the note lcd_08 bit 3 and the bolts flag_07 bit 0), and when the alarm is on (events bit 2) the alarm's time ($32-$35) is compared with the time ($36-$39); when they agree it rings ($05A4). So it rings for a minute.","t":"code","b":[233],"m":"TRS","oa":1079,"o":"take_bit1","x":[1457,1471]},{"a":1409,"t":"code","b":[146],"m":"TR","oa":1451,"o":"keys_done"},{"a":1410,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":1411,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3"},{"a":1412,"t":"code","b":[146],"m":"TR","oa":1451,"o":"keys_done"},{"a":1413,"t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18"},{"a":1414,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1415,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":1416,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1417,"t":"code","b":[108],"m":"DECB"},{"a":1418,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1419,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events"},{"a":1420,"t":"code","b":[86],"m":"TM","o":"2"},{"a":1421,"t":"code","b":[146],"m":"TR","oa":1451,"o":"keys_done"},{"a":1422,"t":"code","b":[95,50],"m":"LBL","oa":4146,"o":"alarm_h10"},{"a":1424,"t":"code","b":[24],"m":"LDA","o":"0","x":[1437]},{"a":1425,"t":"code","b":[11],"m":"EXBLA"},{"a":1426,"t":"code","b":[52],"m":"ADX","o":"4"},{"a":1427,"t":"code","b":[11],"m":"EXBLA"},{"a":1428,"t":"code","b":[83],"m":"TAM"},{"a":1429,"t":"code","b":[146],"m":"TR","oa":1451,"o":"keys_done"},{"a":1430,"t":"code","b":[11],"m":"EXBLA"},{"a":1431,"t":"code","b":[55],"m":"ADX","o":"7"},{"a":1432,"t":"code","b":[144],"m":"TR","oa":1434,"o":"$10"},{"a":1433,"t":"code","b":[172],"m":"TR","oa":1444,"o":"alarm_ring"},{"a":1434,"t":"code","b":[54],"m":"ADX","o":"6","x":[1432]},{"a":1435,"t":"code","b":[0],"m":"SKIP"},{"a":1436,"t":"code","b":[11],"m":"EXBLA"},{"a":1437,"t":"code","b":[156],"m":"TR","oa":1424,"o":"$1C"},{"a":1438,"l":"test_row_r3","c":"test_row_r3: reads the R3 row, wired on the board to test pads only (MAME's \"alarm test?\"). K4 rings the alarm at once ($05A4). K3 goes back to mode 0, the state after power on with every segment lit and the time to be set, and zeroes the seconds ($05B2). K1 and K2 do nothing.","t":"code","b":[43],"m":"LAX","o":"$B","x":[1330,1397]},{"a":1439,"t":"code","b":[1],"m":"ATR"},{"a":1440,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events"},{"a":1441,"t":"code","b":[106],"m":"KTA"},{"a":1442,"t":"code","b":[56],"m":"ADX","o":"8"},{"a":1443,"t":"code","b":[136],"m":"TR","oa":1456,"o":"$08"},{"a":1444,"l":"alarm_ring","c":"alarm_ring: the alarm rings: the alarm's octopus (0.3.1, lcd_18 bit 3) and the note (0.3.0, lcd_08 bit 3) light, its sound is asked for (sound_flags bit 0), and a redraw.","t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18","x":[1433]},{"a":1445,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1446,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":1447,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1448,"t":"code","b":[66],"m":"LB","oa":4128,"o":"sound_flags"},{"a":1449,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1450,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw"},{"a":1451,"l":"keys_done","c":"keys_done: a new mode waiting (redraw_flags bit 3) is set up ($05C0); otherwise back to the pass at $0009.","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[1409,1412,1421,1429]},{"a":1452,"t":"code","b":[234],"m":"TRS","oa":1081,"o":"take_bit3"},{"a":1453,"t":"code","b":[149],"m":"TR","oa":1466,"o":"$15"},{"a":1454,"t":"code","b":[119],"m":"SSR","o":"7"},{"a":1455,"t":"code","b":[128],"m":"TR","oa":1472,"o":"mode_setup"},{"a":1456,"t":"code","b":[52],"m":"ADX","o":"4","x":[1443]},{"a":1457,"t":"code","b":[128],"m":"TR","oa":1408,"o":"alarm_check"},{"a":1458,"l":"test_k3","c":"test_k3: R3's K3: mode 0, a redraw unless it was mode 0 already, and the seconds set to 00.","t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":1459,"t":"code","b":[196],"m":"TRS","oa":1069,"o":"take_cell"},{"a":1460,"t":"code","b":[90],"m":"TA0"},{"a":1461,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw"},{"a":1462,"t":"code","b":[75],"m":"LB","oa":4154,"o":"time_s10"},{"a":1463,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":1464,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1465,"t":"code","b":[196],"m":"TRS","oa":1069,"o":"take_cell"},{"a":1466,"t":"code","b":[109],"m":"COMCB","x":[1453]},{"a":1467,"t":"code","b":[112],"m":"SSR","o":"0"},{"a":1468,"t":"code","b":[187],"m":"TR","oa":1033,"o":"$3B"},{"a":1469,"t":"code","b":[0],"m":"SKIP"},{"a":1470,"t":"code","b":[0],"m":"SKIP"},{"a":1471,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1408,"o":"alarm_check"},{"a":1472,"l":"mode_setup","c":"mode_setup: a new mode's starting state: clears row 0 ($00-$09) and row 1 ($10-$18) of the screen and the tentacles, boat_timer and bonus_blinks; puts the diver in the boat with his hand (lcd_14 = $A) and the two spare divers (lcd_04 = 6); clears the carrying, the sounds, a point due, points_left, the caught sound and caught. Then, for the clock and the alarm's setting, the octopus's body; after power on and for the clock also keys ($31) = $E, so the next reading always counts as a change, and tick_flags bit 2 cleared. For a game, the GAME A or GAME B label (3.1.0 or 3.1.1), and redraw_flags bit 2, so the game starts when its key is let go ($0569). Then mode_start ($0500).","t":"code","b":[68],"m":"LB","oa":4105,"o":"tentacle_dirs","x":[1455,1535]},{"a":1473,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":1474,"t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18"},{"a":1475,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":1476,"t":"code","b":[95,66],"m":"LBL","oa":4162,"o":"bonus_blinks"},{"a":1478,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":1479,"t":"code","b":[246],"m":"TRS","oa":1061,"o":"point_14"},{"a":1480,"t":"code","b":[42],"m":"LAX","o":"$A"},{"a":1481,"t":"code","b":[17],"m":"EXC","o":"1"},{"a":1482,"t":"code","b":[38],"m":"LAX","o":"6"},{"a":1483,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1484,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw"},{"a":1485,"t":"code","b":[5],"m":"RM","o":"1"},{"a":1486,"t":"code","b":[66],"m":"LB","oa":4128,"o":"sound_flags"},{"a":1487,"t":"code","b":[196],"m":"TRS","oa":1069,"o":"take_cell"},{"a":1488,"t":"code","b":[76],"m":"LB","oa":4107,"o":"events"},{"a":1489,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1490,"t":"code","b":[70],"m":"LB","oa":4137,"o":"points_left"},{"a":1491,"t":"code","b":[196],"m":"TRS","oa":1069,"o":"take_cell"},{"a":1492,"t":"code","b":[69],"m":"LB","oa":4121,"o":"tentacle_flags"},{"a":1493,"t":"code","b":[5],"m":"RM","o":"1"},{"a":1494,"t":"code","b":[229],"m":"TRS","oa":1066,"o":"point_43"},{"a":1495,"t":"code","b":[196],"m":"TRS","oa":1069,"o":"take_cell"},{"a":1496,"t":"code","b":[213],"m":"TRS","oa":1082,"o":"skip_if_mode_lt2"},{"a":1497,"t":"code","b":[182],"m":"TR","oa":1509,"o":"$36"},{"a":1498,"t":"code","b":[100],"m":"INCB"},{"a":1499,"t":"code","b":[46],"m":"LAX","o":"$E"},{"a":1500,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1501,"t":"code","b":[73],"m":"LB","oa":4122,"o":"tick_flags"},{"a":1502,"t":"code","b":[6],"m":"RM","o":"2"},{"a":1503,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[1510]},{"a":1504,"t":"code","b":[6],"m":"RM","o":"2"},{"a":1505,"t":"code","b":[95,6],"m":"LBL","oa":4102,"o":"flag_06"},{"a":1507,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1508,"t":"code","b":[145],"m":"TR","oa":1519,"o":"$11"},{"a":1509,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3","x":[1497]},{"a":1510,"t":"code","b":[142],"m":"TR","oa":1503,"o":"$0E"},{"a":1511,"t":"code","b":[243],"m":"TRS","oa":1038,"o":"c_not_game_b"},{"a":1512,"t":"code","b":[95,18],"m":"LBL","oa":4114,"o":"lcd_12"},{"a":1514,"t":"code","b":[82],"m":"TC"},{"a":1515,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":1516,"t":"code","b":[13],"m":"SM","o":"1"},{"a":1517,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags"},{"a":1518,"t":"code","b":[14],"m":"SM","o":"2"},{"a":1519,"t":"code","b":[116],"m":"SSR","o":"4","x":[1508]},{"a":1520,"t":"code","b":[128],"m":"TR","oa":1280,"o":"mode_start"},{"a":1521,"t":"code","b":[0],"m":"SKIP"},{"a":1522,"t":"code","b":[0],"m":"SKIP"},{"a":1523,"t":"code","b":[0],"m":"SKIP"},{"a":1524,"l":"over_pose","c":"over_pose: in a game, the screen of a game under way. After a game is over the caught diver's two poses (2.2.1, 2.3.1, lcd_11 bits 2 and 3) swap by the seconds, odd or even. Then draw_screen ($0640).","t":"code","b":[204],"m":"TRS","oa":1076,"o":"skip_if_07_bit3","x":[1596]},{"a":1525,"t":"code","b":[133],"m":"TR","oa":1532,"o":"$05"},{"a":1526,"t":"code","b":[79],"m":"LB","oa":4155,"o":"time_s1"},{"a":1527,"t":"code","b":[84],"m":"TM","o":"0"},{"a":1528,"t":"code","b":[40],"m":"LAX","o":"8"},{"a":1529,"t":"code","b":[36],"m":"LAX","o":"4"},{"a":1530,"t":"code","b":[216],"m":"TRS","oa":1059,"o":"point_11"},{"a":1531,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1532,"t":"code","b":[121],"m":"SSR","o":"9","x":[1525]},{"a":1533,"t":"code","b":[128],"m":"TR","oa":1600,"o":"draw_screen"},{"a":1534,"t":"code","b":[0],"m":"SKIP"},{"a":1535,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1472,"o":"mode_setup"},{"a":1536,"l":"draw_prep","c":"draw_prep: called from every pass ($0010). While the alarm rings (lcd_18 bit 3), the note (0.3.0) and the bolts (8.0.0, flag_07 bit 0) light; they stay lit while the divider's count is below 3 (in a game under way, where 8 is added and the second ADX skipped, while it is 8 to 15), and otherwise the bolts go out and the note with them ($0613). When nothing asks for a redraw (redraw_flags bit 0) it skips the drawing ($063D). Otherwise it sets the note to the alarm's on or off (events bit 2) after power on, in the clock and in the alarm's setting while not ringing ($0620), and picks the screen: the time ($0680) after power on and in the clock, the alarm's time ($06A6) in the alarm's setting, and in a game the game's own screen ($062E).","t":"code","b":[67],"m":"LB","oa":4144,"o":"mode","x":[1599]},{"a":1537,"t":"code","b":[200],"m":"TRS","oa":1072,"o":"skip_if_nonzero"},{"a":1538,"t":"code","b":[141],"m":"TR","oa":1558,"o":"draw_wanted"},{"a":1539,"t":"code","b":[228],"m":"TRS","oa":1073,"o":"skip_if_18_bit3"},{"a":1540,"t":"code","b":[156],"m":"TR","oa":1552,"o":"$1C"},{"a":1541,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":1542,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1543,"t":"code","b":[108],"m":"DECB"},{"a":1544,"t":"code","b":[201],"m":"TRS","oa":1068,"o":"read_divider"},{"a":1545,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1546,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":1547,"t":"code","b":[179],"m":"TR","oa":1550,"o":"$33"},{"a":1548,"t":"code","b":[204],"m":"TRS","oa":1076,"o":"skip_if_07_bit3"},{"a":1549,"t":"code","b":[56],"m":"ADX","o":"8"},{"a":1550,"t":"code","b":[61],"m":"ADX","o":"$D","x":[1547]},{"a":1551,"t":"code","b":[141],"m":"TR","oa":1558,"o":"draw_wanted"},{"a":1552,"t":"code","b":[227],"m":"TRS","oa":1057,"o":"point_07","x":[1540]},{"a":1553,"t":"code","b":[211],"m":"TRS","oa":1078,"o":"take_bit0"},{"a":1554,"t":"code","b":[141],"m":"TR","oa":1558,"o":"draw_wanted"},{"a":1555,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":1556,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1557,"t":"code","b":[248],"m":"TRS","oa":1027,"o":"set_redraw"},{"a":1558,"l":"draw_wanted","c":"draw_wanted: takes redraw_flags bit 0; with no redraw asked for, nothing is drawn ($063D).","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[1538,1551,1554]},{"a":1559,"t":"code","b":[211],"m":"TRS","oa":1078,"o":"take_bit0"},{"a":1560,"t":"code","b":[130],"m":"TR","oa":1597,"o":"no_draw"},{"a":1561,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":1562,"t":"code","b":[67],"m":"LB","oa":4144,"o":"mode"},{"a":1563,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3"},{"a":1564,"t":"code","b":[135],"m":"TR","oa":1568,"o":"note_alarm_on"},{"a":1565,"t":"code","b":[228],"m":"TRS","oa":1073,"o":"skip_if_18_bit3"},{"a":1566,"t":"code","b":[213],"m":"TRS","oa":1082,"o":"skip_if_mode_lt2"},{"a":1567,"t":"code","b":[155],"m":"TR","oa":1574,"o":"$1B"},{"a":1568,"l":"note_alarm_on","c":"note_alarm_on: the note (0.3.0, lcd_08 bit 3) shows whether the alarm is on (events bit 2).","t":"code","b":[76],"m":"LB","oa":4107,"o":"events","x":[1564]},{"a":1569,"t":"code","b":[103],"m":"SC"},{"a":1570,"t":"code","b":[86],"m":"TM","o":"2"},{"a":1571,"t":"code","b":[102],"m":"RC"},{"a":1572,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":1573,"t":"code","b":[193],"m":"TRS","oa":1086,"o":"swap_c_bit3"},{"a":1574,"t":"code","b":[213],"m":"TRS","oa":1082,"o":"skip_if_mode_lt2","x":[1567]},{"a":1575,"t":"code","b":[165],"m":"TR","oa":1578,"o":"$25"},{"a":1576,"t":"code","b":[122],"m":"SSR","o":"$A"},{"a":1577,"t":"code","b":[128],"m":"TR","oa":1664,"o":"time_screen"},{"a":1578,"t":"code","b":[87],"m":"TM","o":"3","x":[1575]},{"a":1579,"t":"code","b":[162],"m":"TR","oa":1582,"o":"game_screen"},{"a":1580,"t":"code","b":[122],"m":"SSR","o":"$A"},{"a":1581,"t":"code","b":[155],"m":"TR","oa":1702,"o":"alarm_screen"},{"a":1582,"l":"game_screen","c":"game_screen: in a game. While its key is held before the game starts (redraw_flags bit 2) the digits show that game's best score ($25-$27 for Game B, $45-$47 for Game A, the row reached by flipping BM), with the colon out. Then over_pose ($05F4) and draw_screen.","t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[1579]},{"a":1583,"t":"code","b":[86],"m":"TM","o":"2"},{"a":1584,"t":"code","b":[138],"m":"TR","oa":1595,"o":"$0A"},{"a":1585,"t":"code","b":[243],"m":"TRS","oa":1038,"o":"c_not_game_b"},{"a":1586,"t":"code","b":[199],"m":"TRS","oa":1056,"o":"point_05"},{"a":1587,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1588,"t":"code","b":[26],"m":"LDA","o":"2"},{"a":1589,"t":"code","b":[82],"m":"TC","x":[1594]},{"a":1590,"t":"code","b":[2],"m":"SBM"},{"a":1591,"t":"code","b":[27],"m":"LDA","o":"3"},{"a":1592,"t":"code","b":[107],"m":"RBM"},{"a":1593,"t":"code","b":[23],"m":"EXCI","o":"3"},{"a":1594,"t":"code","b":[166],"m":"TR","oa":1589,"o":"$26"},{"a":1595,"t":"code","b":[119],"m":"SSR","o":"7","x":[1584]},{"a":1596,"t":"code","b":[140],"m":"TR","oa":1524,"o":"over_pose"},{"a":1597,"l":"no_draw","c":"no_draw: goes to $0677, past the drawing.","t":"code","b":[121],"m":"SSR","o":"9","x":[1560]},{"a":1598,"t":"code","b":[169],"m":"TR","oa":1655,"o":"after_drawing"},{"a":1599,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1536,"o":"draw_prep"},{"a":1600,"l":"draw_screen","c":"draw_screen: writes the score's or the time's leading zeros as $B, a blank (DTW draws $B as nothing), up to the last digit. Then the first common, H1: lcd_08 to latch 0, lcd_00-lcd_03 to latches 1-4, lcd_04 to latch 5, and the three digits from $15-$17 to latches 6-8, each with its extra segment from bit 0 of $05, $06, $07 (the colon 6.0.0, the octopus's body 7.0.0, the bolts 8.0.0) through m' (SMF, RMF); TW copies the nine latches to the screen. COMCN picks the digits' other half, and the second common, H2: lcd_18 to latch 0, lcd_10-lcd_14 to latches 1-5, the digits again. So each cell of rows 0 and 1 is four segments, at the latch of its column.","t":"code","b":[210],"m":"TRS","oa":1067,"o":"point_15","x":[1533,1663]},{"a":1601,"t":"code","b":[32],"m":"LAX","o":"0","x":[1608]},{"a":1602,"t":"code","b":[83],"m":"TAM"},{"a":1603,"t":"code","b":[187],"m":"TR","oa":1609,"o":"$3B"},{"a":1604,"t":"code","b":[43],"m":"LAX","o":"$B"},{"a":1605,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1606,"t":"code","b":[39],"m":"LAX","o":"7"},{"a":1607,"t":"code","b":[91],"m":"TABL"},{"a":1608,"t":"code","b":[160],"m":"TR","oa":1601,"o":"$20"},{"a":1609,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08","x":[1603,1712,1745]},{"a":1610,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1611,"t":"code","b":[64],"m":"LB","oa":4096,"o":"lcd_00"},{"a":1612,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1613,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1614,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1615,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1616,"t":"code","b":[242],"m":"TRS","oa":1074,"o":"skip_if_42_nonzero"},{"a":1617,"t":"code","b":[131],"m":"TR","oa":1624,"o":"$03"},{"a":1618,"l":"bonus_blink","c":"bonus_blink: during the bonus (bonus_blinks, $42, not 0), latch 5 is drawn as 6 (both spare divers, 5.1.0 and 5.2.0, and neither AM nor PM) on its odd counts, and from lcd_04 (no spares) on its even ones: the spares blink.","t":"code","b":[84],"m":"TM","o":"0"},{"a":1619,"t":"code","b":[131],"m":"TR","oa":1624,"o":"$03"},{"a":1620,"t":"code","b":[38],"m":"LAX","o":"6"},{"a":1621,"t":"code","b":[98],"m":"WR"},{"a":1622,"t":"code","b":[199],"m":"TRS","oa":1056,"o":"point_05"},{"a":1623,"t":"code","b":[168],"m":"TR","oa":1627,"o":"$28"},{"a":1624,"t":"code","b":[95,4],"m":"LBL","oa":4100,"o":"lcd_04","x":[1617,1619]},{"a":1626,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1627,"t":"code","b":[105],"m":"SMF","x":[1623,1634]},{"a":1628,"t":"code","b":[84],"m":"TM","o":"0"},{"a":1629,"t":"code","b":[104],"m":"RMF"},{"a":1630,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":1631,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":1632,"t":"code","b":[93],"m":"DTW"},{"a":1633,"t":"code","b":[100],"m":"INCB"},{"a":1634,"t":"code","b":[168],"m":"TR","oa":1627,"o":"$28"},{"a":1635,"t":"code","b":[92],"m":"TW"},{"a":1636,"t":"code","b":[96],"m":"COMCN"},{"a":1637,"t":"code","b":[95,24],"m":"LBL","oa":4120,"o":"lcd_18"},{"a":1639,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1640,"t":"code","b":[65],"m":"LB","oa":4112,"o":"lcd_10"},{"a":1641,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1642,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1643,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1644,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1645,"t":"code","b":[223],"m":"TRS","oa":1030,"o":"draw_cell"},{"a":1646,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":1647,"t":"code","b":[93],"m":"DTW"},{"a":1648,"t":"code","b":[100],"m":"INCB"},{"a":1649,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":1650,"t":"code","b":[93],"m":"DTW"},{"a":1651,"t":"code","b":[100],"m":"INCB"},{"a":1652,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":1653,"t":"code","b":[93],"m":"DTW"},{"a":1654,"t":"code","b":[96],"m":"COMCN"},{"a":1655,"l":"after_drawing","c":"after_drawing: the alarm setting's octopus (lcd_18 bit 3) goes out once it has been drawn, when lcd_18 bit 2 says it was the setting's ($06B3). Then $06D2.","t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18","x":[1598]},{"a":1656,"t":"code","b":[212],"m":"TRS","oa":1080,"o":"take_bit2"},{"a":1657,"t":"code","b":[138],"m":"TR","oa":1659,"o":"$0A"},{"a":1658,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1659,"t":"code","b":[123],"m":"SSR","o":"$B","x":[1657]},{"a":1660,"t":"code","b":[151],"m":"TR","oa":1746,"o":"digits_back"},{"a":1661,"l":"page19_unused","c":"page19_unused: two SKIPs that nothing reaches.","t":"code","b":[0],"m":"SKIP"},{"a":1662,"t":"code","b":[0],"m":"SKIP"},{"a":1663,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1600,"o":"draw_screen"},{"a":1664,"l":"time_screen","c":"time_screen: after power on (mode 0): every segment of rows 0 and 1 lit ($0691). In the clock: the alarm's time while Time is held ($06A6), otherwise the time: $37-$39 to digit_1-digit_3 ($0685, a loop of LDA and EXCI that steps BM between row 3 and row 1), then the hours' 1 and AM or PM ($06C0).","t":"code","b":[49],"m":"ADX","o":"1","x":[1577,1727]},{"a":1665,"t":"code","b":[174],"m":"TR","oa":1681,"o":"all_lit"},{"a":1666,"t":"code","b":[203],"m":"TRS","oa":1065,"o":"point_31"},{"a":1667,"t":"code","b":[198],"m":"TRS","oa":1047,"o":"skip_if_clear0"},{"a":1668,"t":"code","b":[155],"m":"TR","oa":1702,"o":"alarm_screen"},{"a":1669,"t":"code","b":[71],"m":"LB","oa":4153,"o":"time_m1","x":[1691]},{"a":1670,"t":"code","b":[26],"m":"LDA","o":"2","x":[1679]},{"a":1671,"t":"code","b":[11],"m":"EXBLA"},{"a":1672,"t":"code","b":[62],"m":"ADX","o":"$E"},{"a":1673,"t":"code","b":[0],"m":"SKIP"},{"a":1674,"t":"code","b":[11],"m":"EXBLA"},{"a":1675,"t":"code","b":[22],"m":"EXCI","o":"2"},{"a":1676,"t":"code","b":[0],"m":"SKIP"},{"a":1677,"t":"code","b":[38],"m":"LAX","o":"6"},{"a":1678,"t":"code","b":[91],"m":"TABL"},{"a":1679,"t":"code","b":[159],"m":"TR","oa":1670,"o":"$1F"},{"a":1680,"t":"code","b":[147],"m":"TR","oa":1718,"o":"$13"},{"a":1681,"l":"all_lit","c":"all_lit: mode 0: $F into each cell of rows 0 and 1 ($00-$08 and $10-$18, the digits and their extra segments included), every segment; the R3 row is selected and read: with its K4 held the digits are 888 ($069C), and row 1 dark too when the minutes' units are odd; otherwise the time is written over the digits.","t":"code","b":[43],"m":"LAX","o":"$B","x":[1665]},{"a":1682,"t":"code","b":[1],"m":"ATR"},{"a":1683,"t":"code","b":[241],"m":"TRS","oa":1058,"o":"point_08"},{"a":1684,"t":"code","b":[47],"m":"LAX","o":"$F","x":[1688]},{"a":1685,"t":"code","b":[17],"m":"EXC","o":"1"},{"a":1686,"t":"code","b":[47],"m":"LAX","o":"$F"},{"a":1687,"t":"code","b":[29],"m":"EXCD","o":"1"},{"a":1688,"t":"code","b":[181],"m":"TR","oa":1684,"o":"$35"},{"a":1689,"t":"code","b":[106],"m":"KTA"},{"a":1690,"t":"code","b":[56],"m":"ADX","o":"8"},{"a":1691,"t":"code","b":[190],"m":"TR","oa":1669,"o":"$3E"},{"a":1692,"t":"code","b":[71],"m":"LB","oa":4153,"o":"time_m1"},{"a":1693,"t":"code","b":[84],"m":"TM","o":"0"},{"a":1694,"t":"code","b":[163],"m":"TR","oa":1697,"o":"$23"},{"a":1695,"s":"with K4 of the R3 row held at power on's screen and the minutes' units odd, row 1 of the screen ($10-$18) is cleared as well; the coverage run held it only at 12:00.","t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18"},{"a":1696,"t":"code","b":[240],"m":"TRS","oa":1026,"o":"clear_down"},{"a":1697,"t":"code","b":[210],"m":"TRS","oa":1067,"o":"point_15","x":[1694]},{"a":1698,"t":"code","b":[40],"m":"LAX","o":"8","x":[1700]},{"a":1699,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1700,"t":"code","b":[177],"m":"TR","oa":1698,"o":"$31"},{"a":1701,"t":"code","b":[145],"m":"TR","oa":1711,"o":"$11"},{"a":1702,"l":"alarm_screen","c":"alarm_screen: the alarm's time ($33-$35) to the digits. Unless the alarm is ringing, the alarm's octopus (0.3.1) lights, marked to go out after the drawing (lcd_18 bit 2). Then the hours' 1 and AM or PM from $32 ($06C0).","t":"code","b":[95,51],"m":"LBL","oa":4147,"o":"alarm_h1","x":[1581,1668]},{"a":1704,"t":"code","b":[26],"m":"LDA","o":"2","x":[1722]},{"a":1705,"t":"code","b":[100],"m":"INCB"},{"a":1706,"t":"code","b":[100],"m":"INCB"},{"a":1707,"t":"code","b":[22],"m":"EXCI","o":"2"},{"a":1708,"t":"code","b":[148],"m":"TR","oa":1720,"o":"$14"},{"a":1709,"t":"code","b":[228],"m":"TRS","oa":1073,"o":"skip_if_18_bit3"},{"a":1710,"t":"code","b":[164],"m":"TR","oa":1713,"o":"$24","x":[1768]},{"a":1711,"t":"code","b":[121],"m":"SSR","o":"9","x":[1701]},{"a":1712,"t":"code","b":[187],"m":"TR","oa":1609,"o":"$3B"},{"a":1713,"t":"code","b":[15],"m":"SM","o":"3","x":[1710]},{"a":1714,"t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18"},{"a":1715,"t":"code","b":[14],"m":"SM","o":"2"},{"a":1716,"t":"code","b":[95,50],"m":"LBL","oa":4146,"o":"alarm_h10"},{"a":1718,"t":"code","b":[123],"m":"SSR","o":"$B","x":[1680]},{"a":1719,"t":"code","b":[128],"m":"TR","oa":1728,"o":"hours_ampm"},{"a":1720,"t":"code","b":[108],"m":"DECB","x":[1708]},{"a":1721,"t":"code","b":[108],"m":"DECB"},{"a":1722,"t":"code","b":[150],"m":"TR","oa":1704,"o":"$16"},{"a":1723,"t":"code","b":[0],"m":"SKIP"},{"a":1724,"t":"code","b":[0],"m":"SKIP"},{"a":1725,"t":"code","b":[0],"m":"SKIP"},{"a":1726,"t":"code","b":[0],"m":"SKIP"},{"a":1727,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1664,"o":"time_screen"},{"a":1728,"l":"hours_ampm","c":"hours_ampm: from the hours' tens at B ($36 or $32): bit 3 PM (5.3.0) or AM (5.0.0, lcd_04 bits 3 and 0), bit 0 the hours' 1 (5.0.1, lcd_14 bit 0). The colon (6.0.0, flag_05 bit 0) lights. Then draw_screen at $0649.","t":"code","b":[103],"m":"SC","x":[1719,1791]},{"a":1729,"t":"code","b":[84],"m":"TM","o":"0"},{"a":1730,"t":"code","b":[102],"m":"RC"},{"a":1731,"t":"code","b":[87],"m":"TM","o":"3"},{"a":1732,"t":"code","b":[187],"m":"TR","oa":1737,"o":"$3B"},{"a":1733,"t":"code","b":[206],"m":"TRS","oa":1055,"o":"point_04"},{"a":1734,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1735,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1736,"t":"code","b":[143],"m":"TR","oa":1740,"o":"$0F"},{"a":1737,"t":"code","b":[206],"m":"TRS","oa":1055,"o":"point_04","x":[1732]},{"a":1738,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1739,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1740,"t":"code","b":[25],"m":"LDA","o":"1","x":[1736]},{"a":1741,"t":"code","b":[202],"m":"TRS","oa":1083,"o":"swap_c_bit0"},{"a":1742,"t":"code","b":[199],"m":"TRS","oa":1056,"o":"point_05"},{"a":1743,"t":"code","b":[12],"m":"SM","o":"0"},{"a":1744,"t":"code","b":[121],"m":"SSR","o":"9"},{"a":1745,"t":"code","b":[187],"m":"TR","oa":1609,"o":"$3B"},{"a":1746,"l":"digits_back","c":"digits_back: puts each blank digit ($B) back to 0. Out of a game, after_draw ($0036). In a game: during the bonus, $06DC; while a game key is held, another pass at once ($0004); otherwise after_draw.","t":"code","b":[210],"m":"TRS","oa":1067,"o":"point_15","x":[1660]},{"a":1747,"t":"code","b":[24],"m":"LDA","o":"0","x":[1751]},{"a":1748,"t":"code","b":[53],"m":"ADX","o":"5"},{"a":1749,"t":"code","b":[131],"m":"TR","oa":1752,"o":"$03"},{"a":1750,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1751,"t":"code","b":[171],"m":"TR","oa":1747,"o":"$2B"},{"a":1752,"t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game","x":[1749]},{"a":1753,"t":"code","b":[148],"m":"TR","oa":1784,"o":"$14"},{"a":1754,"t":"code","b":[242],"m":"TRS","oa":1074,"o":"skip_if_42_nonzero"},{"a":1755,"t":"code","b":[178],"m":"TR","oa":1778,"o":"$32"},{"a":1756,"l":"bonus_step","c":"bonus_step: once each half second (the divider's count at 0 or 8) bonus_blinks ($42) goes down one, with a short beep (tone code $B, $02AE). When it reaches 0 both spare divers come back (lcd_04 bits 1 and 2) and boat_timer starts again. Each pass of the bonus ends at $0004, so the game waits until it is over: about 5 seconds.","t":"code","b":[201],"m":"TRS","oa":1068,"o":"read_divider"},{"a":1757,"t":"code","b":[56],"m":"ADX","o":"8"},{"a":1758,"t":"code","b":[56],"m":"ADX","o":"8"},{"a":1759,"t":"code","b":[0],"m":"SKIP"},{"a":1760,"t":"code","b":[90],"m":"TA0"},{"a":1761,"t":"code","b":[166],"m":"TR","oa":1781,"o":"$26"},{"a":1762,"t":"code","b":[24],"m":"LDA","o":"0"},{"a":1763,"t":"code","b":[63],"m":"ADX","o":"$F"},{"a":1764,"t":"code","b":[0],"m":"SKIP"},{"a":1765,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1766,"t":"code","b":[109],"m":"COMCB"},{"a":1767,"t":"code","b":[122],"m":"SSR","o":"$A"},{"a":1768,"t":"code","b":[226],"m":"TRS","oa":1710,"o":"$22"},{"a":1769,"t":"code","b":[109],"m":"COMCB"},{"a":1770,"t":"code","b":[242],"m":"TRS","oa":1074,"o":"skip_if_42_nonzero"},{"a":1771,"t":"code","b":[132],"m":"TR","oa":1773,"o":"$04"},{"a":1772,"t":"code","b":[166],"m":"TR","oa":1781,"o":"$26"},{"a":1773,"t":"code","b":[206],"m":"TRS","oa":1055,"o":"point_04","x":[1771]},{"a":1774,"t":"code","b":[14],"m":"SM","o":"2"},{"a":1775,"t":"code","b":[13],"m":"SM","o":"1"},{"a":1776,"t":"code","b":[192],"m":"TRS","oa":1024,"o":"clear_40_41"},{"a":1777,"t":"code","b":[166],"m":"TR","oa":1781,"o":"$26"},{"a":1778,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags","x":[1755]},{"a":1779,"t":"code","b":[86],"m":"TM","o":"2"},{"a":1780,"t":"code","b":[148],"m":"TR","oa":1784,"o":"$14"},{"a":1781,"t":"code","b":[109],"m":"COMCB","x":[1761,1772,1777]},{"a":1782,"t":"code","b":[112],"m":"SSR","o":"0"},{"a":1783,"t":"code","b":[188],"m":"TR","oa":1028,"o":"$3C"},{"a":1784,"t":"code","b":[109],"m":"COMCB","x":[1753,1780]},{"a":1785,"t":"code","b":[112],"m":"SSR","o":"0"},{"a":1786,"t":"code","b":[147],"m":"TR","oa":1078,"o":"take_bit0"},{"a":1787,"t":"code","b":[0],"m":"SKIP"},{"a":1788,"t":"code","b":[0],"m":"SKIP"},{"a":1789,"t":"code","b":[0],"m":"SKIP"},{"a":1790,"t":"code","b":[0],"m":"SKIP"},{"a":1791,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1728,"o":"hours_ampm"},{"a":1792,"l":"caught_show","c":"caught_show: one step of the caught diver's count (caught, $43, 7 down to 0). The diver, his bags and the arms at the chest are taken off every place in the water (lcd_10, lcd_11, lcd_12 bit 3, lcd_00 bit 2, lcd_02, lcd_03); T2 is set to its first two segments (lcd_03 = 9, 4.0.0 and 4.3.0) and its others cleared; the caught diver (2.1.0) lights with T3's base and second segment (lcd_01 = $E), T3's last two segments left as they are; his limbs take one pose or the other (2.2.1 or 2.3.1) by caught's parity, and the GAME A label is kept. At 6 the first spare climbs into the boat (or the boat stays empty when there is none, $0719); at 3 the second spare moves along ($0724); at 0 the count ends ($072B).","t":"code","b":[20],"m":"EXCI","o":"0","x":[1855]},{"a":1793,"t":"code","b":[82],"m":"TC"},{"a":1794,"t":"code","b":[36],"m":"LAX","o":"4"},{"a":1795,"t":"code","b":[40],"m":"LAX","o":"8"},{"a":1796,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1797,"t":"code","b":[7],"m":"RM","o":"3"},{"a":1798,"t":"code","b":[219],"m":"TRS","oa":1062,"o":"point_18"},{"a":1799,"t":"code","b":[5],"m":"RM","o":"1"},{"a":1800,"t":"code","b":[4],"m":"RM","o":"0"},{"a":1801,"t":"code","b":[64],"m":"LB","oa":4096,"o":"lcd_00"},{"a":1802,"t":"code","b":[6],"m":"RM","o":"2"},{"a":1803,"t":"code","b":[100],"m":"INCB"},{"a":1804,"t":"code","b":[46],"m":"LAX","o":"$E"},{"a":1805,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1806,"t":"code","b":[85],"m":"TM","o":"1"},{"a":1807,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":1808,"t":"code","b":[34],"m":"LAX","o":"2"},{"a":1809,"t":"code","b":[20],"m":"EXCI","o":"0"},{"a":1810,"t":"code","b":[41],"m":"LAX","o":"9"},{"a":1811,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1812,"t":"code","b":[102],"m":"RC"},{"a":1813,"t":"code","b":[229],"m":"TRS","oa":1066,"o":"point_43"},{"a":1814,"t":"code","b":[38],"m":"LAX","o":"6"},{"a":1815,"t":"code","b":[83],"m":"TAM"},{"a":1816,"t":"code","b":[163],"m":"TR","oa":1825,"o":"$23"},{"a":1817,"t":"code","b":[206],"m":"TRS","oa":1055,"o":"point_04"},{"a":1818,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":1819,"t":"code","b":[25],"m":"LDA","o":"1"},{"a":1820,"t":"code","b":[82],"m":"TC"},{"a":1821,"t":"code","b":[42],"m":"LAX","o":"$A"},{"a":1822,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":1823,"t":"code","b":[16],"m":"EXC","o":"0"},{"a":1824,"t":"code","b":[133],"m":"TR","oa":1852,"o":"caught_done"},{"a":1825,"t":"code","b":[35],"m":"LAX","o":"3","x":[1816]},{"a":1826,"t":"code","b":[83],"m":"TAM"},{"a":1827,"t":"code","b":[150],"m":"TR","oa":1832,"o":"$16"},{"a":1828,"t":"code","b":[206],"m":"TRS","oa":1055,"o":"point_04"},{"a":1829,"t":"code","b":[197],"m":"TRS","oa":1084,"o":"swap_c_bit1"},{"a":1830,"t":"code","b":[194],"m":"TRS","oa":1085,"o":"swap_c_bit2"},{"a":1831,"t":"code","b":[133],"m":"TR","oa":1852,"o":"caught_done"},{"a":1832,"t":"code","b":[32],"m":"LAX","o":"0","x":[1827]},{"a":1833,"t":"code","b":[83],"m":"TAM"},{"a":1834,"t":"code","b":[133],"m":"TR","oa":1852,"o":"caught_done"},{"a":1835,"l":"caught_end","c":"caught_end: in a game, with no diver in the boat, the game is over (flag_07 bit 3, $0730). Otherwise, and in the demo (which gives a spare back, $0733), the caught diver goes out, boat_timer starts again and the treasure is lost (redraw_flags bit 1).","t":"code","b":[249],"m":"TRS","oa":1039,"o":"skip_if_game"},{"a":1836,"t":"code","b":[153],"m":"TR","oa":1843,"o":"$19"},{"a":1837,"t":"code","b":[246],"m":"TRS","oa":1061,"o":"point_14"},{"a":1838,"t":"code","b":[232],"m":"TRS","oa":1051,"o":"skip_if_clear3"},{"a":1839,"t":"code","b":[166],"m":"TR","oa":1845,"o":"$26"},{"a":1840,"t":"code","b":[227],"m":"TRS","oa":1057,"o":"point_07"},{"a":1841,"t":"code","b":[15],"m":"SM","o":"3"},{"a":1842,"t":"code","b":[133],"m":"TR","oa":1852,"o":"caught_done"},{"a":1843,"t":"code","b":[206],"m":"TRS","oa":1055,"o":"point_04","x":[1836]},{"a":1844,"t":"code","b":[13],"m":"SM","o":"1"},{"a":1845,"t":"code","b":[216],"m":"TRS","oa":1059,"o":"point_11","x":[1839]},{"a":1846,"t":"code","b":[32],"m":"LAX","o":"0"},{"a":1847,"t":"code","b":[17],"m":"EXC","o":"1"},{"a":1848,"t":"code","b":[5],"m":"RM","o":"1"},{"a":1849,"t":"code","b":[192],"m":"TRS","oa":1024,"o":"clear_40_41"},{"a":1850,"t":"code","b":[78],"m":"LB","oa":4139,"o":"redraw_flags"},{"a":1851,"t":"code","b":[5],"m":"RM","o":"1"},{"a":1852,"l":"caught_done","c":"caught_done: back to sleep or another pass ($0031).","t":"code","b":[109],"m":"COMCB","x":[1824,1831,1834,1842]},{"a":1853,"t":"code","b":[112],"m":"SSR","o":"0"},{"a":1854,"t":"code","b":[164],"m":"TR","oa":1073,"o":"skip_if_18_bit3"},{"a":1855,"s":"the step $3F, which the program counter never reaches (gnw-reference, \"The program counter\").","t":"code","b":[128],"m":"TR","oa":1792,"o":"caught_show"},{"a":1856,"t":"gap","n":63680},{"a":4096,"t":"note","l":"lcd_00","c":"lcd_00 ($00): latch 1 of common H1. Bit 0 T3's third segment (1.0.0), bit 1 T3's tip (1.1.0), which reaches the diver's fourth place, bit 2 the treasure bag at the chest (1.2.0), bit 3 T4's base (1.3.0).","note":"outside the tracked image","x":[273,276,282,300,808,859,1611,1801]},{"a":4097,"t":"note","l":"lcd_01","c":"lcd_01 ($01): latch 2, H1. Bit 0 T2's tip (2.0.0), which reaches the third place, bit 1 the caught diver (2.1.0), bits 2 and 3 T3's base and second segment (2.2.0, 2.3.0).","note":"outside the tracked image","x":[1094]},{"a":4098,"t":"note","l":"lcd_02","c":"lcd_02 ($02): latch 3, H1. Bit 0 T2's third segment (3.0.0), bit 1 the GAME A label (3.1.0), bit 2 the diver at the second place (3.2.0), bit 3 T2's fourth segment (3.3.0).","note":"outside the tracked image","x":[838]},{"a":4099,"t":"note","l":"lcd_03","c":"lcd_03 ($03): latch 4, H1. Bit 0 T2's base (4.0.0), bit 1 the diver on the rope, the first place (4.1.0), bit 2 his bag (4.2.0), bit 3 T2's second segment (4.3.0).","note":"outside the tracked image","x":[1188]},{"a":4100,"t":"note","l":"lcd_04","c":"lcd_04 ($04): latch 5, H1. Bit 0 AM (5.0.0), bits 1 and 2 the spare divers in the boat (5.1.0, 5.2.0), bit 3 PM (5.3.0).","note":"outside the tracked image","x":[1253,1624]},{"a":4101,"t":"note","l":"flag_05","c":"flag_05 ($05): bit 0 the clock's colon (6.0.0, the first digit's extra segment).","note":"outside the tracked image","x":[1180]},{"a":4102,"t":"note","l":"flag_06","c":"flag_06 ($06): bit 0 the octopus's body (7.0.0, the second digit's extra segment), lit in every mode but just after power on.","note":"outside the tracked image","x":[1392,1505]},{"a":4103,"t":"note","l":"flag_07","c":"flag_07 ($07): bit 0 the alarm's bolts (8.0.0, the third digit's extra segment), bits 2 and 1 two places of grab_step's token, bit 3 the game is over.","note":"outside the tracked image","x":[542,655,1129,1133]},{"a":4104,"t":"note","l":"lcd_08","c":"lcd_08 ($08): latch 0, H1. Bit 0 has no segment (0.0.0): a take of treasure is under way. Bits 1 and 2 T4's tip and middle (0.1.0, 0.2.0), bit 3 the alarm's note (0.3.0).","note":"outside the tracked image","x":[1104]},{"a":4105,"t":"note","l":"tentacle_dirs","c":"tentacle_dirs ($09): one bit a tentacle, set while it shrinks: bit 0 T1, bit 1 T2, bit 2 T3, bit 3 T4.","note":"outside the tracked image","x":[261,289,297,334,337,373,406,441,509,1472]},{"a":4107,"t":"note","l":"events","c":"events ($0B): bit 0 a point is due, bit 1 a minute has passed (the alarm is checked), bit 2 the alarm is on, bit 3 the keys changed at the last reading.","note":"outside the tracked image","x":[130,623,885,1301,1325,1367,1379,1419,1440,1488,1568]},{"a":4112,"t":"note","l":"lcd_10","c":"lcd_10 ($10): latch 1, H2. Bit 0 the diver at the fourth place (1.0.1), bit 1 his bag (1.1.1), bit 2 the arm lifting the treasure (1.2.1), bit 3 the diver at the chest (1.3.1).","note":"outside the tracked image","x":[112,250,485,510,791,806,832,861,1640]},{"a":4113,"t":"note","l":"lcd_11","c":"lcd_11 ($11): latch 2, H2. Bit 0 the diver at the third place (2.0.1), bit 1 his bag (2.1.1), bits 2 and 3 the caught diver's limbs in one pose and the other (2.2.1, 2.3.1).","note":"outside the tracked image","x":[1250]},{"a":4114,"t":"note","l":"lcd_12","c":"lcd_12 ($12): latch 3, H2. Bit 0 the lower branch of T1, its second segment (3.0.1), bit 1 the GAME B label (3.1.1), bit 2 the lower branch's tip (3.2.1), which reaches the second place, bit 3 the bag at the second place (3.3.1).","note":"outside the tracked image","x":[801,1512]},{"a":4115,"t":"note","l":"lcd_13","c":"lcd_13 ($13): latch 4, H2, T1. Bit 0 its base (4.0.1), bit 1 the upper branch's tip (4.1.1), which reaches the rope, bit 2 the upper branch's first segment (4.2.1), bit 3 the lower branch's first (4.3.1).","note":"outside the tracked image","x":[1107]},{"a":4116,"t":"note","l":"lcd_14","c":"lcd_14 ($14): latch 5, H2. Bit 0 the hours' 1 (5.0.1), bit 1 the boat's diver's hand (5.1.1), bit 2 the bag he holds (5.2.1), bit 3 the diver in the boat (5.3.1).","note":"outside the tracked image","x":[1164]},{"a":4117,"t":"note","l":"digit_1","c":"digit_1 to digit_3 ($15-$17): the three digits. In a game the score, hundreds, tens and units; in the clock the hours' units and the minutes. A digit of $B is drawn blank: leading zeros are written as $B for the drawing and put back to 0 after it.","note":"outside the tracked image","x":[1200]},{"a":4118,"t":"note","l":"digit_2","note":"outside the tracked image"},{"a":4119,"t":"note","l":"digit_3","note":"outside the tracked image","x":[133]},{"a":4120,"t":"note","l":"lcd_18","c":"lcd_18 ($18): latch 0, H2. Bit 0 the diver standing at the chest (0.0.1), bit 1 his arm reaching into it (0.1.1), bit 2 has no segment (0.2.1): the alarm's octopus is the alarm setting's, to go out after drawing; bit 3 the alarm's octopus (0.3.1), lit in the alarm's setting and while the alarm rings.","note":"outside the tracked image","x":[521,1091,1119,1637]},{"a":4121,"t":"note","l":"tentacle_flags","c":"tentacle_flags ($19): bits 2 and 3 count the tentacles' turns (0 T1, 1 T3, 2 T2, 3 T4); bit 1 asks for the caught sound.","note":"outside the tracked image","x":[256,478,756,1492]},{"a":4122,"t":"note","l":"tick_flags","c":"tick_flags ($1A): bit 2 a second has passed (the clock's demo steps on it); bit 3 a press of left or right broke into the wait between steps, which goes on after it.","note":"outside the tracked image","x":[24,58,497,508,527,553,704,1501]},{"a":4123,"t":"note","l":"tone_count","c":"tone_count ($1B): the tone routine's count of loops.","note":"outside the tracked image","x":[496,688,698]},{"a":4128,"t":"note","l":"sound_flags","c":"sound_flags ($20): bit 0 the alarm's sound, bit 2 a point's, bit 3 the step's click (asked for at every catch check).","note":"outside the tracked image","x":[450,525,630,646,887,1448,1486]},{"a":4133,"t":"note","l":"best_b","c":"best_b ($25-$27): Game B's best score, hundreds, tens, units. The chip reaches it from the score's row by flipping BM.","note":"outside the tracked image"},{"a":4136,"t":"note","l":"repeat_at","c":"repeat_at ($28): the divider's count at which a held left or right repeats.","note":"outside the tracked image","x":[935,950]},{"a":4137,"t":"note","l":"points_left","c":"points_left ($29): the points the boat still has to count in for a delivered treasure, 3 in a game.","note":"outside the tracked image","x":[853,871,910,1490]},{"a":4138,"t":"note","l":"pad_flags","c":"pad_flags ($2A): bit 0 left or right is held, so a press counts once; bit 1 is set by grab_step and read by nothing.","note":"outside the tracked image","x":[91,102,914]},{"a":4139,"t":"note","l":"redraw_flags","c":"redraw_flags ($2B): bit 0 the screen must be drawn again; bit 1 the diver carries treasure; bit 2 a game key is held and the game starts when it is let go; bit 3 the mode changed and its screen must be set up.","note":"outside the tracked image","x":[34,118,529,546,628,640,817,879,1027,1196,1284,1382,1385,1451,1503,1517,1558,1582,1778,1850]},{"a":4144,"t":"note","l":"mode","c":"mode ($30): 0 just after power on or ACL (every segment lit; left and right set the time), 1 the clock, 2 Game B, 4 Game A, 8 the alarm's setting.","note":"outside the tracked image","x":[222,455,517,538,548,644,706,896,927,1124,1140,1158,1204,1305,1354,1372,1410,1458,1536,1562]},{"a":4145,"t":"note","l":"keys","c":"keys ($31): the R4 row's buttons at the last reading: bit 0 Time, bit 1 Game B, bit 2 Game A, bit 3 Alarm.","note":"outside the tracked image","x":[1097]},{"a":4146,"t":"note","l":"alarm_h10","c":"alarm_h10 to alarm_m1 ($32-$35): the alarm's time: the hours' tens (0 or 1, with bit 3 for PM), the hours' units, the minutes' tens and units. Power on sets 12:00 PM.","note":"outside the tracked image","x":[983,1422,1716]},{"a":4147,"t":"note","l":"alarm_h1","note":"outside the tracked image","x":[617,1702]},{"a":4148,"t":"note","l":"alarm_m10","note":"outside the tracked image"},{"a":4149,"t":"note","l":"alarm_m1","note":"outside the tracked image","x":[635]},{"a":4150,"t":"note","l":"time_h10","c":"time_h10 to time_s1 ($36-$3B): the time of day: hours' tens (0 or 1, bit 3 for PM), hours' units, minutes' tens and units, seconds' tens and units. Power on sets 12:00 AM. The tentacles take their chances from the seconds (time_s1, time_s10).","note":"outside the tracked image","x":[978]},{"a":4151,"t":"note","l":"time_h1","note":"outside the tracked image","x":[576]},{"a":4152,"t":"note","l":"time_m10","note":"outside the tracked image"},{"a":4153,"t":"note","l":"time_m1","note":"outside the tracked image","x":[625,1669,1692]},{"a":4154,"t":"note","l":"time_s10","note":"outside the tracked image","x":[392,1359,1462]},{"a":4155,"t":"note","l":"time_s1","note":"outside the tracked image","x":[505,558,680,1050,1162,1526]},{"a":4160,"t":"note","l":"boat_timer","c":"boat_timer ($40, $41): seconds, high and low digit of a count to 255, since the keys last changed, the diver last reached the boat, a caught diver's count ended, the bonus ended, a game started, a mode was set up, or a press in the alarm's setting. Bit 3 of the low digit sends the diver down the rope by himself ($03EB); passing 255 after a game is over goes back to the clock.","note":"outside the tracked image"},{"a":4161,"t":"note","l":"boat_timer_lo","note":"outside the tracked image","x":[531,1003,1024]},{"a":4162,"t":"note","l":"bonus_blinks","c":"bonus_blinks ($42): the bonus's count, 10 down to 0, one each half second.","note":"outside the tracked image","x":[157,1167,1476]},{"a":4163,"t":"note","l":"caught","c":"caught ($43): a caught diver's count of steps, 9 down to 0; while it runs no tentacle moves and left and right are not read.","note":"outside the tracked image","x":[905,1152,1170]},{"a":4165,"t":"note","l":"best_a","c":"best_a ($45-$47): Game A's best score, hundreds, tens, units. The chip reaches row 4 as row 6 (SBM), its mirror.","note":"outside the tracked image"},{"a":4169,"t":"note","l":"delay","c":"delay ($49): the passes of the wait before each step: 11 when a mode is set up, then set_wait's value after each step.","note":"outside the tracked image","x":[43,228,1280]},{"a":4170,"t":"note","l":"delay_left","c":"delay_left ($4A): the passes of the wait still to run.","note":"outside the tracked image","x":[69]}]}