Prev: 197D Up: Map Next: 1BBD
1B8A: wait_for_page: Wait up to 2 minutes for page to load (or enter key pressed).
wait_for_page 1B8A XOR A Clear page_ready_flag and ignore_packets_flag.
1B8B LD (page_ready_flag),A
1B8E LD (ignore_packets_flag),A
1B91 LD DE,$0BB8 Set DE to 3000 as a loop counter.
wait_for_page_0 1B94 LD A,(page_ready_flag) If page_ready_flag is set then set ignore_packets_flag and return 0.
1B97 OR A
1B98 JR Z,wait_for_page_1
1B9A LD (ignore_packets_flag),A
1B9D XOR A
1B9E RET
wait_for_page_1 1B9F LD BC,$BFFE Else if enter key is pressed return 1.
1BA2 IN A,(C)
1BA4 RRCA
1BA5 JR C,wait_for_page_2
1BA7 LD A,$01
1BA9 RET
wait_for_page_2 1BAA PUSH DE Else preserve DE.
1BAB CALL data_to_header_row Copy header row from page receive buffer into page display buffer.
1BAE CALL display_header_row Display row 0 of page display buffer (this usually takes more than 1 frame if there are control codes).
1BB1 POP DE Restore DE.
1BB2 EI Wait for next video frame.
1BB3 HALT
1BB4 DI
1BB5 DEC DE Decrement DE and loop back to wait_for_page_0 until DE equals zero (wait for up to two minutes) then return 2.
1BB6 LD A,D
1BB7 OR E
1BB8 JR NZ,wait_for_page_0
1BBA LD A,$02
1BBC RET
Prev: 197D Up: Map Next: 1BBD