mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-08 21:54:28 +00:00
git-svn-id: http://svn.code.sf.net/p/netboot65/code@105 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
1af0b15eaf
commit
62c9182c9e
@ -1,8 +1,22 @@
|
||||
.export get_key
|
||||
|
||||
.export check_for_abort_key
|
||||
.code
|
||||
;use Apple 2 monitor ROM function to read from keyboard
|
||||
;inputs: none
|
||||
;outputs: A contains ASCII code of key pressed
|
||||
get_key:
|
||||
jmp $fd1b
|
||||
jmp $fd1b
|
||||
|
||||
|
||||
;check whether the escape key is being pressed
|
||||
;inputs: none
|
||||
;outputs: sec if escape pressed, clear otherwise
|
||||
check_for_abort_key:
|
||||
lda $c000 ;current key pressed
|
||||
cmp #$9B
|
||||
bne :+
|
||||
sec
|
||||
rts
|
||||
:
|
||||
clc
|
||||
rts
|
||||
|
@ -3,6 +3,8 @@
|
||||
.export filter_text
|
||||
.export filter_ip
|
||||
.export filter_dns
|
||||
.export check_for_abort_key
|
||||
|
||||
.importzp copy_src
|
||||
|
||||
.include "../inc/common.i"
|
||||
@ -18,6 +20,18 @@ get_key:
|
||||
beq get_key
|
||||
rts
|
||||
|
||||
;check whether the RUN/STOP key is being pressed
|
||||
;inputs: none
|
||||
;outputs: sec if RUN/STOP pressed, clear otherwise
|
||||
check_for_abort_key:
|
||||
lda $cb ;current key pressed
|
||||
cmp #$3F
|
||||
bne :+
|
||||
sec
|
||||
rts
|
||||
:
|
||||
clc
|
||||
rts
|
||||
|
||||
;cribbed from http://codebase64.org/doku.php?id=base:robust_string_input
|
||||
;======================================================================
|
||||
|
@ -80,5 +80,6 @@ NB65_ERROR_TRANSMIT_FAILED EQU $82
|
||||
NB65_ERROR_TRANSMISSION_REJECTED_BY_PEER EQU $83
|
||||
NB65_ERROR_INPUT_TOO_LARGE EQU $84
|
||||
NB65_ERROR_DEVICE_FAILURE EQU $85
|
||||
NB65_ERROR_ABORTED_BY_USER EQU $86
|
||||
NB65_ERROR_OPTION_NOT_SUPPORTED EQU $FE
|
||||
NB65_ERROR_FUNCTION_NOT_SUPPORTED EQU $FF
|
||||
|
@ -46,7 +46,7 @@ MAX_DHCP_MESSAGES_SENT=12 ;timeout after sending 12 messages will be about 1
|
||||
.import udp_send_src_port
|
||||
.import udp_send_dest_port
|
||||
.import udp_send_len
|
||||
|
||||
.import check_for_abort_key
|
||||
.import timer_read
|
||||
|
||||
.bss
|
||||
@ -157,6 +157,12 @@ dhcp_init:
|
||||
|
||||
@inner_delay_loop:
|
||||
jsr ip65_process
|
||||
jsr check_for_abort_key
|
||||
bcc @no_abort
|
||||
lda #NB65_ERROR_ABORTED_BY_USER
|
||||
sta ip65_error
|
||||
rts
|
||||
@no_abort:
|
||||
lda #0
|
||||
cmp dhcp_break_polling_loop
|
||||
bne @break_polling_loop
|
||||
|
@ -34,7 +34,7 @@
|
||||
.import udp_send_src_port
|
||||
.import udp_send_dest_port
|
||||
.import udp_send_len
|
||||
|
||||
.import check_for_abort_key
|
||||
.import timer_read
|
||||
|
||||
.segment "IP65ZP" : zeropage
|
||||
@ -219,6 +219,13 @@ dns_resolve:
|
||||
|
||||
@inner_delay_loop:
|
||||
jsr ip65_process
|
||||
jsr check_for_abort_key
|
||||
bcc @no_abort
|
||||
lda #NB65_ERROR_ABORTED_BY_USER
|
||||
sta ip65_error
|
||||
rts
|
||||
@no_abort:
|
||||
|
||||
lda dns_state
|
||||
cmp #dns_complete
|
||||
beq @complete
|
||||
|
@ -182,7 +182,6 @@ main_menu:
|
||||
cmp #KEYCODE_F7
|
||||
beq @change_config
|
||||
|
||||
jsr print_hex
|
||||
jmp @get_key
|
||||
|
||||
@exit_to_basic:
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user