1998-08-13 11:37:32 +00:00
|
|
|
* Boot executable file loader coded by Fox/Taquart
|
|
|
|
* Version for professionals - can load file under ROM.
|
|
|
|
* Note interrupts and ROM are disabled when running loaded program.
|
|
|
|
|
1998-11-22 20:15:00 +00:00
|
|
|
opt h-
|
1998-08-13 11:37:32 +00:00
|
|
|
org $480
|
|
|
|
|
|
|
|
bufr equ $400
|
|
|
|
|
|
|
|
tp equ $43
|
|
|
|
vc equ $44
|
|
|
|
|
|
|
|
* Boot header
|
|
|
|
boot equ *
|
|
|
|
rts rts
|
|
|
|
dta b(1),a(boot,$e477)
|
|
|
|
* Nice blank screen
|
1998-11-22 20:15:00 +00:00
|
|
|
mva #0 $22f
|
|
|
|
mva #$52 $2c8
|
1998-08-13 11:37:32 +00:00
|
|
|
lda 20
|
|
|
|
cmp 20
|
|
|
|
beq *-2
|
|
|
|
* Init run vector
|
1998-11-22 20:15:00 +00:00
|
|
|
mwa #rts $2e0
|
1998-08-13 11:37:32 +00:00
|
|
|
ldy #$fe
|
|
|
|
* Load header
|
1998-11-22 20:15:00 +00:00
|
|
|
lhead mwa #rts $2e2
|
1998-08-13 11:37:32 +00:00
|
|
|
ldx <-5
|
|
|
|
* Store byte of header
|
1998-11-22 20:15:00 +00:00
|
|
|
hput sta vc+4,x+
|
1998-08-13 11:37:32 +00:00
|
|
|
stx tp
|
|
|
|
jmp get
|
|
|
|
next inw vc
|
|
|
|
get iny
|
|
|
|
bpl getx
|
|
|
|
inw $30a
|
1998-11-22 20:15:00 +00:00
|
|
|
mva #$ff ^31
|
1998-08-13 11:37:32 +00:00
|
|
|
lsr ^4e
|
|
|
|
cli
|
|
|
|
jsr $e453
|
|
|
|
sec
|
|
|
|
bmi rts
|
|
|
|
sei
|
1998-11-22 20:15:00 +00:00
|
|
|
mvy #0 ^4e
|
1998-08-13 11:37:32 +00:00
|
|
|
dec ^31
|
|
|
|
getx lda bufr,y
|
|
|
|
ldx tp
|
|
|
|
bne hput
|
|
|
|
sta (vc,x)
|
|
|
|
lda vc
|
|
|
|
cmp vc+2
|
|
|
|
bne next
|
|
|
|
lda vc+1
|
|
|
|
cmp vc+3
|
|
|
|
bne next
|
|
|
|
endseq tya
|
|
|
|
pha
|
|
|
|
jsr init
|
|
|
|
pla
|
|
|
|
tay
|
|
|
|
bpl lhead !
|
|
|
|
|
|
|
|
init jmp ($2e2)
|
|
|
|
|
|
|
|
* This will be added at the end of loaded file
|
1998-11-22 20:15:00 +00:00
|
|
|
opt h+
|
1998-08-13 11:37:32 +00:00
|
|
|
org endseq
|
|
|
|
jmp ($2e0)
|
|
|
|
|
|
|
|
end
|