diff --git a/apps/telnet65.s b/apps/telnet65.s index a9415a2..b140acd 100644 --- a/apps/telnet65.s +++ b/apps/telnet65.s @@ -252,11 +252,11 @@ print_vt100: print_error: lda ip65_error - cmp #KPR_ERROR_ABORTED_BY_USER + cmp #IP65_ERROR_ABORTED_BY_USER bne :+ ldax #abort jmp print_ascii_as_native -: cmp #KPR_ERROR_TIMEOUT_ON_RECEIVE +: cmp #IP65_ERROR_TIMEOUT_ON_RECEIVE bne :+ ldax #timeout jmp print_ascii_as_native @@ -308,7 +308,7 @@ send_char: bcs :+ rts : lda ip65_error - cmp #KPR_ERROR_CONNECTION_CLOSED + cmp #IP65_ERROR_CONNECTION_CLOSED bne :+ lda #1 sta connection_closed diff --git a/inc/error.inc b/inc/error.inc index c74504f..1ce2436 100644 --- a/inc/error.inc +++ b/inc/error.inc @@ -1,15 +1,15 @@ -KPR_ERROR_PORT_IN_USE = $80 -KPR_ERROR_TIMEOUT_ON_RECEIVE = $81 -KPR_ERROR_TRANSMIT_FAILED = $82 -KPR_ERROR_TRANSMISSION_REJECTED_BY_PEER = $83 -KPR_ERROR_INPUT_TOO_LARGE = $84 -KPR_ERROR_DEVICE_FAILURE = $85 -KPR_ERROR_ABORTED_BY_USER = $86 -KPR_ERROR_LISTENER_NOT_AVAILABLE = $87 -KPR_ERROR_CONNECTION_RESET_BY_PEER = $89 -KPR_ERROR_CONNECTION_CLOSED = $8A -KPR_ERROR_MALFORMED_URL = $A0 -KPR_ERROR_DNS_LOOKUP_FAILED = $A1 +IP65_ERROR_PORT_IN_USE = $80 +IP65_ERROR_TIMEOUT_ON_RECEIVE = $81 +IP65_ERROR_TRANSMIT_FAILED = $82 +IP65_ERROR_TRANSMISSION_REJECTED_BY_PEER = $83 +IP65_ERROR_INPUT_TOO_LARGE = $84 +IP65_ERROR_DEVICE_FAILURE = $85 +IP65_ERROR_ABORTED_BY_USER = $86 +IP65_ERROR_LISTENER_NOT_AVAILABLE = $87 +IP65_ERROR_CONNECTION_RESET_BY_PEER = $89 +IP65_ERROR_CONNECTION_CLOSED = $8A +IP65_ERROR_MALFORMED_URL = $A0 +IP65_ERROR_DNS_LOOKUP_FAILED = $A1 diff --git a/ip65/dhcp.s b/ip65/dhcp.s index e88c751..3cacefa 100644 --- a/ip65/dhcp.s +++ b/ip65/dhcp.s @@ -150,7 +150,7 @@ dhcp_init: jsr ip65_process jsr check_for_abort_key bcc @no_abort - lda #KPR_ERROR_ABORTED_BY_USER + lda #IP65_ERROR_ABORTED_BY_USER sta ip65_error rts @no_abort: @@ -194,7 +194,7 @@ dhcp_init: rts @too_many_messages_sent: - lda #KPR_ERROR_TIMEOUT_ON_RECEIVE + lda #IP65_ERROR_TIMEOUT_ON_RECEIVE sta ip65_error jsr @bound ; to remove the listener (thanks to ShadowM for bug report) sec ; signal an error diff --git a/ip65/dns.s b/ip65/dns.s index 9285d73..8be942e 100644 --- a/ip65/dns.s +++ b/ip65/dns.s @@ -164,7 +164,7 @@ dns_set_hostname: rts @hostname_too_long: - lda #KPR_ERROR_INPUT_TOO_LARGE + lda #IP65_ERROR_INPUT_TOO_LARGE sta ip65_error sec rts @@ -212,7 +212,7 @@ dns_resolve: jsr ip65_process jsr check_for_abort_key bcc @no_abort - lda #KPR_ERROR_ABORTED_BY_USER + lda #IP65_ERROR_ABORTED_BY_USER sta ip65_error rts @no_abort: @@ -241,11 +241,11 @@ dns_resolve: jmp @dns_polling_loop @too_many_messages_sent: - lda #KPR_ERROR_TIMEOUT_ON_RECEIVE + lda #IP65_ERROR_TIMEOUT_ON_RECEIVE bne @error ; always @failed: - lda #KPR_ERROR_DNS_LOOKUP_FAILED + lda #IP65_ERROR_DNS_LOOKUP_FAILED @error: sta ip65_error sec ; signal an error @@ -282,7 +282,7 @@ send_dns_query: sta output_buffer+dns_qname,x inx bpl @hostname_still_ok - lda #KPR_ERROR_INPUT_TOO_LARGE + lda #IP65_ERROR_INPUT_TOO_LARGE sta ip65_error jmp @error_on_send ; if we got past 128 bytes, there's a problem @hostname_still_ok: diff --git a/ip65/httpd.s b/ip65/httpd.s index 854fffb..f4574d4 100644 --- a/ip65/httpd.s +++ b/ip65/httpd.s @@ -119,7 +119,7 @@ httpd_start: jsr ip65_process jsr check_for_abort_key bcc @no_abort - lda #KPR_ERROR_ABORTED_BY_USER + lda #IP65_ERROR_ABORTED_BY_USER sta ip65_error rts @no_abort: diff --git a/ip65/icmp.s b/ip65/icmp.s index 6358aa6..2bb75e3 100644 --- a/ip65/icmp.s +++ b/ip65/icmp.s @@ -368,7 +368,7 @@ icmp_ping: jsr icmp_send_echo bcc @message_sent_ok ; still can't send? then give up - lda #KPR_ERROR_TRANSMIT_FAILED + lda #IP65_ERROR_TRANSMIT_FAILED sta ip65_error rts @message_sent_ok: @@ -398,7 +398,7 @@ icmp_ping: jsr timer_timeout bcs @loop_till_get_ping_response - lda #KPR_ERROR_TIMEOUT_ON_RECEIVE + lda #IP65_ERROR_TIMEOUT_ON_RECEIVE sta ip65_error lda #icmp_msg_type_echo_reply jsr icmp_remove_listener diff --git a/ip65/ip65.s b/ip65/ip65.s index d5d1f62..22cc484 100644 --- a/ip65/ip65.s +++ b/ip65/ip65.s @@ -73,7 +73,7 @@ ip65_init: jsr eth_init ; initialize ethernet driver bcc @ok - lda #KPR_ERROR_DEVICE_FAILURE + lda #IP65_ERROR_DEVICE_FAILURE sta ip65_error rts @ok: diff --git a/ip65/sntp.s b/ip65/sntp.s index 7d291ac..b53efb2 100644 --- a/ip65/sntp.s +++ b/ip65/sntp.s @@ -93,7 +93,7 @@ sntp_get_time: jsr ip65_process jsr check_for_abort_key bcc @no_abort - lda #KPR_ERROR_ABORTED_BY_USER + lda #IP65_ERROR_ABORTED_BY_USER sta ip65_error rts @no_abort: @@ -127,7 +127,7 @@ sntp_get_time: @failed: ldax #sntp_client_port jsr udp_remove_listener - lda #KPR_ERROR_TIMEOUT_ON_RECEIVE + lda #IP65_ERROR_TIMEOUT_ON_RECEIVE sta ip65_error sec ; signal an error rts diff --git a/ip65/tcp.s b/ip65/tcp.s index 0bf8ed0..c8c8c48 100644 --- a/ip65/tcp.s +++ b/ip65/tcp.s @@ -173,7 +173,7 @@ tcp_listen: jsr ip65_process jsr check_for_abort_key bcc @no_abort - lda #KPR_ERROR_ABORTED_BY_USER + lda #IP65_ERROR_ABORTED_BY_USER sta ip65_error rts @no_abort: @@ -251,7 +251,7 @@ tcp_connect: jsr ip65_process jsr check_for_abort_key bcc @no_abort - lda #KPR_ERROR_ABORTED_BY_USER + lda #IP65_ERROR_ABORTED_BY_USER sta ip65_error rts @no_abort: @@ -276,7 +276,7 @@ tcp_connect: @failed: lda #tcp_cxn_state_closed sta tcp_state - lda #KPR_ERROR_TIMEOUT_ON_RECEIVE + lda #IP65_ERROR_TIMEOUT_ON_RECEIVE sta ip65_error sec ; signal an error rts @@ -360,7 +360,7 @@ tcp_close: @failed: lda #tcp_cxn_state_closed sta tcp_state - lda #KPR_ERROR_TIMEOUT_ON_RECEIVE + lda #IP65_ERROR_TIMEOUT_ON_RECEIVE sta ip65_error sec ; signal an error rts @@ -405,7 +405,7 @@ tcp_send: lda tcp_state cmp #tcp_cxn_state_established beq @connection_established - lda #KPR_ERROR_CONNECTION_CLOSED + lda #IP65_ERROR_CONNECTION_CLOSED sta ip65_error sec rts @@ -453,7 +453,7 @@ tcp_send: jsr ip65_process jsr check_for_abort_key bcc @no_abort - lda #KPR_ERROR_ABORTED_BY_USER + lda #IP65_ERROR_ABORTED_BY_USER sta ip65_error lda #tcp_cxn_state_closed sta tcp_state @@ -483,7 +483,7 @@ tcp_send: @failed: lda #tcp_cxn_state_closed sta tcp_state - lda #KPR_ERROR_TIMEOUT_ON_RECEIVE + lda #IP65_ERROR_TIMEOUT_ON_RECEIVE sta ip65_error sec ; signal an error rts @@ -681,7 +681,7 @@ tcp_process: ; connection has been reset so mark it as closed lda #tcp_cxn_state_closed sta tcp_state - lda #KPR_ERROR_CONNECTION_RESET_BY_PEER + lda #IP65_ERROR_CONNECTION_RESET_BY_PEER sta ip65_error lda #$ff diff --git a/ip65/tftp.s b/ip65/tftp.s index 413e986..2ca4854 100644 --- a/ip65/tftp.s +++ b/ip65/tftp.s @@ -159,7 +159,7 @@ set_tftp_opcode: jsr udp_add_listener bcc :+ ; bail if we couldn't listen on the port we want - lda #KPR_ERROR_PORT_IN_USE + lda #IP65_ERROR_PORT_IN_USE sta ip65_error rts : lda #TFTP_MAX_RESENDS @@ -211,7 +211,7 @@ set_tftp_opcode: jsr ip65_process jsr check_for_abort_key bcc @no_abort - lda #KPR_ERROR_ABORTED_BY_USER + lda #IP65_ERROR_ABORTED_BY_USER sta ip65_error jmp @exit_with_error @no_abort: @@ -225,7 +225,7 @@ set_tftp_opcode: dec tftp_resend_counter bne @outer_delay_loop - lda #KPR_ERROR_TIMEOUT_ON_RECEIVE + lda #IP65_ERROR_TIMEOUT_ON_RECEIVE sta ip65_error jmp @exit_with_error @@ -279,7 +279,7 @@ send_request_packet: sta tftp_state rts @error_in_send: - lda #KPR_ERROR_TRANSMIT_FAILED + lda #IP65_ERROR_TRANSMIT_FAILED sta ip65_error sec rts @@ -344,7 +344,7 @@ tftp_in: @recv_error: lda #tftp_error sta tftp_state - lda #KPR_ERROR_TRANSMISSION_REJECTED_BY_PEER + lda #IP65_ERROR_TRANSMISSION_REJECTED_BY_PEER sta ip65_error rts @not_an_error: diff --git a/ip65/udp.s b/ip65/udp.s index 217fa06..45ab9d2 100644 --- a/ip65/udp.s +++ b/ip65/udp.s @@ -180,7 +180,7 @@ udp_add_listener: @full: @busy: - lda #KPR_ERROR_LISTENER_NOT_AVAILABLE + lda #IP65_ERROR_LISTENER_NOT_AVAILABLE sta ip65_error sec rts diff --git a/ip65/url.s b/ip65/url.s index 83f6dd5..1f8aada 100644 --- a/ip65/url.s +++ b/ip65/url.s @@ -103,7 +103,7 @@ url_parse: cmp #'H' beq @http @exit_with_error: - lda #KPR_ERROR_MALFORMED_URL + lda #IP65_ERROR_MALFORMED_URL sta ip65_error @exit_with_sec: sec @@ -128,7 +128,7 @@ lda #url_type_gopher bcs @exit_with_sec jsr dns_resolve bcc :+ - lda #KPR_ERROR_DNS_LOOKUP_FAILED + lda #IP65_ERROR_DNS_LOOKUP_FAILED sta ip65_error jmp @exit_with_sec : ; copy IP address