mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-27 18:30:51 +00:00
239 lines
4.6 KiB
Plaintext
239 lines
4.6 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.BOOT
|
||
DELETE A2OSX.SYSTEM
|
||
PREFIX /A2OSX.SRC
|
||
NEW
|
||
INC 1
|
||
AUTO 8
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
* ****** START OF MLI QUIT CODE ******
|
||
* Load Address :$1000-$12FF
|
||
*--------------------------------------
|
||
MLIOPEN00.PATH .EQ $200
|
||
MLIOPEN00.BUFF .EQ $0C00 1k Buffer for MLI open
|
||
MLIREAD00.ADDR .EQ $2000 for loading KERNEL
|
||
MLIREAD01.ADDR .EQ A2osX.HZ for loading CONFIG
|
||
*--------------------------------------
|
||
.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
|
||
|
||
ldx #$17
|
||
.1 stz MEMTABL,x Reset ProDOS memory bitmap
|
||
dex
|
||
bpl .1
|
||
lda #$CF protect zero page, stack and page 1
|
||
sta MEMTABL
|
||
lda #$07
|
||
sta MEMTABL+$17 protect ProDOS & A2osX global page
|
||
|
||
lda #$8C Reset 80 col screen ($0C=FF=HOME)
|
||
jsr $C300
|
||
|
||
>LDAXI MSG.INIT1
|
||
jsr A2osX.QC.PrintAX
|
||
|
||
.3 jsr MLI
|
||
.DA #MLISETPREFIX
|
||
.DA MLISETPREFIX00
|
||
bcc .4
|
||
|
||
>LDAXI MSG.SETPREFIXKO
|
||
jsr A2osX.QC.PrintAX
|
||
>LDAXI A2osX.QC.Prefix
|
||
jsr A2osX.QC.PrintAX
|
||
|
||
>DEBUGOA
|
||
|
||
bra .3
|
||
|
||
.4 >LDAXI MSG.SETPREFIXOK
|
||
jsr A2osX.QC.PrintAX
|
||
|
||
>LDAXI MSG.KLOADING
|
||
jsr A2osX.QC.PrintAX
|
||
|
||
jsr A2osX.QC.KLoad
|
||
bcs .9
|
||
|
||
>LDAXI MSG.CLOADING
|
||
jsr A2osX.QC.PrintAX
|
||
|
||
jsr A2osX.QC.CLoad
|
||
bcc .8
|
||
|
||
>LDAXI MSG.CLOADING.KO
|
||
jsr A2osX.QC.PrintAX
|
||
|
||
ldx #15
|
||
|
||
.5 lda A2OSXCONF.DEFAULT,x
|
||
sta A2osX.HZ,x
|
||
dex
|
||
bpl .5
|
||
|
||
* >LDYAI GO.Reset
|
||
* >STYA POWERUP
|
||
* bit RROMBNK1
|
||
* jsr SETPWRC
|
||
|
||
.8 >LDAXI MSG.INIT1OK
|
||
jsr A2osX.QC.PrintAX
|
||
|
||
>DEBUGOA
|
||
jmp $2000
|
||
|
||
.9 >LDAXI MSG.KLOADING.KO
|
||
jsr A2osX.QC.PrintAX
|
||
bra *
|
||
*--------------------------------------
|
||
A2osX.QC.KLoad >LDYAI SYSKERNEL
|
||
jsr A2osX.QC.FOPENYA
|
||
bcs .9
|
||
|
||
>LDYAI MLIREAD00K
|
||
jsr A2osX.QC.FREADYA
|
||
|
||
.9 rts
|
||
*--------------------------------------
|
||
A2osX.QC.CLoad >LDYAI A2OSXCONF
|
||
jsr A2osX.QC.FOPENYA
|
||
bcs .9
|
||
|
||
>LDYAI MLIREAD00C
|
||
jsr A2osX.QC.FREADYA
|
||
|
||
.9 rts
|
||
*--------------------------------------
|
||
A2osX.QC.FOPENYA
|
||
>STYA TmpPtr1
|
||
|
||
ldx A2osX.QC.Prefix
|
||
.1 lda A2osX.QC.Prefix,x
|
||
sta MLIOPEN00.PATH,x
|
||
dex
|
||
bne .1
|
||
|
||
ldx A2osX.QC.Prefix
|
||
ldy #0
|
||
|
||
.2 iny
|
||
lda (TmpPtr1),y
|
||
sta MLIOPEN00.PATH+1,x
|
||
inx
|
||
tya
|
||
cmp (TmpPtr1)
|
||
bne .2
|
||
|
||
stx MLIOPEN00.PATH
|
||
|
||
>LDAXI MLIOPEN00.PATH
|
||
jsr A2osX.QC.PrintAX
|
||
|
||
jsr MLI
|
||
.DA #MLIOPEN
|
||
.DA MLIOPEN00
|
||
bcs .9
|
||
|
||
lda MLIOPEN00+5
|
||
sta MLIREAD00K+1
|
||
sta MLIREAD00C+1
|
||
sta MLICLOSE00+1
|
||
.9 rts
|
||
*--------------------------------------
|
||
A2osX.QC.FREADYA
|
||
>STYA .1
|
||
jsr MLI
|
||
.DA #MLIREAD
|
||
.1 .DA $ffff
|
||
|
||
php
|
||
pha
|
||
|
||
jsr MLI
|
||
.DA #MLICLOSE
|
||
.DA MLICLOSE00
|
||
|
||
pla
|
||
plp
|
||
rts
|
||
*--------------------------------------
|
||
A2osX.QC.PrintAX
|
||
>STAX TmpPtr1
|
||
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 MLIOPEN00.PATH
|
||
.DA MLIOPEN00.BUFF
|
||
.BS 1
|
||
MLIREAD00K .DA #4
|
||
.BS 1
|
||
.DA MLIREAD00.ADDR
|
||
.DA $8000
|
||
.BS 2
|
||
MLIREAD00C .DA #4
|
||
.BS 1
|
||
.DA MLIREAD01.ADDR
|
||
.DA 16
|
||
.BS 2
|
||
MLICLOSE00 .DA #1
|
||
.BS 1
|
||
*--------------------------------------
|
||
SYSKERNEL >PSTR "SYS/KERNEL"
|
||
A2OSXCONF >PSTR "A2osX.CONF"
|
||
*--------------------------------------
|
||
A2OSXCONF.DEFAULT
|
||
.DA #6 60hz
|
||
.BS 7
|
||
.DA #0 ChRoot
|
||
.BS 7 All Slots marked as "Free"
|
||
*--------------------------------------
|
||
MSG.INIT1 >PSTR "A2osX[Stage1]:Init"
|
||
MSG.SETPREFIXOK >PSTR "Set Prefix OK"
|
||
MSG.SETPREFIXKO >PSTR "Insert Vol:"
|
||
MSG.KLOADING >PSTR "Loading Kernel..."
|
||
MSG.KLOADING.KO >PSTR "Error While Loading Kernel."
|
||
MSG.CLOADING >PSTR "Reading Kernel Config File..."
|
||
MSG.CLOADING.KO >PSTR "Error While Reading Kernel Config File, Using Default."
|
||
MSG.INIT1OK >PSTR "A2osX[Stage1]:Complete."
|
||
*--------------------------------------
|
||
.BS $1300-*
|
||
.EP
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE A2OSX.S.QC
|
||
LOAD A2OSX.S
|
||
ASM
|