1
0
mirror of https://github.com/pfusik/xasm.git synced 2024-11-08 14:09:37 +00:00
xasm/xbootstd.asx
2013-01-07 12:07:27 +01:00

69 lines
931 B
Plaintext

* Boot executable file loader coded by Fox/Taquart
* Standard loader - ROM and interrupts enabled.
opt h-
org $780
bufr equ $700
tp equ $43
vc equ $44
* Boot header
boot equ *
rts rts
dta b(1),a(boot,$e477)
* Print text
txtpos equ 215
ldy #txtpos
print mva text-txtpos,y ($58),y+
cpy #txtpos+txtlen
bcc print
* Init run vector
mwa #rts $2e0
mva >bufr $305
mvy #$ff ^31
dey #$fe
* Load header
lhead mwa #rts $2e2
ldx <-5
* Store byte of header
hput sta vc+4,x+
stx tp
jmp get
next inw vc
get iny
bpl getx
inw $30a
jsr $e453
sec
bmi rts
ldy #0
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)
text dta d'Loading... '
txtlen equ *-text
* This will be added at the end of loaded file
opt h+
org endseq
jmp ($2e0)
end