4Data Telesoftware Adaptor Issue 1.2 | Routines |
Prev: 1C1F | Up: Map | Next: 1C86 |
|
||||
telesoftware_main | 1C22 | LD SP,$5BFA | Set stack pointer above temporary_stack. | |
1C25 | CALL buffers_in_screen | Position receive buffer and page display buffer in screen RAM. | ||
1C28 | LD DE,telesoftware_message | Copy telesoftware_message to header in new page display buffer. | ||
1C2B | CALL write_header_message | |||
1C2E | CALL telesoftware_number | Get page number from user. | ||
This entry point is used by the routine at display_message.
|
||||
start_download | 1C31 | XOR A | Set A to zero (black border). | |
page_loop | 1C32 | CALL border_flash | Flash border colour in A. | |
1C35 | CALL wait_for_page | Wait for page to load. | ||
1C38 | OR A | If page loaded jump to page_loaded. | ||
1C39 | JR Z,page_loaded | |||
1C3B | LD DE,break_message | Else if enter pressed set DE to break_message and jump to display_message. | ||
1C3E | CP $01 | |||
1C40 | JP Z,display_message | |||
1C43 | LD DE,no_page_message | Else page timed out, set DE to no_page_message and jump to display_message. | ||
1C46 | JP display_message | |||
page_loaded | 1C49 | CALL check_footer | Call check_footer. | |
1C4C | OR A | If return value is $00 jump to telesoftware_main_0. | ||
1C4D | JR Z,telesoftware_main_0 | |||
1C4F | LD DE,not_data_message | Else if $01 set DE to not_data_message and jump to display_message. | ||
1C52 | CP $01 | |||
1C54 | JP Z,display_message | |||
1C57 | LD DE,bad_page_message | Else if $02 set DE to bad_page_message and jump to display_message. | ||
1C5A | CP $02 | |||
1C5C | JP Z,display_message | |||
1C5F | LD A,$04 | Else set A to $04 (green) and jump back to page_loop. | ||
1C61 | JP page_loop | |||
telesoftware_main_0 | 1C64 | CALL check_page | Call check_page. | |
1C67 | OR A | If return value is $00 (ok) jump to telesoftware_main_1. | ||
1C68 | JR Z,telesoftware_main_1 | |||
1C6A | CP $01 | If return value is $01 (error) set A to $02 (red) and jump back to page_loop else set DE to bad_page_message and jump to display_message. | ||
1C6C | LD DE,bad_page_message | |||
1C6F | JP NZ,display_message | |||
1C72 | LD A,$02 | |||
1C74 | JP page_loop | |||
telesoftware_main_1 | 1C77 | CALL download_data | Call download_data. | |
1C7A | CALL block_downloaded | Call block_downloaded. | ||
1C7D | OR A | If return value is $00 set A to $07 (white) and jump back to page_loop else jump to download_complete. | ||
1C7E | JP NZ,download_complete | |||
1C81 | LD A,$07 | |||
1C83 | JP page_loop |
Prev: 1C1F | Up: Map | Next: 1C86 |