mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-07-30 16:29:13 +00:00
git-svn-id: http://svn.code.sf.net/p/netboot65/code@101 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
7cf058f371
commit
77ec4c67ee
@ -13,8 +13,9 @@ INCFILES=\
|
|||||||
|
|
||||||
IP65LIB=../ip65/ip65.lib
|
IP65LIB=../ip65/ip65.lib
|
||||||
|
|
||||||
C64NETLIB=../drivers/c64net.lib
|
C64PROGLIB=../drivers/c64prog.lib
|
||||||
APPLE2NETLIB=../drivers/apple2net.lib
|
C64NB65LIB=../drivers/c64nb65.lib
|
||||||
|
APPLE2PROGLIB=../drivers/apple2prog.lib
|
||||||
|
|
||||||
BOOTA2.PG2=../../server/boot/BOOTA2.PG2
|
BOOTA2.PG2=../../server/boot/BOOTA2.PG2
|
||||||
|
|
||||||
@ -33,23 +34,23 @@ rrnetboot.o: rrnetboot.s $(INCFILES)
|
|||||||
%.o: %.s $(INCFILES)
|
%.o: %.s $(INCFILES)
|
||||||
$(AS) $(AFLAGS) $<
|
$(AS) $(AFLAGS) $<
|
||||||
|
|
||||||
rrnetboot.bin: rrnetboot.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/rrbin.cfg
|
rrnetboot.bin: rrnetboot.o $(IP65LIB) $(C64NB65LIB) $(INCFILES) ../cfg/rrbin.cfg
|
||||||
$(LD) -m rrnetboot.map -vm -C ../cfg/rrbin.cfg -o rrnetboot.bin $< $(IP65LIB) $(C64NETLIB)
|
$(LD) -m rrnetboot.map -vm -C ../cfg/rrbin.cfg -o rrnetboot.bin $< $(IP65LIB) $(C64NB65LIB)
|
||||||
ruby fix_cart.rb rrnetboot.bin 8193
|
ruby fix_cart.rb rrnetboot.bin 8193
|
||||||
|
|
||||||
64nicboot.bin: 64nicboot.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/rrbin.cfg
|
64nicboot.bin: 64nicboot.o $(IP65LIB) $(C64NB65LIB) $(INCFILES) ../cfg/rrbin.cfg
|
||||||
$(LD) -C ../cfg/rrbin.cfg -o 64nicboot.bin $< $(IP65LIB) $(C64NETLIB)
|
$(LD) -C ../cfg/rrbin.cfg -o 64nicboot.bin $< $(IP65LIB) $(C64NB65LIB)
|
||||||
ruby fix_cart.rb 64nicboot.bin 8192
|
ruby fix_cart.rb 64nicboot.bin 8192
|
||||||
|
|
||||||
utherboot.pg2: utherboot.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2language_card.cfg
|
utherboot.pg2: utherboot.o $(IP65LIB) $(APPLE2PROGLIB) $(INCFILES) ../cfg/a2language_card.cfg
|
||||||
$(LD) -m utherboot.map -C ../cfg/a2language_card.cfg -o utherboot.pg2 $< $(IP65LIB) $(APPLE2NETLIB)
|
$(LD) -m utherboot.map -C ../cfg/a2language_card.cfg -o utherboot.pg2 $< $(IP65LIB) $(APPLE2PROGLIB)
|
||||||
|
|
||||||
utherboot.dsk: utherboot.pg2
|
utherboot.dsk: utherboot.pg2
|
||||||
ripxplore.rb --init AppleDos utherboot.dsk -a utherboot.pg2 -t AppleBinary
|
ripxplore.rb --init AppleDos utherboot.dsk -a utherboot.pg2 -t AppleBinary
|
||||||
ripxplore.rb utherboot.dsk -a hello -t Applesoft
|
ripxplore.rb utherboot.dsk -a hello -t Applesoft
|
||||||
|
|
||||||
$(BOOTA2.PG2): bootmenu.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2language_card.cfg
|
$(BOOTA2.PG2): bootmenu.o $(IP65LIB) $(APPLE2PROGLIB) $(INCFILES) ../cfg/a2language_card.cfg
|
||||||
$(LD) -m bootmenu.map -C ../cfg/a2language_card.cfg -o $(BOOTA2.PG2) $< $(IP65LIB) $(APPLE2NETLIB)
|
$(LD) -m bootmenu.map -C ../cfg/a2language_card.cfg -o $(BOOTA2.PG2) $< $(IP65LIB) $(APPLE2PROGLIB)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
.include "../inc/c64keycodes.i"
|
.include "../inc/c64keycodes.i"
|
||||||
|
|
||||||
.import cls
|
.import cls
|
||||||
.import get_key
|
|
||||||
.import beep
|
.import beep
|
||||||
.import exit_to_basic
|
.import exit_to_basic
|
||||||
.import timer_vbl_handler
|
.import timer_vbl_handler
|
||||||
@ -54,6 +53,7 @@
|
|||||||
.import get_filtered_input
|
.import get_filtered_input
|
||||||
.import filter_text
|
.import filter_text
|
||||||
.import filter_dns
|
.import filter_dns
|
||||||
|
.import print_arp_cache
|
||||||
|
|
||||||
.import print_dotted_quad
|
.import print_dotted_quad
|
||||||
.import print_hex
|
.import print_hex
|
||||||
@ -178,6 +178,8 @@ main_menu:
|
|||||||
@not_tftp:
|
@not_tftp:
|
||||||
cmp #KEYCODE_F3
|
cmp #KEYCODE_F3
|
||||||
beq @exit_to_basic
|
beq @exit_to_basic
|
||||||
|
cmp #KEYCODE_F5
|
||||||
|
beq @util_menu
|
||||||
cmp #KEYCODE_F7
|
cmp #KEYCODE_F7
|
||||||
beq @change_config
|
beq @change_config
|
||||||
|
|
||||||
@ -188,6 +190,24 @@ main_menu:
|
|||||||
ldax #$fe66 ;do a wam start
|
ldax #$fe66 ;do a wam start
|
||||||
jmp exit_cart_via_ax
|
jmp exit_cart_via_ax
|
||||||
|
|
||||||
|
@util_menu:
|
||||||
|
jsr cls
|
||||||
|
ldax #netboot65_msg
|
||||||
|
jsr print
|
||||||
|
ldax #util_menu_msg
|
||||||
|
jsr print
|
||||||
|
@get_key_util_menu:
|
||||||
|
jsr get_key
|
||||||
|
cmp #KEYCODE_F1
|
||||||
|
bne @not_arp_cache
|
||||||
|
jsr print_arp_cache
|
||||||
|
jmp @get_key_util_menu
|
||||||
|
@not_arp_cache:
|
||||||
|
cmp #KEYCODE_F7
|
||||||
|
beq main_menu
|
||||||
|
jmp @get_key_util_menu
|
||||||
|
|
||||||
|
|
||||||
@change_config:
|
@change_config:
|
||||||
jsr cls
|
jsr cls
|
||||||
ldax #netboot65_msg
|
ldax #netboot65_msg
|
||||||
@ -262,7 +282,10 @@ main_menu:
|
|||||||
ldax #tftp_dir_buffer
|
ldax #tftp_dir_buffer
|
||||||
|
|
||||||
jsr select_option_from_menu
|
jsr select_option_from_menu
|
||||||
|
bcc @tftp_filename_set
|
||||||
|
lda #21 ;switch back to upper case
|
||||||
|
sta $d018
|
||||||
|
jmp main_menu
|
||||||
@tftp_filename_set:
|
@tftp_filename_set:
|
||||||
jsr download
|
jsr download
|
||||||
bcc @file_downloaded_ok
|
bcc @file_downloaded_ok
|
||||||
@ -353,6 +376,7 @@ download: ;AX should point at filename to download
|
|||||||
jsr setup_param_buffer_for_tftp_call
|
jsr setup_param_buffer_for_tftp_call
|
||||||
ldax #nb65_param_buffer
|
ldax #nb65_param_buffer
|
||||||
nb65call #NB65_TFTP_DOWNLOAD
|
nb65call #NB65_TFTP_DOWNLOAD
|
||||||
|
|
||||||
bcc :+
|
bcc :+
|
||||||
|
|
||||||
ldax #tftp_download_fail_msg
|
ldax #tftp_download_fail_msg
|
||||||
@ -370,9 +394,19 @@ download: ;AX should point at filename to download
|
|||||||
wait_for_keypress:
|
wait_for_keypress:
|
||||||
ldax #press_a_key_to_continue
|
ldax #press_a_key_to_continue
|
||||||
jsr print
|
jsr print
|
||||||
jsr get_key
|
@loop:
|
||||||
|
jsr $ffe4
|
||||||
|
beq @loop
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
get_key:
|
||||||
|
@loop:
|
||||||
|
jsr NB65_PERIODIC_PROCESSING_VECTOR
|
||||||
|
jsr $ffe4
|
||||||
|
beq @loop
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
cfg_get_configuration_ptr:
|
cfg_get_configuration_ptr:
|
||||||
ldax #nb65_param_buffer
|
ldax #nb65_param_buffer
|
||||||
nb65call #NB65_GET_IP_CONFIG
|
nb65call #NB65_GET_IP_CONFIG
|
||||||
@ -385,7 +419,12 @@ netboot65_msg:
|
|||||||
.byte 0
|
.byte 0
|
||||||
main_menu_msg:
|
main_menu_msg:
|
||||||
.byte "F1: TFTP BOOT F3: BASIC",13
|
.byte "F1: TFTP BOOT F3: BASIC",13
|
||||||
.byte "F7: CONFIG",13,13
|
.byte "F5: UTILITIES F7: CONFIG",13,13
|
||||||
|
.byte 0
|
||||||
|
|
||||||
|
util_menu_msg:
|
||||||
|
.byte "F1: ARP TABLE",13
|
||||||
|
.byte " F7: MAIN MENU",13,13
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
config_menu_msg:
|
config_menu_msg:
|
||||||
|
@ -11,22 +11,25 @@ AFLAGS=
|
|||||||
|
|
||||||
|
|
||||||
DRIVERS=\
|
DRIVERS=\
|
||||||
apple2net.lib \
|
apple2prog.lib \
|
||||||
c64net.lib \
|
c64prog.lib \
|
||||||
|
c64nb65.lib \
|
||||||
|
|
||||||
all: $(DRIVERS)
|
all: $(DRIVERS)
|
||||||
|
|
||||||
|
|
||||||
apple2net.lib: a2print.o uthernet.o a2timer.o a2kernal.o a2input.o
|
apple2prog.lib: a2print.o uthernet.o a2timer.o a2kernal.o a2input.o
|
||||||
ar65 a apple2net.lib $^
|
ar65 a $@ $^
|
||||||
|
|
||||||
c64net.lib: c64print.o rr-net.o c64timer.o c64kernal.o c64inputs.o
|
c64prog.lib: c64print.o rr-net.o c64timer.o c64kernal.o c64inputs.o
|
||||||
ar65 a c64net.lib $^
|
ar65 a $@ $^
|
||||||
|
|
||||||
|
c64nb65.lib: c64print.o rr-net.o c64timer_nb65.o c64kernal.o c64inputs.o
|
||||||
|
ar65 a $@ $^
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
rm -f apple2net.lib
|
rm -f *.lib
|
||||||
rm -f c64net.lib
|
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f *~
|
rm -f *~
|
||||||
|
@ -2,46 +2,43 @@
|
|||||||
;
|
;
|
||||||
; the timer should be a 16-bit counter that's incremented by about
|
; the timer should be a 16-bit counter that's incremented by about
|
||||||
; 1000 units per second. it doesn't have to be particularly accurate.
|
; 1000 units per second. it doesn't have to be particularly accurate.
|
||||||
; this C64 implementation requires the routine timer_vbl_handler be called 60 times per second
|
|
||||||
|
|
||||||
.include "../inc/common.i"
|
.include "../inc/common.i"
|
||||||
|
|
||||||
|
|
||||||
.export timer_init
|
.export timer_init
|
||||||
.export timer_read
|
.export timer_read
|
||||||
.export timer_vbl_handler
|
|
||||||
|
|
||||||
.code
|
|
||||||
.bss
|
|
||||||
current_time_value: .res 2
|
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
;reset timer to 0
|
; initialize timers
|
||||||
;inputs: none
|
|
||||||
;outputs: none
|
|
||||||
timer_init:
|
timer_init:
|
||||||
ldax #0
|
lda #$80 ; stop timers
|
||||||
stax current_time_value
|
sta $dd0e
|
||||||
|
sta $dd0f
|
||||||
|
|
||||||
|
ldax #999 ; timer A to 1000 cycles
|
||||||
|
stax $dd04
|
||||||
|
|
||||||
|
ldax #$ffff ; timer B to max cycles
|
||||||
|
stax $dd06
|
||||||
|
|
||||||
|
lda #$81 ; timer A in continuous mode
|
||||||
|
sta $dd0e
|
||||||
|
|
||||||
|
lda #$c1 ; timer B to count timer A underflows
|
||||||
|
sta $dd0f
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
;read the current timer value
|
|
||||||
; inputs: none
|
; return the current value
|
||||||
; outputs: AX = current timer value (roughly equal to number of milliseconds since the last call to 'timer_init')
|
|
||||||
timer_read:
|
timer_read:
|
||||||
ldax current_time_value
|
lda $dd07 ; cia counts backwards, return inverted value
|
||||||
|
eor #$ff
|
||||||
|
tax
|
||||||
|
lda $dd06
|
||||||
|
eor #$ff
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; tick over the current timer value - should be called 60 times per second
|
|
||||||
; inputs: none
|
|
||||||
; outputs: none (all registers preserved, by carry flag can be modified)
|
|
||||||
timer_vbl_handler:
|
|
||||||
pha
|
|
||||||
lda #$11
|
|
||||||
adc current_time_value
|
|
||||||
sta current_time_value
|
|
||||||
bcc :+
|
|
||||||
inc current_time_value+1
|
|
||||||
:
|
|
||||||
pla
|
|
||||||
rts
|
|
||||||
|
50
client/drivers/c64timer_nb65.s
Normal file
50
client/drivers/c64timer_nb65.s
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
; timer routines
|
||||||
|
;
|
||||||
|
; the timer should be a 16-bit counter that's incremented by about
|
||||||
|
; 1000 units per second. it doesn't have to be particularly accurate.
|
||||||
|
; this C64 implementation requires the routine timer_vbl_handler be called 60 times per second
|
||||||
|
; this is for use in the NB65 ROM, where we also install an IRQ handler
|
||||||
|
; for normal userland programs where it is known what else is going on with the timer ,
|
||||||
|
; use "c64timer.s" routines instead
|
||||||
|
|
||||||
|
.include "../inc/common.i"
|
||||||
|
|
||||||
|
|
||||||
|
.export timer_init
|
||||||
|
.export timer_read
|
||||||
|
.export timer_vbl_handler
|
||||||
|
|
||||||
|
|
||||||
|
.bss
|
||||||
|
current_time_value: .res 2
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
|
;reset timer to 0
|
||||||
|
;inputs: none
|
||||||
|
;outputs: none
|
||||||
|
timer_init:
|
||||||
|
ldax #0
|
||||||
|
stax current_time_value
|
||||||
|
rts
|
||||||
|
|
||||||
|
;read the current timer value
|
||||||
|
; inputs: none
|
||||||
|
; outputs: AX = current timer value (roughly equal to number of milliseconds since the last call to 'timer_init')
|
||||||
|
timer_read:
|
||||||
|
ldax current_time_value
|
||||||
|
rts
|
||||||
|
|
||||||
|
; tick over the current timer value - should be called 60 times per second
|
||||||
|
; inputs: none
|
||||||
|
; outputs: none (all registers preserved, by carry flag can be modified)
|
||||||
|
timer_vbl_handler:
|
||||||
|
pha
|
||||||
|
lda #$11
|
||||||
|
adc current_time_value
|
||||||
|
sta current_time_value
|
||||||
|
bcc :+
|
||||||
|
inc current_time_value+1
|
||||||
|
:
|
||||||
|
pla
|
||||||
|
rts
|
@ -12,15 +12,20 @@
|
|||||||
.export print
|
.export print
|
||||||
.export print_decimal
|
.export print_decimal
|
||||||
.export print_dotted_quad
|
.export print_dotted_quad
|
||||||
|
.export print_arp_cache
|
||||||
|
.import arp_cache
|
||||||
|
.importzp ac_size
|
||||||
|
|
||||||
.import cs_driver_name
|
.import cs_driver_name
|
||||||
.importzp copy_src
|
.importzp copy_src
|
||||||
.import cfg_tftp_server
|
.import cfg_tftp_server
|
||||||
;reuse the copy_src zero page var
|
;reuse the copy_src zero page var
|
||||||
pptr = copy_src
|
pptr = copy_src
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
temp_bin: .res 1
|
temp_bin: .res 1
|
||||||
temp_bcd: .res 2
|
temp_bcd: .res 2
|
||||||
|
temp_ptr: .res 2
|
||||||
.code
|
.code
|
||||||
.macro print_driver_init
|
.macro print_driver_init
|
||||||
ldax #cs_driver_name
|
ldax #cs_driver_name
|
||||||
@ -68,23 +73,7 @@ print_ip_config:
|
|||||||
jsr print
|
jsr print
|
||||||
jsr cfg_get_configuration_ptr ;ax=base config, carry flag clear
|
jsr cfg_get_configuration_ptr ;ax=base config, carry flag clear
|
||||||
;first 6 bytes of cfg_get_configuration_ptr is MAC address
|
;first 6 bytes of cfg_get_configuration_ptr is MAC address
|
||||||
stax pptr
|
jsr print_mac
|
||||||
ldy #0
|
|
||||||
@one_mac_digit:
|
|
||||||
tya ;just to set the Z flag
|
|
||||||
pha
|
|
||||||
beq @dont_print_colon
|
|
||||||
lda #':'
|
|
||||||
jsr print_a
|
|
||||||
@dont_print_colon:
|
|
||||||
pla
|
|
||||||
tay
|
|
||||||
lda (pptr),y
|
|
||||||
jsr print_hex
|
|
||||||
iny
|
|
||||||
cpy #06
|
|
||||||
bne @one_mac_digit
|
|
||||||
|
|
||||||
jsr print_cr
|
jsr print_cr
|
||||||
|
|
||||||
ldax #ip_address_msg
|
ldax #ip_address_msg
|
||||||
@ -144,6 +133,7 @@ print_ip_config:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
print:
|
print:
|
||||||
sta pptr
|
sta pptr
|
||||||
stx pptr + 1
|
stx pptr + 1
|
||||||
@ -160,6 +150,51 @@ print:
|
|||||||
@done_print:
|
@done_print:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
print_arp_cache:
|
||||||
|
ldax #arp_cache_header
|
||||||
|
jsr print
|
||||||
|
ldax #arp_cache
|
||||||
|
stax temp_ptr
|
||||||
|
lda #ac_size
|
||||||
|
@print_one_arp_entry:
|
||||||
|
pha
|
||||||
|
lda #'$'
|
||||||
|
jsr print_a
|
||||||
|
lda temp_ptr+1
|
||||||
|
jsr print_hex
|
||||||
|
lda temp_ptr
|
||||||
|
jsr print_hex
|
||||||
|
lda #' '
|
||||||
|
jsr print_a
|
||||||
|
|
||||||
|
ldax temp_ptr
|
||||||
|
jsr print_mac
|
||||||
|
lda #' '
|
||||||
|
jsr print_a
|
||||||
|
ldax temp_ptr
|
||||||
|
clc
|
||||||
|
adc #6
|
||||||
|
bcc :+
|
||||||
|
inx
|
||||||
|
:
|
||||||
|
stax temp_ptr
|
||||||
|
jsr print_dotted_quad
|
||||||
|
ldax temp_ptr
|
||||||
|
clc
|
||||||
|
adc #4
|
||||||
|
bcc :+
|
||||||
|
inx
|
||||||
|
:
|
||||||
|
stax temp_ptr
|
||||||
|
jsr print_cr
|
||||||
|
pla
|
||||||
|
sec
|
||||||
|
sbc #1
|
||||||
|
|
||||||
|
bne @print_one_arp_entry
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
;print the 4 bytes pointed at by AX as dotted decimals
|
;print the 4 bytes pointed at by AX as dotted decimals
|
||||||
print_dotted_quad:
|
print_dotted_quad:
|
||||||
@ -189,6 +224,25 @@ print_dotted_quad:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
;print 6 bytes printed at by AX as a MAC address
|
||||||
|
print_mac:
|
||||||
|
stax pptr
|
||||||
|
ldy #0
|
||||||
|
@one_mac_digit:
|
||||||
|
tya ;just to set the Z flag
|
||||||
|
pha
|
||||||
|
beq @dont_print_colon
|
||||||
|
lda #':'
|
||||||
|
jsr print_a
|
||||||
|
@dont_print_colon:
|
||||||
|
pla
|
||||||
|
tay
|
||||||
|
lda (pptr),y
|
||||||
|
jsr print_hex
|
||||||
|
iny
|
||||||
|
cpy #06
|
||||||
|
bne @one_mac_digit
|
||||||
|
rts
|
||||||
print_decimal: ;print byte in A as a decimal number
|
print_decimal: ;print byte in A as a decimal number
|
||||||
pha
|
pha
|
||||||
sta temp_bin ;save
|
sta temp_bin ;save
|
||||||
@ -294,6 +348,9 @@ dhcp_msg:
|
|||||||
init_msg:
|
init_msg:
|
||||||
.byte " INITIALIZING ",0
|
.byte " INITIALIZING ",0
|
||||||
|
|
||||||
|
arp_cache_header:
|
||||||
|
.byte " MEM MAC IP",13,0
|
||||||
|
|
||||||
failed_msg:
|
failed_msg:
|
||||||
.byte "FAILED", 0
|
.byte "FAILED", 0
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ get_current_byte: .res 4
|
|||||||
|
|
||||||
;on entry, AX should point to the list of null terminated option strings to be selected from
|
;on entry, AX should point to the list of null terminated option strings to be selected from
|
||||||
;on exit, AX points to the selected string
|
;on exit, AX points to the selected string
|
||||||
|
;carry is set of QUIT was selected, clear otherwise
|
||||||
select_option_from_menu:
|
select_option_from_menu:
|
||||||
|
|
||||||
stax options_table_pointer
|
stax options_table_pointer
|
||||||
@ -261,6 +262,9 @@ select_option_from_menu:
|
|||||||
sec
|
sec
|
||||||
sbc #$e1
|
sbc #$e1
|
||||||
bcc @get_keypress ;if we have underflowed, it wasn't a valid option
|
bcc @get_keypress ;if we have underflowed, it wasn't a valid option
|
||||||
|
cmp #$10 ;Q
|
||||||
|
beq @quit
|
||||||
|
|
||||||
cmp #OPTIONS_PER_PAGE-1
|
cmp #OPTIONS_PER_PAGE-1
|
||||||
beq @got_valid_option
|
beq @got_valid_option
|
||||||
bpl @get_keypress ;if we have underflowed, it wasn't a valid option
|
bpl @get_keypress ;if we have underflowed, it wasn't a valid option
|
||||||
@ -277,9 +281,12 @@ select_option_from_menu:
|
|||||||
|
|
||||||
jsr @move_to_current_option
|
jsr @move_to_current_option
|
||||||
ldax get_current_byte+1
|
ldax get_current_byte+1
|
||||||
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@quit:
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
|
||||||
@forward_one_page:
|
@forward_one_page:
|
||||||
clc
|
clc
|
||||||
@ -322,6 +329,6 @@ select_option_from_menu:
|
|||||||
.rodata
|
.rodata
|
||||||
select_from_following_options: .byte "SELECT ONE OF THE FOLLOWING OPTIONS:",13,0
|
select_from_following_options: .byte "SELECT ONE OF THE FOLLOWING OPTIONS:",13,0
|
||||||
navigation_instructions: .byte 13,"ARROW KEYS NAVIGATE BETWEEN MENU PAGES",13
|
navigation_instructions: .byte 13,"ARROW KEYS NAVIGATE BETWEEN MENU PAGES",13
|
||||||
.byte "/ TO JUMP ",13
|
.byte "/ TO JUMP or Q to QUIT",13
|
||||||
.byte 0
|
.byte 0
|
||||||
jump_to_prompt: .byte "JUMP TO:",0
|
jump_to_prompt: .byte "JUMP TO:",0
|
||||||
|
@ -6,10 +6,11 @@
|
|||||||
.export arp_lookup
|
.export arp_lookup
|
||||||
.export arp_process
|
.export arp_process
|
||||||
.export arp_add
|
.export arp_add
|
||||||
|
.export arp_calculate_gateway_mask
|
||||||
.export arp_ip
|
.export arp_ip
|
||||||
.export arp_mac
|
.export arp_mac
|
||||||
.export arp_cache
|
.export arp_cache
|
||||||
|
.exportzp ac_size
|
||||||
|
|
||||||
.import eth_inp
|
.import eth_inp
|
||||||
.import eth_inp_len
|
.import eth_inp_len
|
||||||
@ -29,7 +30,6 @@
|
|||||||
.import timer_read
|
.import timer_read
|
||||||
.import timer_timeout
|
.import timer_timeout
|
||||||
|
|
||||||
|
|
||||||
.segment "IP65ZP" : zeropage
|
.segment "IP65ZP" : zeropage
|
||||||
|
|
||||||
ap: .res 2
|
ap: .res 2
|
||||||
@ -82,10 +82,13 @@ arp_init:
|
|||||||
lda #0
|
lda #0
|
||||||
|
|
||||||
ldx #(6+4)*ac_size - 1 ; clear cache
|
ldx #(6+4)*ac_size - 1 ; clear cache
|
||||||
: sta arp_cache,x
|
:
|
||||||
|
sta arp_cache,x
|
||||||
dex
|
dex
|
||||||
bpl :-
|
bpl :-
|
||||||
|
|
||||||
|
arp_calculate_gateway_mask:
|
||||||
|
|
||||||
lda #$ff ; counter for netmask length - 1
|
lda #$ff ; counter for netmask length - 1
|
||||||
sta gw_last
|
sta gw_last
|
||||||
|
|
||||||
@ -222,9 +225,9 @@ arp_lookup:
|
|||||||
; find arp_ip in the cache
|
; find arp_ip in the cache
|
||||||
; clc returns pointer to entry in (ap)
|
; clc returns pointer to entry in (ap)
|
||||||
findip:
|
findip:
|
||||||
|
|
||||||
ldax #arp_cache
|
ldax #arp_cache
|
||||||
stax ap
|
stax ap
|
||||||
|
|
||||||
ldx #ac_size
|
ldx #ac_size
|
||||||
@compare: ; compare cache entry
|
@compare: ; compare cache entry
|
||||||
ldy #ac_ip
|
ldy #ac_ip
|
||||||
@ -354,6 +357,7 @@ arp_add:
|
|||||||
sta (ap),y
|
sta (ap),y
|
||||||
dey
|
dey
|
||||||
bpl :-
|
bpl :-
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@add:
|
@add:
|
||||||
@ -364,18 +368,15 @@ arp_add:
|
|||||||
ac_add_source:
|
ac_add_source:
|
||||||
stax ap
|
stax ap
|
||||||
|
|
||||||
|
|
||||||
ldx #9 ; make space in the arp cache
|
ldx #9 ; make space in the arp cache
|
||||||
:
|
:
|
||||||
|
|
||||||
|
|
||||||
lda arp_cache + 60,x
|
lda arp_cache + 60,x
|
||||||
sta arp_cache + 70,x
|
sta arp_cache + 70,x
|
||||||
lda arp_cache + 50,x
|
lda arp_cache + 50,x
|
||||||
sta arp_cache + 60,x
|
sta arp_cache + 60,x
|
||||||
lda arp_cache + 40,x
|
lda arp_cache + 40,x
|
||||||
sta arp_cache + 50,x
|
sta arp_cache + 50,x
|
||||||
|
|
||||||
lda arp_cache + 30,x
|
lda arp_cache + 30,x
|
||||||
sta arp_cache + 40,x
|
sta arp_cache + 40,x
|
||||||
lda arp_cache + 20,x
|
lda arp_cache + 20,x
|
||||||
|
@ -26,7 +26,7 @@ MAX_DHCP_MESSAGES_SENT=12 ;timeout after sending 12 messages will be about 1
|
|||||||
.import cfg_gateway
|
.import cfg_gateway
|
||||||
.import cfg_dns
|
.import cfg_dns
|
||||||
|
|
||||||
.import arp_init
|
.import arp_calculate_gateway_mask
|
||||||
|
|
||||||
.import ip65_process
|
.import ip65_process
|
||||||
|
|
||||||
@ -407,7 +407,7 @@ dhcp_in:
|
|||||||
|
|
||||||
|
|
||||||
@finished_unpacking_dhcp_options:
|
@finished_unpacking_dhcp_options:
|
||||||
jsr arp_init ;we have modified our netmask, so we need to recalculate gw_test
|
jsr arp_calculate_gateway_mask ;we have modified our netmask, so we need to recalculate gw_test
|
||||||
lda dhcp_state
|
lda dhcp_state
|
||||||
cmp #dhcp_bound
|
cmp #dhcp_bound
|
||||||
beq :+
|
beq :+
|
||||||
@ -462,5 +462,6 @@ send_dhcprequest:
|
|||||||
bcs :+ ;if we didn't send the message we probably need to wait for an ARP reply to come back.
|
bcs :+ ;if we didn't send the message we probably need to wait for an ARP reply to come back.
|
||||||
lda #dhcp_bound ;technically, we should wait till we get a DHCPACK message. but we'll assume success
|
lda #dhcp_bound ;technically, we should wait till we get a DHCPACK message. but we'll assume success
|
||||||
sta dhcp_state
|
sta dhcp_state
|
||||||
|
rts
|
||||||
:
|
:
|
||||||
rts
|
rts
|
||||||
|
@ -6,8 +6,10 @@ AFLAGS=
|
|||||||
|
|
||||||
|
|
||||||
IP65LIB=../ip65/ip65.lib
|
IP65LIB=../ip65/ip65.lib
|
||||||
C64NETLIB=../drivers/c64net.lib
|
|
||||||
APPLE2NETLIB=../drivers/apple2net.lib
|
C64PROGLIB=../drivers/c64prog.lib
|
||||||
|
C64PNB65LIB=../drivers/c64nb65.lib
|
||||||
|
APPLE2PROGLIB=../drivers/apple2prog.lib
|
||||||
|
|
||||||
INCFILES=\
|
INCFILES=\
|
||||||
../inc/common.i\
|
../inc/common.i\
|
||||||
@ -21,10 +23,10 @@ INCFILES=\
|
|||||||
$(AS) $(AFLAGS) $<
|
$(AS) $(AFLAGS) $<
|
||||||
|
|
||||||
%.prg: %.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
%.prg: %.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||||
$(LD) -m $*.map -C ../cfg/c64prg.cfg -o $*.prg $(AFLAGS) $< $(IP65LIB) $(C64NETLIB)
|
$(LD) -m $*.map -vm -C ../cfg/c64prg.cfg -o $*.prg $(AFLAGS) $< $(IP65LIB) $(C64PROGLIB)
|
||||||
|
|
||||||
%.pg2: %.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2bin.cfg
|
%.pg2: %.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||||
$(LD) -m $*.map -C ../cfg/a2bin.cfg -o $*.pg2 $(AFLAGS) $< $(IP65LIB) $(APPLE2NETLIB)
|
$(LD) -C ../cfg/a2bin.cfg -o $*.pg2 $(AFLAGS) $< $(IP65LIB) $(APPLE2PROGLIB)
|
||||||
|
|
||||||
ip65test.dsk: testdns.pg2 testdottedquad.pg2
|
ip65test.dsk: testdns.pg2 testdottedquad.pg2
|
||||||
ripxplore.rb --init BeautifulBoot ip65test.dsk -a testdns.pg2 -t AppleBinary
|
ripxplore.rb --init BeautifulBoot ip65test.dsk -a testdns.pg2 -t AppleBinary
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
.import dns_status
|
.import dns_status
|
||||||
.import cfg_get_configuration_ptr
|
.import cfg_get_configuration_ptr
|
||||||
|
|
||||||
|
|
||||||
.import __CODE_LOAD__
|
.import __CODE_LOAD__
|
||||||
.import __CODE_SIZE__
|
.import __CODE_SIZE__
|
||||||
.import __RODATA_SIZE__
|
.import __RODATA_SIZE__
|
||||||
@ -43,9 +44,9 @@ init:
|
|||||||
|
|
||||||
jsr print_cr
|
jsr print_cr
|
||||||
jsr print_ip_config
|
jsr print_ip_config
|
||||||
|
jsr print_arp_cache
|
||||||
init_ip_via_dhcp
|
init_ip_via_dhcp
|
||||||
|
jsr print_arp_cache
|
||||||
; jsr overwrite_with_hardcoded_dns_server
|
; jsr overwrite_with_hardcoded_dns_server
|
||||||
jsr print_ip_config
|
jsr print_ip_config
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user