A2osX/A2osX.S.QC.txt

190 lines
3.6 KiB
Plaintext
Raw Normal View History

2015-03-14 21:48:35 +00:00
NEW
2019-04-30 16:08:47 +00:00
AUTO 3,1
2015-03-14 21:48:35 +00:00
.LIST OFF
*--------------------------------------
* ****** START OF MLI QUIT CODE ******
2016-06-07 06:10:18 +00:00
* Load Address :$1000-$12FF
2015-03-14 21:48:35 +00:00
*--------------------------------------
.PH $1000
*--------------------------------------
2016-06-07 06:10:18 +00:00
* Kernel Stage 1
*--------------------------------------
2015-03-14 21:48:35 +00:00
A2osX.QC.Start .EQ *
A2osX.QC cld
2015-06-03 18:30:57 +00:00
jmp A2osX.QC.Start1
2019-04-30 16:08:47 +00:00
A2osX.QC.BOOT .BS 32
A2osX.QC.ROOT .BS 32
2015-06-03 18:30:57 +00:00
A2osX.QC.Start1 sei
ldx #$FF
txs
cli
bit RROMBNK1
2015-03-14 21:48:35 +00:00
>LDYAI A2osX.QC
>STYA POWERUP
jsr SETPWRC
lda #$01
sta MEMTABL+$17 protect ProDOS MLI Page
ldx #$16
2015-03-14 21:48:35 +00:00
.1 stz MEMTABL,x Reset ProDOS memory bitmap
dex
bne .1
2015-03-14 21:48:35 +00:00
lda #$CF protect zero page, stack and page 1
sta MEMTABL
2018-11-30 16:00:36 +00:00
2015-03-14 21:48:35 +00:00
lda #$8C Reset 80 col screen ($0C=FF=HOME)
jsr $C300
2019-04-30 16:08:47 +00:00
sec
2018-07-12 15:20:39 +00:00
>LDYAI MSG.INIT1
2018-11-30 16:00:36 +00:00
jsr A2osX.QC.PrintYA
2019-05-01 13:35:41 +00:00
sec
>LDYAI A2osX.QC.BOOT
jsr A2osX.QC.PrintYA
sec
>LDYAI A2osX.QC.ROOT
jsr A2osX.QC.PrintYA
2015-03-14 21:48:35 +00:00
.3 jsr MLI
.DA #MLISETPREFIX
2015-03-15 22:00:40 +00:00
.DA MLISETPREFIX00
2015-03-14 21:48:35 +00:00
bcc .4
2018-07-12 15:20:39 +00:00
>LDYAI MSG.SETPREFIXKO
2018-11-30 16:00:36 +00:00
jsr A2osX.QC.PrintYA
2019-04-30 16:08:47 +00:00
>LDYAI A2osX.QC.BOOT
sec
2018-11-30 16:00:36 +00:00
jsr A2osX.QC.PrintYA
2015-06-03 18:30:57 +00:00
2015-03-14 21:48:35 +00:00
bra .3
2018-07-12 15:20:39 +00:00
.4 >LDYAI MSG.SETPREFIXOK
2019-04-30 16:08:47 +00:00
sec
2018-11-30 16:00:36 +00:00
jsr A2osX.QC.PrintYA
2019-04-30 16:08:47 +00:00
ldx A2osX.QC.BOOT
stx $280 For appending SYS/KERNEL
2019-05-01 13:35:41 +00:00
2019-04-30 16:08:47 +00:00
stz $2C0,x
.5 lda A2osX.QC.BOOT,x
sta $280,x
sta $2C0-1,x BOOT sz for KERNEL
dex
bpl .5
ldx A2osX.QC.ROOT
stz $2E0,x
.6 lda A2osX.QC.ROOT,x
sta $2E0-1,x ROOT sz for KERNEL
dex
bpl .6
2019-05-01 13:35:41 +00:00
jsr A2osX.QC.KLoad
bcs *
2018-07-12 15:20:39 +00:00
.8 >LDYAI MSG.INIT1OK
2019-04-30 16:08:47 +00:00
sec
2018-11-30 16:00:36 +00:00
jsr A2osX.QC.PrintYA
2015-06-03 18:30:57 +00:00
2019-05-01 13:35:41 +00:00
* >LDYAI GO.Reset
* >STYA POWERUP
* bit RROMBNK1
* jsr SETPWRC
>DEBUGOA
2016-06-07 06:10:18 +00:00
jmp $2000
*--------------------------------------
2018-07-12 15:20:39 +00:00
A2osX.QC.KLoad >LDYAI MSG.KLOAD
2019-04-30 16:08:47 +00:00
clc
2018-11-30 16:00:36 +00:00
jsr A2osX.QC.PrintYA
2019-05-01 13:35:41 +00:00
2019-04-30 16:08:47 +00:00
ldx $280
2015-03-14 21:48:35 +00:00
ldy #0
.2 inx
iny
lda SYSKERNEL,y
2019-04-30 16:08:47 +00:00
sta $280,x
cpy SYSKERNEL
2015-03-14 21:48:35 +00:00
bne .2
2019-04-30 16:08:47 +00:00
stx $280
>LDYAI $280
clc
2018-11-30 16:00:36 +00:00
jsr A2osX.QC.PrintYA
2015-03-14 21:48:35 +00:00
jsr MLI
.DA #MLIOPEN
2019-04-10 15:51:47 +00:00
.DA MLIOPENK
2015-03-14 21:48:35 +00:00
bcs .9
2019-04-10 15:51:47 +00:00
lda MLIOPENK+5
sta MLIREADK+1
sta MLICLOSEK+1
2015-03-14 21:48:35 +00:00
jsr MLI
.DA #MLIREAD
2019-04-10 15:51:47 +00:00
.DA MLIREADK
php
pha
2015-03-14 21:48:35 +00:00
jsr MLI
.DA #MLICLOSE
2019-04-10 15:51:47 +00:00
.DA MLICLOSEK
2015-03-14 21:48:35 +00:00
pla
plp
2018-11-30 07:42:49 +00:00
bcc .8
.9 pha
2018-07-12 15:20:39 +00:00
>LDYAI MSG.KLOAD.KO
2019-04-30 16:08:47 +00:00
clc
2018-11-30 16:00:36 +00:00
jsr A2osX.QC.PrintYA
2018-11-30 07:42:49 +00:00
pla
jsr PRBYTE
2019-04-30 16:08:47 +00:00
sec
2018-11-30 07:42:49 +00:00
.8 rts
2015-03-14 21:48:35 +00:00
*--------------------------------------
2018-11-30 16:00:36 +00:00
A2osX.QC.PrintYA
2019-04-30 16:08:47 +00:00
php
2018-11-30 16:00:36 +00:00
>STYA TmpPtr1
2015-03-14 21:48:35 +00:00
lda (TmpPtr1)
tax
beq .9
2018-11-30 16:00:36 +00:00
2015-03-14 21:48:35 +00:00
ldy #1
.1 lda (TmpPtr1),y
ora #$80
jsr COUT
iny
dex
bne .1
2019-11-27 22:04:55 +00:00
2019-04-30 16:08:47 +00:00
.9 plp
bcc .99
jsr CROUT
2019-10-03 06:25:27 +00:00
.99 rts
2015-03-14 21:48:35 +00:00
*--------------------------------------
2015-03-15 22:00:40 +00:00
MLISETPREFIX00 .DA #1
2019-04-30 16:08:47 +00:00
.DA A2osX.QC.BOOT
*--------------------------------------
2019-04-10 15:51:47 +00:00
MLIOPENK .DA #3
2019-04-30 16:08:47 +00:00
.DA $280
.DA $C00
2015-03-14 21:48:35 +00:00
.BS 1
*--------------------------------------
2019-04-10 15:51:47 +00:00
MLIREADK .DA #4
2015-03-14 21:48:35 +00:00
.BS 1
.DA $2000
2017-01-12 17:43:45 +00:00
.DA $8000
2015-03-14 21:48:35 +00:00
.BS 2
*--------------------------------------
2019-04-10 15:51:47 +00:00
MLICLOSEK .DA #1
2015-03-14 21:48:35 +00:00
.BS 1
*--------------------------------------
2019-11-27 22:04:55 +00:00
SYSKERNEL >PSTR "sys/kernel"
2015-03-14 21:48:35 +00:00
*--------------------------------------
MSG.INIT1 >PSTR "A2osX[Stage1]:Init"
MSG.SETPREFIXOK >PSTR "Set Prefix OK"
MSG.SETPREFIXKO >PSTR "Insert Vol:"
2019-04-30 16:08:47 +00:00
MSG.KLOAD >PSTR "Loading Kernel:"
MSG.KLOAD.KO >PSTR "Error While Loading Kernel."
MSG.INIT1OK >PSTR "A2osX[Stage1]:Complete."
2015-03-14 21:48:35 +00:00
*--------------------------------------
2016-06-07 06:10:18 +00:00
.BS $1300-*
2015-03-14 21:48:35 +00:00
.EP
*--------------------------------------
MAN
2018-11-30 07:42:49 +00:00
SAVE USR/SRC/A2OSX.S.QC
LOAD USR/SRC/A2OSX.S
2015-03-14 21:48:35 +00:00
ASM