Post by VDC 8x2 on Jun 16, 2014 20:16:33 GMT
This should be the final version of the LINKER.
JSETBANK = $f73f
ModStart = $1300
jsradd0 = $0ae2
jsrbank0 = $0ada
LDfile = $2000
NormIrq = $2003
Err_Msg = $2006
*=$1000
start lda #%01001110 ;custom bank1
sta $ff00
Linker lda $0f11
bne @skip
lda $0f12
sta $08ee
lda #$01
sta $0f12
@skip jsr NormIrq
lda #$00
sta $0bfc
@uhoh ldx $0f11
lda lo_byte,x
sta $a6 ;was 31a0
lda hi_byte,x
sta $a7 ;was 31a2
lda length,x
pha
lda #$00 ;load bank
ldx #$01 ;filename bank
jsr JSETBANK
ldx #$00
ldy #$08
pla
jsr LDfile
beq @itsago
jsr Err_Msg ;error message
jmp @uhoh
@itsago lda #<ModStart
sta jsradd0
lda #>ModStart
sta jsradd0+1
jsr jsrbank0
jmp Linker
filename00 text "GEN"
filename01 text "DUNGEON"
filename02 text "COMBAT"
filename03 text "INIT"
filename04 text "COM.PREP"
filename05 text "POST.COM"
filename06 text "FINAL"
filename07 text "CAMP"
length byte $03,$07,$06,$04,$08,$08,$05,$04
lo_byte bytes <filename00*1,<filename01*1,<filename02*1,<filename03*1
bytes <filename04*1,<filename05*1,<filename06*1,<filename07*1
Hi_byte bytes >filename00*1,>filename01*1,>filename02*1,>filename03*1
bytes >filename04*1,>filename05*1,>filename06*1,>filename07*1