mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-07-28 03:28:54 +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
f0960e514a
commit
ecca9f8b0e
@ -1,8 +1,22 @@
|
|||||||
.export get_key
|
.export get_key
|
||||||
|
.export check_for_abort_key
|
||||||
.code
|
.code
|
||||||
;use Apple 2 monitor ROM function to read from keyboard
|
;use Apple 2 monitor ROM function to read from keyboard
|
||||||
;inputs: none
|
;inputs: none
|
||||||
;outputs: A contains ASCII code of key pressed
|
;outputs: A contains ASCII code of key pressed
|
||||||
get_key:
|
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_text
|
||||||
.export filter_ip
|
.export filter_ip
|
||||||
.export filter_dns
|
.export filter_dns
|
||||||
|
.export check_for_abort_key
|
||||||
|
|
||||||
.importzp copy_src
|
.importzp copy_src
|
||||||
|
|
||||||
.include "../inc/common.i"
|
.include "../inc/common.i"
|
||||||
@ -18,6 +20,18 @@ get_key:
|
|||||||
beq get_key
|
beq get_key
|
||||||
rts
|
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
|
;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_TRANSMISSION_REJECTED_BY_PEER EQU $83
|
||||||
NB65_ERROR_INPUT_TOO_LARGE EQU $84
|
NB65_ERROR_INPUT_TOO_LARGE EQU $84
|
||||||
NB65_ERROR_DEVICE_FAILURE EQU $85
|
NB65_ERROR_DEVICE_FAILURE EQU $85
|
||||||
|
NB65_ERROR_ABORTED_BY_USER EQU $86
|
||||||
NB65_ERROR_OPTION_NOT_SUPPORTED EQU $FE
|
NB65_ERROR_OPTION_NOT_SUPPORTED EQU $FE
|
||||||
NB65_ERROR_FUNCTION_NOT_SUPPORTED EQU $FF
|
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_src_port
|
||||||
.import udp_send_dest_port
|
.import udp_send_dest_port
|
||||||
.import udp_send_len
|
.import udp_send_len
|
||||||
|
.import check_for_abort_key
|
||||||
.import timer_read
|
.import timer_read
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
@ -157,6 +157,12 @@ dhcp_init:
|
|||||||
|
|
||||||
@inner_delay_loop:
|
@inner_delay_loop:
|
||||||
jsr ip65_process
|
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
|
lda #0
|
||||||
cmp dhcp_break_polling_loop
|
cmp dhcp_break_polling_loop
|
||||||
bne @break_polling_loop
|
bne @break_polling_loop
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
.import udp_send_src_port
|
.import udp_send_src_port
|
||||||
.import udp_send_dest_port
|
.import udp_send_dest_port
|
||||||
.import udp_send_len
|
.import udp_send_len
|
||||||
|
.import check_for_abort_key
|
||||||
.import timer_read
|
.import timer_read
|
||||||
|
|
||||||
.segment "IP65ZP" : zeropage
|
.segment "IP65ZP" : zeropage
|
||||||
@ -219,6 +219,13 @@ dns_resolve:
|
|||||||
|
|
||||||
@inner_delay_loop:
|
@inner_delay_loop:
|
||||||
jsr ip65_process
|
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
|
lda dns_state
|
||||||
cmp #dns_complete
|
cmp #dns_complete
|
||||||
beq @complete
|
beq @complete
|
||||||
|
@ -182,7 +182,6 @@ main_menu:
|
|||||||
cmp #KEYCODE_F7
|
cmp #KEYCODE_F7
|
||||||
beq @change_config
|
beq @change_config
|
||||||
|
|
||||||
jsr print_hex
|
|
||||||
jmp @get_key
|
jmp @get_key
|
||||||
|
|
||||||
@exit_to_basic:
|
@exit_to_basic:
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user