From ce9a6076ad8eb942a92169d71e885b6af281169c Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Mon, 28 Apr 2014 18:34:56 +0200
Subject: [PATCH] Fixed recently introduced addressing mode bugs.
---
ip65/http.s | 4 ++--
ip65/httpd.s | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/ip65/http.s b/ip65/http.s
index fabc785..4045b61 100644
--- a/ip65/http.s
+++ b/ip65/http.s
@@ -49,7 +49,7 @@ hex_digit: .res 1
http_parse_request:
stax string_ptr
- ldax var_buf
+ ldax #var_buf
stax table_ptr
lda #1 ; start of method
@@ -186,7 +186,7 @@ put_byte:
; if variable did not exist, carry flag will be set.
http_get_value:
sta var_name
- ldax var_buf
+ ldax #var_buf
stax string_ptr
ldy #0
diff --git a/ip65/httpd.s b/ip65/httpd.s
index 966e3d7..d84b6ab 100644
--- a/ip65/httpd.s
+++ b/ip65/httpd.s
@@ -104,7 +104,7 @@ httpd_start:
@listen:
jsr tcp_close
- ldax io_buf
+ ldax #io_buf
stax tcp_buffer_ptr
ldax #http_callback
stax tcp_callback
@@ -151,7 +151,7 @@ httpd_start:
jmp @listen
@got_eol:
- ldax io_buf
+ ldax #io_buf
jsr http_parse_request
jsr jump_to_callback ; call the handler to generate the response for this request.
; AX should now point at data to be sent
@@ -197,7 +197,7 @@ http_callback:
; look for CR or LF in input
sta found_eol
- ldax io_buf
+ ldax #io_buf
stax get_next_byte+1
@look_for_eol:
@@ -215,7 +215,7 @@ http_callback:
rts
reset_output_buffer:
- ldax io_buf
+ ldax #io_buf
sta emit_a_ptr+1
stx emit_a_ptr+2
lda #0
@@ -310,7 +310,7 @@ send_response:
send_buffer:
ldax output_buffer_length
stax tcp_send_data_len
- ldax io_buf
+ ldax #io_buf
jsr tcp_send
jmp reset_output_buffer