git-svn-id: http://svn.code.sf.net/p/netboot65/code@292 93682198-c243-4bdb-bd91-e943c89aac3b

This commit is contained in:
jonnosan 2010-12-27 00:21:11 +00:00
parent 1dfbd2ea37
commit 963685e9d1
5 changed files with 58 additions and 53 deletions

Binary file not shown.

Binary file not shown.

View File

@ -73,12 +73,12 @@ crunched_line = $0200 ;Input buffer
.import print_a .import print_a
.import print_cr .import print_cr
.import cfg_mac .import cfg_mac
.import cfg_mac_default
.import eth_driver_name .import eth_driver_name
.import get_key_if_available .import get_key_if_available
.import timer_read .import timer_read
.import native_to_ascii .import native_to_ascii
.import ascii_to_native .import ascii_to_native
.import eth_init
.import http_parse_request .import http_parse_request
.import http_get_value .import http_get_value
@ -114,6 +114,10 @@ pptr=temp_ptr
.word init ;cold start vector .word init ;cold start vector
.word $FE47 ;warm start vector .word $FE47 ;warm start vector
.byte $C3,$C2,$CD,$38,$30 ; "CBM80" .byte $C3,$C2,$CD,$38,$30 ; "CBM80"
.byte "KIPBOB"
.byte $0,$0,$0 ;reserved for future use
.byte $0,$0,$0 ;reserved for future use
.byte $0,$0,$0 ;reserved for future use
.code .code
@ -135,9 +139,11 @@ init:
;make some room for extra RAM ;make some room for extra RAM
ldax #$6000 ldax #$5800
stax MEMSIZ stax MEMSIZ
stax http_variables_buffer
ldax #welcome_banner ldax #welcome_banner
jsr print jsr print
lda #$90 ;'rest of banner lda #$90 ;'rest of banner
@ -754,6 +760,7 @@ ping_keyword:
@done: @done:
jmp print_cr jmp print_cr
@error: @error:
jsr print_error
lda #'!' lda #'!'
jmp @print_and_loop jmp @print_and_loop
@ -775,10 +782,10 @@ mac_keyword:
ldy #2 ldy #2
: :
lda transfer_buffer,y lda transfer_buffer,y
sta cfg_mac_default+3,y sta cfg_mac+3,y
dey dey
bpl:- bpl:-
jsr ip65_init jsr eth_init
rts rts
@ -1011,7 +1018,7 @@ got_http_request:
; none ; none
;outputs: ;outputs:
; none ; none
httpd_start: httpd_start:
ldx top_of_stack ldx top_of_stack
txs txs
ldax #listening ldax #listening
@ -1162,6 +1169,7 @@ http_callback:
cmp #$0d cmp #$0d
bne @not_eol bne @not_eol
@found_eol: @found_eol:
inc found_eol inc found_eol
rts rts
@not_eol: @not_eol:
@ -1502,12 +1510,14 @@ connection_from: .byte "CONNECTION FROM ",0
; All tokens are >$80, ; All tokens are >$80,
; so they easily mark the end of the keyword ; so they easily mark the end of the keyword
keywords: keywords:
.byte "IF",$E0 ;our dummy 'IF' entry takes $E0 .byte "IF",$E0 ;our dummy 'IF' entry takes $E0
.byte "IPCFG",$E1 .byte "IPCFG",$E1
.byte "PING",$E3 .byte "DHCP",$E2 ;DUMMY!
.byte "PING",$E3
.byte "MYIP",$E4 .byte "MYIP",$E4
.byte "NETMASK",$E5 .byte "NETMASK",$E5
.byte "GATEWAY",$E6 .byte "GATEWAY",$E6
.byte "DNS",$E7 ;DUMMY!
.byte "HOOK",$E8 .byte "HOOK",$E8
.byte "YIELD",$E9 .byte "YIELD",$E9
.byte "XS",$80,$EA ;BASIC will replace 'END' with $80 .byte "XS",$80,$EA ;BASIC will replace 'END' with $80
@ -1573,39 +1583,9 @@ hook_table:
hooks: .byte 0 hooks: .byte 0
error_handling_mode: .byte 0 error_handling_mode: .byte 0
connection_timeout_seconds: .byte 0
.bss
string_length: .res 1
param_length: .res 1
tmp_length: .res 1
temp_bin: .res 1
temp_bcd: .res 2
ping_counter: .res 1
http_buffer: .res 256
string_buffer: .res 128
transfer_buffer: .res 256
handler_address: .res 2
hash: .res 1
string_ptr: .res 1
default_line_number: .res 2
found_eol: .byte 0 found_eol: .byte 0
connection_closed: .byte 0 connection_closed: .byte 0
output_buffer_length: .res 2
connection_timeout_seconds: .byte 0
tcp_buffer_ptr: .res 2
buffer_size: .res 1
temp_x: .res 1
sent_header: .res 1
tmp_a: .res 1
error_buffer: .res 80
top_of_stack: .res 1
.segment "TCP_VARS"
__httpd_io_buffer: .res 1024 ;temp buffer for storing inbound requests.
content_type_buffer: .res 128
status_code_buffer: .res 128
.segment "HTTP_VARS"
httpd_io_buffer: .word __httpd_io_buffer httpd_io_buffer: .word __httpd_io_buffer
httpd_port_number: .word 80 httpd_port_number: .word 80
@ -1640,6 +1620,36 @@ xmit_a_ptr:
: :
rts rts
.bss
string_length: .res 1
param_length: .res 1
tmp_length: .res 1
temp_bin: .res 1
temp_bcd: .res 2
ping_counter: .res 1
http_buffer: .res 256
string_buffer: .res 128
transfer_buffer: .res 256
handler_address: .res 2
hash: .res 1
string_ptr: .res 1
default_line_number: .res 2
output_buffer_length: .res 2
tcp_buffer_ptr: .res 2
buffer_size: .res 1
temp_x: .res 1
sent_header: .res 1
tmp_a: .res 1
error_buffer: .res 80
top_of_stack: .res 1
.segment "TCP_VARS"
__httpd_io_buffer: .res 1024 ;temp buffer for storing inbound requests.
content_type_buffer: .res 128
status_code_buffer: .res 128
;-- LICENSE FOR bails.s -- ;-- LICENSE FOR bails.s --
; The contents of this file are subject to the Mozilla Public License ; The contents of this file are subject to the Mozilla Public License

View File

@ -3,9 +3,9 @@
MEMORY { MEMORY {
IP65ZP: start = $A3, size = $0E, type = rw, define = yes; IP65ZP: start = $A3, size = $0E, type = rw, define = yes;
HEADER: start = $8000, size = $09, file = %O; HEADER: start = $8000, size = $18, file = %O;
DEFAULTS: start = $8009, size = $1F, file = %O; DEFAULTS: start = $8018, size = $1F, file = %O;
ROM: start = $8028, size = $1FC9, define = yes, file = %O; ROM: start = $8037, size = $1FC9, define = yes, file = %O;
RAM: start = $C010, size = $0fE0, define = yes; RAM: start = $C010, size = $0fE0, define = yes;
RAM2: start = $0334, size = $CB, define = yes; #extra scratch area - Tape I/O buffer RAM2: start = $0334, size = $CB, define = yes; #extra scratch area - Tape I/O buffer
RAM3: start = $0200, size = $58, define = yes; #extra scratch area - Tape I/O buffer RAM3: start = $0200, size = $58, define = yes; #extra scratch area - Tape I/O buffer
@ -16,17 +16,12 @@ MEMORY {
SEGMENTS { SEGMENTS {
CARTRIDGE_HEADER: load = HEADER, type = ro; CARTRIDGE_HEADER: load = HEADER, type = ro;
IP65_DEFAULTS: load = DEFAULTS, type = ro; IP65_DEFAULTS: load = DEFAULTS, type = ro;
CODE: load = ROM, type = ro; CODE: load = ROM, type = ro;
RODATA: load = ROM, run=ROM, type = ro; RODATA: load = ROM, run=ROM, type = ro;
DATA: load = ROM, run = RAM, type = rw, define = yes; DATA: load = ROM, run = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss;
BSS: load = RAM, type = bss; IP65ZP: load = IP65ZP, type = zp;
SELF_MODIFIED_CODE: load = ROM, run = RAM2, type = rw, define = yes;
IP65ZP: load = IP65ZP, type = zp;
SELF_MODIFIED_CODE: load = ROM, run = RAM2, type = rw, define = yes;
APP_SCRATCH: load = RAM4, type = bss; APP_SCRATCH: load = RAM4, type = bss;
TCP_VARS: load = RAM4, type = bss; TCP_VARS: load = RAM4, type = bss;
HTTP_VARS: load=ROM, run = RAM3, type = rw,define = yes; HTTP_VARS: load=ROM, run = RAM3, type = rw,define = yes;

View File

@ -192,7 +192,7 @@ tcp_listen:
lda #tcp_cxn_state_listening lda #tcp_cxn_state_listening
cmp tcp_state cmp tcp_state
beq @listen_loop beq @listen_loop
jmp tcp_connection_established jmp tcp_connection_established
rts rts