A2osX/A2osX.S.QC.txt
2018-08-08 17:13:37 +02:00

178 lines
3.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
PREFIX /A2OSX.BUILD
AUTO 4,1
.LIST OFF
*--------------------------------------
* ****** START OF MLI QUIT CODE ******
* Load Address :$1000-$12FF
*--------------------------------------
.PH $1000
*--------------------------------------
* Kernel Stage 1
*--------------------------------------
A2osX.QC.Start .EQ *
A2osX.QC cld
jmp A2osX.QC.Start1
A2osX.QC.Prefix .BS 64
A2osX.QC.Start1 sei
ldx #$FF
txs
cli
bit RROMBNK1
>LDYAI A2osX.QC
>STYA POWERUP
jsr SETPWRC
lda #$01
sta MEMTABL+$17 protect ProDOS MLI Page
ldx #$16
.1 stz MEMTABL,x Reset ProDOS memory bitmap
dex
bne .1
lda #$CF protect zero page, stack and page 1
sta MEMTABL
lda #$8C Reset 80 col screen ($0C=FF=HOME)
jsr $C300
>LDYAI MSG.INIT1
jsr A2osX.QC.PrintAX
.3 jsr MLI
.DA #MLISETPREFIX
.DA MLISETPREFIX00
bcc .4
>LDYAI MSG.SETPREFIXKO
jsr A2osX.QC.PrintAX
>LDYAI A2osX.QC.Prefix
jsr A2osX.QC.PrintAX
>DEBUG
bra .3
.4 >LDYAI MSG.SETPREFIXOK
jsr A2osX.QC.PrintAX
jsr A2osX.QC.KLoad
bcs *
* >LDYAI GO.Reset
* >STYA POWERUP
* bit RROMBNK1
* jsr SETPWRC
.8 >LDYAI MSG.INIT1OK
jsr A2osX.QC.PrintAX
>DEBUGOA
jmp $2000
*--------------------------------------
A2osX.QC.KLoad >LDYAI MSG.KLOAD
jsr A2osX.QC.PrintAX
ldx A2osX.QC.Prefix
ldy #0
.2 inx
iny
lda SYSKERNEL,y
sta A2osX.QC.Prefix,x
cpy SYSKERNEL
bne .2
stx A2osX.QC.Prefix
>LDYAI A2osX.QC.Prefix
jsr A2osX.QC.PrintAX
jsr MLI
.DA #MLIOPEN
.DA MLIOPEN00
bcs .9
lda MLIOPEN00+5
sta MLIREAD00+1
sta MLICLOSE00+1
jsr MLI
.DA #MLIREAD
.DA MLIREAD00
php
pha
jsr MLI
.DA #MLICLOSE
.DA MLICLOSE00
pla
plp
bcc .9
>LDYAI MSG.KLOAD.KO
jsr A2osX.QC.PrintAX
.9 rts
*--------------------------------------
A2osX.QC.PrintAX
sta TmpPtr1
stx TmpPtr1+1
lda (TmpPtr1)
tax
beq .9
ldy #1
.1 lda (TmpPtr1),y
ora #$80
jsr COUT
iny
dex
bne .1
.9 jsr CROUT
rts
*--------------------------------------
MLISETPREFIX00 .DA #1
.DA A2osX.QC.Prefix
*--------------------------------------
MLIOPEN00 .DA #3
.DA A2osX.QC.Prefix
.DA $C00
.BS 1
*--------------------------------------
MLIREAD00 .DA #4
.BS 1
.DA $2000
.DA $8000
.BS 2
*--------------------------------------
MLICLOSE00 .DA #1
.BS 1
*--------------------------------------
SYSKERNEL >PSTR "SYS/KERNEL"
*--------------------------------------
MSG.INIT1 >PSTR "A2osX[Stage1]:Init"
MSG.SETPREFIXOK >PSTR "Set Prefix OK"
MSG.SETPREFIXKO >PSTR "Insert Vol:"
MSG.KLOAD >PSTR "Loading Kernel..."
MSG.KLOAD.KO >PSTR "Error While Loading Kernel."
MSG.INIT1OK >PSTR "A2osX[Stage1]:Complete."
*--------------------------------------
.BS $1300-*
.EP
*--------------------------------------
MAN
SAVE /A2OSX.SRC/A2OSX.S.QC
LOAD /A2OSX.SRC/A2OSX.S
ASM