mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-01-15 20:29:53 +00:00
Simplified test program sources by using exe headers from cc65 libs.
This commit is contained in:
parent
7ce0ff2023
commit
eb17e5b758
@ -1,25 +1,26 @@
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __BSS_RUN__ - __STARTUP_RUN__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: start = $00, size = $08, type = rw, define = yes; #zero size as we hand allocate all ZP locations
|
||||
IP65ZP: start = $E0, size = $0, type = rw, define = yes; #zero size as we hand allocate all ZP locations
|
||||
HEADER: start = $0000, size = $10, file = %O;
|
||||
RAM: start = $803, size = $8000, file = %O, define=yes;
|
||||
PAGE3: start = $2C0, size = 272;
|
||||
ZP: start = $00, size = $08;
|
||||
IP65ZP: start = $E0, size = $00; #zero size as we hand allocate all ZP locations
|
||||
HEADER: start = $0800, size = $04, file = %O;
|
||||
RAM: start = $0803, size = $77FC, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM,run=RAM, type = ro, define = yes, optional=yes;
|
||||
CODE: load = RAM, run=RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, run=RAM, type = ro , define = yes;
|
||||
IP65_DEFAULTS: load = RAM, run=RAM, type = ro , define = yes;
|
||||
DATA: load = RAM, run=RAM, type = rw , define = yes;
|
||||
PAGE3: load = RAM,run=PAGE3, type = rw, define = yes, optional=yes;
|
||||
HTTP_VARS: load = RAM, run=RAM, type = rw, optional=yes;
|
||||
TCP_VARS: load = RAM, type = bss, optional=yes;
|
||||
APP_SCRATCH: load = RAM, type = bss , optional=yes;
|
||||
BSS: load=RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp , optional=yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
IP65ZP: load = IP65ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
SELF_MODIFIED_CODE: load = RAM, type = rw, optional = yes;
|
||||
IP65_DEFAULTS: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
APP_SCRATCH: load = RAM, type = bss, optional = yes;
|
||||
TCP_VARS: load = RAM, type = bss, optional = yes;
|
||||
HTTP_VARS: load = RAM, type = bss, optional = yes;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,29 +1,27 @@
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
__EXEHDR__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw ;
|
||||
IP65ZP: start = $5f, size = $10, type = rw;
|
||||
RAM: start = $07FF, size = $77ab, file = %O;
|
||||
RAM3000: start = $3000, size = $4800, type=rw;
|
||||
RAM4000: start = $4000, size = $3800, type=rw;
|
||||
RAM6000: start = $6000, size = $1800, type=rw;
|
||||
DISCARD: start = $77FF, size = $10;
|
||||
ZP: start = $02, size = $1A;
|
||||
IP65ZP: start = $5F, size = $10;
|
||||
LOADADDR: start = $07FF, size = $02, file = %O;
|
||||
HEADER: start = $0801, size = $0C, file = %O;
|
||||
RAM: start = $080D, size = $77F3, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
STARTUP: load = RAM, type = ro ,define = yes, optional=yes;
|
||||
CODE: load = RAM, type = ro,define = yes;
|
||||
DATA: load = RAM, type = rw,define = yes;
|
||||
SELF_MODIFIED_CODE: load = RAM, type = rw,define = yes, optional=yes;
|
||||
VIC_DATA: load = RAM, type = rw,align = $800, optional=yes;
|
||||
RODATA: load = RAM, type = ro,define = yes, optional=yes;
|
||||
IP65_DEFAULTS: load = RAM, type = rw,define = yes, optional=yes;
|
||||
BSS: load = RAM, type = bss, optional=yes;
|
||||
SAFE_BSS: load = RAM3000, type = bss, optional=yes;
|
||||
BSS4K: load = RAM4000, type = bss, optional=yes;
|
||||
DATA6K: load = RAM, run = RAM6000, type = rw, define = yes, optional=yes;
|
||||
APP_SCRATCH: load = RAM, type = bss, optional=yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional=yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
IP65ZP: load = IP65ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = DISCARD, type = ro, optional=yes;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro, optional = yes;
|
||||
DATA: load = RAM, type = rw;
|
||||
SELF_MODIFIED_CODE: load = RAM, type = rw, optional = yes;
|
||||
IP65_DEFAULTS: load = RAM, type = rw, optional = yes;
|
||||
BSS: load = RAM, type = bss;
|
||||
APP_SCRATCH: load = RAM, type = bss, optional = yes;
|
||||
TCP_VARS: load = RAM, type = bss, optional = yes;
|
||||
HTTP_VARS: load = RAM, type = bss, optional = yes;
|
||||
|
||||
}
|
||||
|
@ -26,26 +26,30 @@ prg: \
|
||||
cifs_tcp.prg \
|
||||
dns.prg \
|
||||
dottedquad.prg \
|
||||
getc.prg \
|
||||
geturl_tcp.prg \
|
||||
httpd.prg \
|
||||
parsequerystring.prg \
|
||||
parser_tcp.prg \
|
||||
ping_tcp.prg \
|
||||
sntp.prg \
|
||||
tcp_tcp.prg \
|
||||
tftp.prg \
|
||||
vic20.prg \
|
||||
# vic20.prg \
|
||||
wiznet.prg
|
||||
|
||||
bin: \
|
||||
ip65 \
|
||||
drivers \
|
||||
cifs_tcp.bin \
|
||||
dns.bin \
|
||||
dottedquad.bin \
|
||||
lancegs.bin \
|
||||
geturl_tcp.bin \
|
||||
parsequerystring.bin \
|
||||
parser_tcp.bin \
|
||||
ping_tcp.bin \
|
||||
sntp.bin \
|
||||
tcp_tcp.bin \
|
||||
tftp.bin
|
||||
tftp.bin \
|
||||
# lancegs.bin
|
||||
|
||||
ip65:
|
||||
make -C ../ip65 all
|
||||
@ -61,16 +65,16 @@ dsk: ip65.dsk
|
||||
$(AS) $(AFLAGS) $<
|
||||
|
||||
%.prg: %.o $(IP65LIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||
$(LD) -o $*.prg -C ../cfg/c64prg.cfg -m $*.c64.map -vm $< $(IP65LIB) $(C64RRNETLIB)
|
||||
$(LD) -o $*.prg -C ../cfg/c64prg.cfg -m $*.c64.map -vm $< $(IP65LIB) $(C64RRNETLIB) c64.lib
|
||||
|
||||
%_tcp.prg: %.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||
$(LD) -o $(subst _tcp,,$*).prg -C ../cfg/c64prg.cfg -m $(subst _tcp,,$*).c64.map -vm $< $(IP65TCPLIB) $(C64RRNETLIB)
|
||||
$(LD) -o $(subst _tcp,,$*).prg -C ../cfg/c64prg.cfg -m $(subst _tcp,,$*).c64.map -vm $< $(IP65TCPLIB) $(C64RRNETLIB) c64.lib
|
||||
|
||||
%.bin: %.o $(IP65LIB) $(A2UTHERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||
$(LD) -o $*.bin -C ../cfg/a2bin.cfg -m $*.a2.map -vm $< $(IP65LIB) $(A2UTHERLIB)
|
||||
$(LD) -o $*.bin -C ../cfg/a2bin.cfg -m $*.a2.map -vm $< $(IP65LIB) $(A2UTHERLIB) apple2.lib
|
||||
|
||||
%_tcp.bin: %.o $(IP65TCPLIB) $(A2UTHERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||
$(LD) -o $(subst _tcp,,$*).bin -C ../cfg/a2bin.cfg -m $(subst _tcp,,$*).a2.map -vm $< $(IP65TCPLIB) $(A2UTHERLIB)
|
||||
$(LD) -o $(subst _tcp,,$*).bin -C ../cfg/a2bin.cfg -m $(subst _tcp,,$*).a2.map -vm $< $(IP65TCPLIB) $(A2UTHERLIB) apple2.lib
|
||||
|
||||
wiznet.prg: wiznet.o $(IP65WIZNETLIB) $(C64WIZNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||
$(LD) -o wiznet.prg -C ../cfg/c64prg.cfg -m wiznet.map -vm $< $(IP65WIZNETLIB) $(C64WIZNETLIB)
|
||||
@ -96,6 +100,10 @@ ip65.dsk: bin
|
||||
cp prodos.dsk $@
|
||||
java -jar $(AC) -cc65 $@ dns bin 0 < dns.bin
|
||||
java -jar $(AC) -cc65 $@ dottedquad bin 0 < dottedquad.bin
|
||||
java -jar $(AC) -cc65 $@ geturl bin 0 < geturl.bin
|
||||
java -jar $(AC) -cc65 $@ parser bin 0 < parser.bin
|
||||
java -jar $(AC) -cc65 $@ ping bin 0 < ping.bin
|
||||
java -jar $(AC) -cc65 $@ sntp bin 0 < sntp.bin
|
||||
java -jar $(AC) -cc65 $@ tcp bin 0 < tcp.bin
|
||||
java -jar $(AC) -cc65 $@ tftp bin 0 < tftp.bin
|
||||
|
||||
|
29
test/cifs.s
29
test/cifs.s
@ -9,37 +9,10 @@
|
||||
.import cifs_l1_decode
|
||||
.import cifs_start
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
.import __DATA_SIZE__
|
||||
.import __IP65_DEFAULTS_SIZE__
|
||||
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
.segment "EXEHDR" ;this is what gets put an the start of the file on the Apple 2
|
||||
.addr __CODE_LOAD__-$11 ; Start address
|
||||
.word __CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__+__IP65_DEFAULTS_SIZE__+4 ; Size
|
||||
jmp init
|
||||
|
||||
.code
|
||||
|
||||
init:
|
||||
lda #$0E ;change to lower case
|
||||
jsr print_a
|
||||
jsr print_cr
|
||||
@ -69,7 +42,6 @@ init:
|
||||
jsr cifs_start
|
||||
jmp exit_to_basic
|
||||
|
||||
|
||||
do_encoding_test:
|
||||
stax hostname_ptr
|
||||
jsr print
|
||||
@ -91,7 +63,6 @@ do_encoding_test:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
.rodata
|
||||
|
||||
|
||||
|
30
test/dns.s
30
test/dns.s
@ -11,36 +11,8 @@
|
||||
.import cfg_get_configuration_ptr
|
||||
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
.import __DATA_SIZE__
|
||||
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
.segment "EXEHDR" ;this is what gets put an the start of the file on the Apple 2
|
||||
.addr __CODE_LOAD__-$11 ; Start address
|
||||
.word __CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__+4 ; Size
|
||||
jmp init
|
||||
|
||||
.code
|
||||
|
||||
init:
|
||||
|
||||
;switch to lower case charset
|
||||
lda #23
|
||||
@ -72,7 +44,6 @@ init:
|
||||
|
||||
jmp exit_to_basic
|
||||
|
||||
|
||||
do_dns_query:
|
||||
pha
|
||||
jsr print
|
||||
@ -111,7 +82,6 @@ overwrite_with_hardcoded_dns_server:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
.rodata
|
||||
|
||||
|
||||
|
@ -7,36 +7,9 @@
|
||||
.import parse_dotted_quad
|
||||
.import dotted_quad_value
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
.import __DATA_SIZE__
|
||||
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
.segment "EXEHDR" ;this is what gets put an the start of the file on the Apple 2
|
||||
.addr __CODE_LOAD__-$11 ; Start address
|
||||
.word __CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__+4 ; Size
|
||||
jmp init
|
||||
|
||||
.code
|
||||
|
||||
init:
|
||||
|
||||
;switch to lower case charset
|
||||
lda #23
|
||||
@ -88,9 +61,13 @@ test_dotted_quad_string:
|
||||
jsr print_cr
|
||||
rts
|
||||
|
||||
|
||||
.bss
|
||||
|
||||
|
||||
temp_ax: .res 2
|
||||
|
||||
|
||||
.rodata
|
||||
|
||||
|
||||
@ -117,7 +94,6 @@ dotted_quad_7:
|
||||
|
||||
|
||||
|
||||
|
||||
;-- LICENSE FOR testdottedquad.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
|
196
test/getc.s
196
test/getc.s
@ -1,196 +0,0 @@
|
||||
|
||||
.ifndef KIPPER_API_VERSION_NUMBER
|
||||
.define EQU =
|
||||
.include "../inc/kipper_constants.i"
|
||||
.endif
|
||||
|
||||
.include "../inc/common.i"
|
||||
.include "../inc/commonprint.i"
|
||||
.import print_a
|
||||
.import cfg_get_configuration_ptr
|
||||
.import io_device_no
|
||||
.import io_sector_no
|
||||
.import io_track_no
|
||||
.import io_read_sector
|
||||
.import io_write_sector
|
||||
|
||||
.import io_read_file_with_callback
|
||||
.import io_read_file
|
||||
.import io_filename
|
||||
.import io_filesize
|
||||
.import io_load_address
|
||||
.import io_callback
|
||||
.import get_key
|
||||
.import ip65_error
|
||||
.import ip65_process
|
||||
.import io_read_catalogue_ex
|
||||
|
||||
.macro cout arg
|
||||
lda arg
|
||||
jsr print_a
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
.bss
|
||||
sector_buffer: .res 256
|
||||
output_buffer: .res 520
|
||||
.export output_buffer
|
||||
current_byte_in_row: .res 1
|
||||
current_byte_in_sector: .res 1
|
||||
start_of_current_row: .res 1
|
||||
|
||||
directory_buffer: .res 4096
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
init:
|
||||
lda #14
|
||||
jsr print_a ;switch to lower case
|
||||
lda $dc08 ;read deci-seconds - start clock ticking
|
||||
sta $dc08
|
||||
jsr load_buffer
|
||||
@loop:
|
||||
lda #5 ;timeout period
|
||||
jsr getc
|
||||
bcs @done
|
||||
jsr print_a
|
||||
jmp @loop
|
||||
@done:
|
||||
rts
|
||||
|
||||
load_buffer:
|
||||
ldax #buffer
|
||||
stax next_char_ptr
|
||||
ldax #buffer_length
|
||||
stax buff_length
|
||||
rts
|
||||
|
||||
|
||||
getc:
|
||||
sta getc_timeout_seconds
|
||||
|
||||
clc
|
||||
lda $dc09 ;time of day clock: seconds (in BCD)
|
||||
sed
|
||||
adc getc_timeout_seconds
|
||||
cmp #$60
|
||||
bcc @timeout_set
|
||||
sec
|
||||
sbc #$60
|
||||
@timeout_set:
|
||||
cld
|
||||
sta getc_timeout_end
|
||||
|
||||
@poll_loop:
|
||||
jsr ip65_process
|
||||
jsr next_char
|
||||
bcs @no_char
|
||||
rts ;done!
|
||||
@no_char:
|
||||
lda $dc09 ;time of day clock: seconds
|
||||
cmp getc_timeout_end
|
||||
bne @poll_loop
|
||||
sec
|
||||
rts
|
||||
|
||||
next_char:
|
||||
lda buff_length
|
||||
bne @not_eof
|
||||
lda buff_length+1
|
||||
bne @not_eof
|
||||
sec
|
||||
rts
|
||||
@not_eof:
|
||||
next_char_ptr=*+1
|
||||
lda $ffff
|
||||
pha
|
||||
inc next_char_ptr
|
||||
bne :+
|
||||
inc next_char_ptr+1
|
||||
:
|
||||
sec
|
||||
lda buff_length
|
||||
sbc #1
|
||||
sta buff_length
|
||||
lda buff_length+1
|
||||
sbc #0
|
||||
sta buff_length+1
|
||||
pla
|
||||
clc
|
||||
|
||||
rts
|
||||
|
||||
.rodata
|
||||
buffer:
|
||||
.byte "this is a test1!",13
|
||||
.byte "this is a test2!",13
|
||||
.byte "this is a test3!",13
|
||||
.byte "this is a test4!",13
|
||||
.byte "this is a test5!",13
|
||||
.byte "this is a test6!",13
|
||||
.byte "this is a test7!",13
|
||||
.byte "this is a test8!",13
|
||||
.byte "this is a test9!",13
|
||||
.byte "this is a test10!",13
|
||||
.byte "this is a test1@",13
|
||||
.byte "this is a test2@",13
|
||||
.byte "this is a test3@",13
|
||||
.byte "this is a test4@",13
|
||||
.byte "this is a test5@",13
|
||||
.byte "this is a test6@",13
|
||||
.byte "this is a test7@",13
|
||||
.byte "this is a test8@",13
|
||||
.byte "this is a test9@",13
|
||||
.byte "this is a test10@",13
|
||||
.byte "this is a test1*",13
|
||||
.byte "this is a test2*",13
|
||||
.byte "this is a test3*",13
|
||||
.byte "this is a test4*",13
|
||||
.byte "this is a test5*",13
|
||||
.byte "this is a test6*",13
|
||||
.byte "this is a test7*",13
|
||||
.byte "this is a test8*",13
|
||||
.byte "this is a test9*",13
|
||||
.byte "this is a test10*",13
|
||||
|
||||
buffer_length=*-buffer
|
||||
|
||||
.bss
|
||||
getc_timeout_end: .res 1
|
||||
getc_timeout_seconds: .res 1
|
||||
buff_length: .res 2
|
||||
|
||||
|
||||
;-- LICENSE FOR test_getc.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
; compliance with the License. You may obtain a copy of the License at
|
||||
; http://www.mozilla.org/MPL/
|
||||
;
|
||||
; Software distributed under the License is distributed on an "AS IS"
|
||||
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
; License for the specific language governing rights and limitations
|
||||
; under the License.
|
||||
;
|
||||
; The Original Code is ip65.
|
||||
;
|
||||
; The Initial Developer of the Original Code is Jonno Downes,
|
||||
; jonno@jamtronix.com.
|
||||
; Portions created by the Initial Developer are Copyright (C) 2009
|
||||
; Jonno Downes. All Rights Reserved.
|
||||
; -- LICENSE END --
|
@ -18,30 +18,12 @@
|
||||
.import url_download
|
||||
.import url_download_buffer
|
||||
.import url_download_buffer_length
|
||||
|
||||
temp_buff=copy_dest
|
||||
|
||||
.bss
|
||||
|
||||
string_offset: .res 1
|
||||
selector_ptr: .res 2
|
||||
temp_url_ptr: .res 2
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
init:
|
||||
|
||||
;switch to lower case charset
|
||||
lda #23
|
||||
@ -95,7 +77,6 @@ wait_key:
|
||||
jsr print
|
||||
jmp get_key
|
||||
|
||||
|
||||
print_tag_contents:
|
||||
stax temp_buff
|
||||
lda #0
|
||||
@ -114,7 +95,10 @@ print_tag_contents:
|
||||
@done:
|
||||
rts
|
||||
|
||||
|
||||
.data
|
||||
|
||||
|
||||
title:
|
||||
.byte "<title>",0
|
||||
|
||||
@ -126,7 +110,13 @@ url_2:
|
||||
downloading: .asciiz "DOWNLOADING "
|
||||
press_a_key: .byte "PRESS ANY KEY TO CONTINUE",13,0
|
||||
|
||||
|
||||
.bss
|
||||
|
||||
string_offset: .res 1
|
||||
selector_ptr: .res 2
|
||||
temp_url_ptr: .res 2
|
||||
|
||||
dl_buffer_length=8092
|
||||
dl_buffer: .res dl_buffer_length
|
||||
|
||||
|
28
test/httpd.s
28
test/httpd.s
@ -30,16 +30,22 @@ print_a = $ffd2
|
||||
jsr print_a
|
||||
.endmacro
|
||||
|
||||
|
||||
.zeropage
|
||||
|
||||
|
||||
temp_ptr: .res 2
|
||||
|
||||
|
||||
.bss
|
||||
|
||||
|
||||
kipper_param_buffer: .res $20
|
||||
block_number: .res $0
|
||||
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
.macro print arg
|
||||
ldax arg
|
||||
@ -57,19 +63,6 @@ print_a = $ffd2
|
||||
jsr KPR_DISPATCH_VECTOR
|
||||
.endmacro
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
|
||||
;look for KIPPER signature at location pointed at by AX
|
||||
look_for_signature:
|
||||
stax temp_ptr
|
||||
@ -88,7 +81,6 @@ look_for_signature:
|
||||
|
||||
init:
|
||||
|
||||
|
||||
ldax #KPR_CART_SIGNATURE ;where signature should be in cartridge
|
||||
jsr look_for_signature
|
||||
bcc @found_kipper_signature
|
||||
@ -106,7 +98,6 @@ init:
|
||||
ldax #print_vars
|
||||
stax $4001
|
||||
|
||||
|
||||
ldy #KPR_INITIALIZE
|
||||
jsr KPR_DISPATCH_VECTOR
|
||||
bcc :+
|
||||
@ -126,7 +117,6 @@ init:
|
||||
jsr print_errorcode
|
||||
rts
|
||||
|
||||
|
||||
print_vars:
|
||||
|
||||
lda #'h'
|
||||
@ -147,7 +137,6 @@ restart:
|
||||
jsr get_key
|
||||
jmp $fce2 ;do a cold start
|
||||
|
||||
|
||||
print_errorcode:
|
||||
print #error_code
|
||||
call #KPR_GET_LAST_ERROR
|
||||
@ -184,6 +173,7 @@ httpd_callback:
|
||||
|
||||
.rodata
|
||||
|
||||
|
||||
kipper_signature:
|
||||
.byte "KIPPER" ; API signature
|
||||
error_code:
|
||||
@ -207,6 +197,8 @@ said:
|
||||
html:
|
||||
.byte "<h1>hello world</h1>%?mMessage recorded as '%$h:%$m'%.<form>Your Handle:<input name=h type=text length=20 value='%$h'><br>Your Message: <input type=text lengh=60 name='m'><br><input type=submit></form><br>",0
|
||||
|
||||
|
||||
|
||||
;-- LICENSE FOR test_httpd.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
|
@ -11,25 +11,8 @@
|
||||
.import http_get_value
|
||||
|
||||
|
||||
.bss
|
||||
temp_ax: .res 2
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
init:
|
||||
|
||||
;switch to lower case charset
|
||||
lda #23
|
||||
@ -102,7 +85,16 @@ print_var:
|
||||
jsr print_ascii_as_native
|
||||
jmp @print_equals
|
||||
|
||||
|
||||
.bss
|
||||
|
||||
|
||||
temp_ax: .res 2
|
||||
|
||||
|
||||
.rodata
|
||||
|
||||
|
||||
path: .byte "path",0
|
||||
method: .byte "method",0
|
||||
|
||||
@ -121,7 +113,6 @@ query_6:
|
||||
|
||||
|
||||
|
||||
|
||||
;-- LICENSE FOR test_parse_querystring.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
|
@ -15,30 +15,12 @@
|
||||
.import url_selector
|
||||
.import url_resource_type
|
||||
.import url_parse
|
||||
|
||||
temp_buff=copy_dest
|
||||
|
||||
.bss
|
||||
|
||||
string_offset: .res 1
|
||||
selector_ptr: .res 2
|
||||
temp_url_ptr: .res 2
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
init:
|
||||
|
||||
;switch to lower case charset
|
||||
lda #23
|
||||
@ -51,7 +33,6 @@ init:
|
||||
jsr test_url_parse
|
||||
jsr wait_key
|
||||
|
||||
|
||||
ldax #url_2
|
||||
jsr test_url_parse
|
||||
ldax #url_3
|
||||
@ -81,7 +62,6 @@ init:
|
||||
|
||||
jsr wait_key
|
||||
|
||||
|
||||
ldax #atom_file
|
||||
jsr parser_init
|
||||
|
||||
@ -158,8 +138,18 @@ wait_key:
|
||||
jsr print
|
||||
jmp get_key
|
||||
|
||||
|
||||
.bss
|
||||
|
||||
|
||||
string_offset: .res 1
|
||||
selector_ptr: .res 2
|
||||
temp_url_ptr: .res 2
|
||||
|
||||
|
||||
.data
|
||||
|
||||
|
||||
entry:
|
||||
.byte "<entry>",0
|
||||
title:
|
||||
@ -212,10 +202,10 @@ press_a_key: .byte "PRESS ANY KEY TO CONTINUE",13,0
|
||||
atom_file:
|
||||
;.incbin "atom_test.xml"
|
||||
|
||||
|
||||
.byte 0
|
||||
|
||||
|
||||
|
||||
;-- LICENSE FOR test_parser.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
|
30
test/ping.s
30
test/ping.s
@ -13,30 +13,8 @@
|
||||
.import icmp_ping
|
||||
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
.import __DATA_SIZE__
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
.code
|
||||
|
||||
init:
|
||||
|
||||
;switch to lower case charset
|
||||
lda #23
|
||||
@ -69,16 +47,24 @@ init:
|
||||
@error:
|
||||
jmp print_errorcode
|
||||
|
||||
|
||||
.rodata
|
||||
|
||||
|
||||
ms: .byte " MS",13,0
|
||||
pinging: .byte "PINGING ",0
|
||||
|
||||
|
||||
.bss
|
||||
|
||||
|
||||
block_number: .res 1
|
||||
block_length: .res 2
|
||||
buffer1: .res 256
|
||||
buffer2: .res 256
|
||||
|
||||
|
||||
|
||||
;-- LICENSE FOR test_ping.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
|
23
test/sntp.s
23
test/sntp.s
@ -12,29 +12,10 @@
|
||||
.import sntp_utc_timestamp
|
||||
.import sntp_get_time
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
.import __DATA_SIZE__
|
||||
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
init:
|
||||
lda #14
|
||||
jsr print_a ;switch to lower case
|
||||
jsr print_cr
|
||||
@ -57,7 +38,6 @@ init:
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
|
||||
ldax #sending_query
|
||||
jsr print
|
||||
ldax #sntp_ip
|
||||
@ -87,7 +67,6 @@ init:
|
||||
.data
|
||||
|
||||
|
||||
|
||||
time_server_msg:
|
||||
.byte "TIME SERVER : ",0
|
||||
|
||||
@ -100,7 +79,6 @@ sending_query:
|
||||
.byte "SENDING SNTP QUERY TO ",0
|
||||
sntp_error:
|
||||
.byte "ERROR DURING SNTP QUERY",13,0
|
||||
|
||||
dns_error:
|
||||
.byte "ERROR RESOLVING HOSTNAME",13,0
|
||||
|
||||
@ -110,7 +88,6 @@ dns_error:
|
||||
|
||||
|
||||
|
||||
|
||||
;-- LICENSE FOR test_sntp.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
|
84
test/tcp.s
84
test/tcp.s
@ -21,12 +21,6 @@
|
||||
.import tcp_send
|
||||
.import tcp_send_data_len
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
.import __DATA_SIZE__
|
||||
|
||||
|
||||
.importzp acc32
|
||||
.importzp op32
|
||||
.importzp acc16
|
||||
@ -39,39 +33,9 @@
|
||||
|
||||
.import sub_16_16
|
||||
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
.segment "EXEHDR" ;this is what gets put an the start of the file on the Apple 2
|
||||
.addr __CODE_LOAD__-$11 ; Start address
|
||||
.word __CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__+4 ; Size
|
||||
jmp init
|
||||
|
||||
.bss
|
||||
cxn_closed: .res 1
|
||||
byte_counter: .res 1
|
||||
|
||||
.data
|
||||
get_next_byte:
|
||||
lda $ffff
|
||||
rts
|
||||
|
||||
.code
|
||||
|
||||
init:
|
||||
|
||||
;switch to lower case charset
|
||||
lda #23
|
||||
@ -102,7 +66,6 @@ init:
|
||||
ldax #$100
|
||||
jsr test_sub_16_16
|
||||
|
||||
|
||||
ldax #number1
|
||||
stax acc32
|
||||
stax op32
|
||||
@ -133,13 +96,11 @@ init:
|
||||
ldax #$1235
|
||||
jsr test_cmp_16_16
|
||||
|
||||
|
||||
ldax #$1234
|
||||
stax acc16
|
||||
ldax #$2234
|
||||
jsr test_cmp_16_16
|
||||
|
||||
|
||||
ldax #$0000
|
||||
stax acc16
|
||||
jsr test_cmp_16_16
|
||||
@ -148,16 +109,12 @@ init:
|
||||
stax acc16
|
||||
jsr test_cmp_16_16
|
||||
|
||||
|
||||
|
||||
ldax #number1
|
||||
stax acc32
|
||||
ldax #number2
|
||||
stax op32
|
||||
jsr test_add_32_32
|
||||
|
||||
|
||||
|
||||
ldax #number3
|
||||
stax acc32
|
||||
ldax #number4
|
||||
@ -188,7 +145,6 @@ init:
|
||||
stax op32
|
||||
jsr test_add_32_32
|
||||
|
||||
|
||||
ldax #number13
|
||||
stax acc32
|
||||
ldax #$1234
|
||||
@ -214,14 +170,12 @@ init:
|
||||
ldax #$158
|
||||
jsr test_add_16_32
|
||||
|
||||
|
||||
jsr print_cr
|
||||
init_ip_via_dhcp
|
||||
jsr print_ip_config
|
||||
|
||||
jsr print_cr
|
||||
|
||||
|
||||
jsr print_random_number
|
||||
|
||||
;connect to port 81 - should be rejected
|
||||
@ -252,7 +206,6 @@ init:
|
||||
ldax tcp_dest_ip+2
|
||||
stax tcp_connect_ip+2
|
||||
|
||||
|
||||
ldax #80
|
||||
jsr tcp_connect
|
||||
jsr check_for_error
|
||||
@ -275,7 +228,6 @@ init:
|
||||
|
||||
rts
|
||||
|
||||
|
||||
ldax #tcp_callback_routine
|
||||
stax tcp_callback
|
||||
ldax tcp_dest_ip
|
||||
@ -283,8 +235,6 @@ init:
|
||||
ldax tcp_dest_ip+2
|
||||
stax tcp_connect_ip+2
|
||||
|
||||
|
||||
|
||||
ldax #80
|
||||
jsr tcp_connect
|
||||
jsr check_for_error
|
||||
@ -300,7 +250,6 @@ init:
|
||||
jsr tcp_send
|
||||
jsr check_for_error
|
||||
|
||||
|
||||
ldax #looping
|
||||
jsr print
|
||||
@loop_forever:
|
||||
@ -309,9 +258,6 @@ init:
|
||||
rts
|
||||
|
||||
tcp_callback_routine:
|
||||
|
||||
|
||||
|
||||
lda tcp_inbound_data_length
|
||||
cmp #$ff
|
||||
bne @not_end_of_file
|
||||
@ -323,7 +269,6 @@ tcp_callback_routine:
|
||||
lda #14
|
||||
jsr print_a ;switch to lower case
|
||||
|
||||
|
||||
ldax tcp_inbound_data_ptr
|
||||
stax get_next_byte+1
|
||||
|
||||
@ -353,8 +298,6 @@ tcp_callback_routine:
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
check_for_error:
|
||||
lda ip65_error
|
||||
beq @exit
|
||||
@ -408,8 +351,6 @@ test_add_32_32:
|
||||
jsr print_cr
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;assumes acc32 & op32 already set
|
||||
test_cmp_32_32:
|
||||
ldy #3
|
||||
@ -470,7 +411,6 @@ test_cmp_16_16:
|
||||
jsr print_cr
|
||||
rts
|
||||
|
||||
|
||||
;assumes acc32 & AX already set
|
||||
test_add_16_32:
|
||||
stax temp_ax
|
||||
@ -527,7 +467,6 @@ test_mul_8_16:
|
||||
jsr print_cr
|
||||
rts
|
||||
|
||||
|
||||
;assumes acc16 & AX already set
|
||||
test_sub_16_16:
|
||||
stax temp_ax
|
||||
@ -558,20 +497,24 @@ test_sub_16_16:
|
||||
jsr print_cr
|
||||
rts
|
||||
|
||||
|
||||
@error:
|
||||
ldax #failed_msg
|
||||
jsr print
|
||||
jsr print_cr
|
||||
rts
|
||||
|
||||
.bss
|
||||
temp_ax: .res 2
|
||||
|
||||
.rodata
|
||||
.bss
|
||||
|
||||
|
||||
temp_ax: .res 2
|
||||
cxn_closed: .res 1
|
||||
byte_counter: .res 1
|
||||
|
||||
|
||||
.data
|
||||
|
||||
|
||||
number1:
|
||||
.byte $1,$2,$3,$f
|
||||
number2:
|
||||
@ -580,7 +523,6 @@ number3:
|
||||
.byte $ff,$ff,$ff,$ff
|
||||
number4:
|
||||
.byte $1,$0,$0,$0
|
||||
|
||||
number5:
|
||||
.byte $ff,$ff,$ff,$ff
|
||||
number6:
|
||||
@ -597,19 +539,14 @@ number11:
|
||||
.byte $ff,$0,$0,$e
|
||||
number12:
|
||||
.byte $5,$0,$0,$0
|
||||
|
||||
number13:
|
||||
.byte $1,$2,$3,$4
|
||||
|
||||
number14:
|
||||
.byte $ff,$ff,$ff,$ff
|
||||
|
||||
number15:
|
||||
.byte $ff,$ff,$00,$00
|
||||
|
||||
number16:
|
||||
.byte $00,$00,$00,$00
|
||||
|
||||
number17:
|
||||
.byte $5b,$bc,$08,$a9
|
||||
|
||||
@ -624,6 +561,9 @@ http_get_msg:
|
||||
http_get_msg_end:
|
||||
http_get_length=http_get_msg_end-http_get_msg
|
||||
|
||||
get_next_byte:
|
||||
lda $ffff
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
32
test/tftp.s
32
test/tftp.s
@ -9,7 +9,6 @@
|
||||
.importzp copy_src
|
||||
.importzp copy_dest
|
||||
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
@ -21,30 +20,9 @@
|
||||
.import tftp_filesize
|
||||
.importzp tftp_filename
|
||||
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
.segment "EXEHDR" ;this is what gets put an the start of the file on the Apple 2
|
||||
.addr __CODE_LOAD__-$11 ; Start address
|
||||
.word __CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__+4 ; Size
|
||||
jmp init
|
||||
|
||||
.code
|
||||
|
||||
init:
|
||||
|
||||
;switch to lower case charset
|
||||
lda #23
|
||||
@ -112,19 +90,27 @@ upload_callback:
|
||||
jsr copymem
|
||||
ldax block_length
|
||||
rts
|
||||
|
||||
|
||||
.rodata
|
||||
|
||||
|
||||
test_file: .byte "TESTFILE.BIN",0
|
||||
basic_file: .byte "CBMBASIC.BIN",0
|
||||
sending_via_callback: .byte "SENDING VIA CALLBACK...",0
|
||||
sending_ram: .byte "SENDING RAM...",0
|
||||
|
||||
|
||||
.bss
|
||||
|
||||
|
||||
block_number: .res 1
|
||||
block_length: .res 2
|
||||
buffer1: .res 256
|
||||
buffer2: .res 256
|
||||
|
||||
|
||||
|
||||
;-- LICENSE FOR testtftp.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
|
Loading…
x
Reference in New Issue
Block a user