fixed bug in in how bin files were relocated after being downloaded via tftp

git-svn-id: http://svn.code.sf.net/p/netboot65/code@6 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
jonnosan 2009-01-10 13:36:52 +00:00
parent 90aa476625
commit 3d07b9c75c
2 changed files with 17 additions and 6 deletions

View File

@ -5,6 +5,7 @@ MEMORY {
HEADER: start = $0000, size = $4, file = %O;
RAM: start = $800, size = $8000, file = %O;
LANGUAGE_CARD: start= $D000, size=$2800, type=rw, define=yes;
PAGE3: start = $301, size = 20;
}
SEGMENTS {
EXEHDR: load = HEADER, type = ro;
@ -15,6 +16,7 @@ SEGMENTS {
BSS: load=LANGUAGE_CARD, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
IP65ZP: load = IP65ZP, type = zp;
PAGE3: load=PAGE3,type=bss;
}

View File

@ -35,9 +35,9 @@
.import __CODE_RUN__
.import __CODE_SIZE__
.bss
.segment "PAGE3"
disable_language_card: .res 3
bin_file_jmp: .res 3
; ------------------------------------------------------------------------
@ -179,14 +179,23 @@ init:
inx
:
stax copy_src
ldy #0
lda (copy_dest+1),y ;currently this is the high byte of the length
ldy #1
lda (copy_dest),y ;currently this is the high byte of the length
tax
dey
lda (copy_dest),y ;currently this is the low byte of the length
jsr copymem
;now make the 'turn off language card' routine
lda #$AD ;$AD=LDA
sta disable_language_card
lda #$82 ;low byte of soft switch
sta disable_language_card+1
lda #$c0 ;high byte of soft switch
sta disable_language_card+2
jsr bin_file_jmp
jmp $3d0
jmp disable_language_card
bad_boot:
jmp $3d0