Prev: 0ADC Up: Map Next: 0B46
0AFA: wait_and_decode_page: Wait for page_ready_flag, and check for key presses.
Used by the routines at init_variables, hold_page, warm_start_routine and display_error.
wait_and_decode_page 0AFA CALL data_to_header_row
0AFD CALL display_header_row
0B00 CALL detect_any_key Call detect_any_key to detect if any key is pressed.
0B03 AND A If a key is pressed, call handle_keypress.
0B04 JR Z,wait_and_decode_page_0
0B06 CALL handle_keypress
wait_and_decode_page_0 0B09 LD A,(page_ready_flag) Loop until page_ready_flag is set.
0B0C AND A
0B0D JR NZ,wait_and_decode_page_1
0B0F JR wait_and_decode_page
wait_and_decode_page_1 0B11 LD A,(inhibit_display) If inhibit_display is not equal to zero jump back to wait_and_decode_page.
0B14 AND A
0B15 JR NZ,wait_and_decode_page
0B17 CALL copy_page_data Copy page data into display buffer.
0B1A LD A,(bright_attr) Add 7 (white ink) to value in bright_attr and store the result in colour_attr.
0B1D ADD A,$07
0B1F LD (colour_attr),A
0B22 XOR A Clear skip_next_row_flag.
0B23 LD (skip_next_row_flag),A
0B26 LD (page_ready_flag),A Clear page_ready_flag.
wait_and_decode_page_2 0B29 PUSH AF Save A on stack as loop counter.
0B2A LD (row_number),A Store count in row_number.
0B2D CALL decode_row Call decode_row.
0B30 CALL detect_any_key Call detect_any_key to detect if any key is pressed.
0B33 AND A If any key pressed, call handle_keypress, balance stack, and jump back to wait_and_decode_page.
0B34 JR Z,wait_and_decode_page_3
0B36 CALL handle_keypress
0B39 POP AF
0B3A JP wait_and_decode_page
wait_and_decode_page_3 0B3D POP AF Else pop loop counter off stack and increment it.
0B3E INC A
0B3F CP $18 Execute loop 24 times then jump back to wait_and_decode_page.
0B41 JR NZ,wait_and_decode_page_2
0B43 JP wait_and_decode_page
Prev: 0ADC Up: Map Next: 0B46