A2osX/A2osX.S.QC.txt

213 lines
4.1 KiB
Plaintext
Raw Normal View History

2015-03-14 21:48:35 +00:00
PR#3
2015-06-03 18:30:57 +00:00
PREFIX /A2OSX.SRC
2015-03-14 21:48:35 +00:00
NEW
INC 1
AUTO 6
.LIST OFF
.OP 65C02
*--------------------------------------
* ****** START OF MLI QUIT CODE ******
* Load Address :$1000-$11FF
* setup $BE00 Global page :
* Copy from $1200 to $BE00
*--------------------------------------
2015-03-15 22:00:40 +00:00
MLIOPEN00.PATH .EQ $200
MLIOPEN00.BUFF .EQ $0C00 1k Buffer for MLI open
MLIREAD00.ADDR .EQ $2000 for loading kernel.bin before moving to LC1
2015-03-14 21:48:35 +00:00
*--------------------------------------
A2osX.QC.B.Start
.PH $1000
*--------------------------------------
A2osX.QC.Start .EQ *
A2osX.QC cld
2015-06-03 18:30:57 +00:00
jmp A2osX.QC.Start1
A2osX.QC.Prefix .BS 32
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
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 #$03
sta MEMTABL+$17 protect ProDOS & A2osX global page
lda #$8C Reset 80 col screen ($0C=FF=HOME)
jsr $C300
>LDAXI MSG.STAGE1
jsr A2osX.QC.PrintAX
ldx #0
.2 lda $1200,x Setup Global Page
sta $BE00,x
inx
bne .2
.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
2015-06-03 18:30:57 +00:00
2015-03-14 21:48:35 +00:00
>LDAXI MSG.SETPREFIXKO
jsr A2osX.QC.PrintAX
>LDAXI A2osX.QC.Prefix
jsr A2osX.QC.PrintAX
2015-06-03 18:30:57 +00:00
2015-03-14 21:48:35 +00:00
>DEBUG
2015-06-03 18:30:57 +00:00
2015-03-14 21:48:35 +00:00
bra .3
.4 >LDAXI MSG.SETPREFIXOK
jsr A2osX.QC.PrintAX
>LDAXI MSG.KLOADING
jsr A2osX.QC.PrintAX
jsr A2osX.QC.KLoad
bcs .9
>LDYAI GO.Reset
>STYA POWERUP
2015-06-03 18:30:57 +00:00
bit RROMBNK1
2015-03-14 21:48:35 +00:00
jsr SETPWRC
2015-06-03 18:30:57 +00:00
>LDAXI MSG.STAGE1OK
jsr A2osX.QC.PrintAX
>DEBUG
jmp (POWERUP)
2015-03-14 21:48:35 +00:00
.9 >LDAXI MSG.KLOADING.KO
jsr A2osX.QC.PrintAX
bra *
*--------------------------------------
A2osX.QC.KLoad ldx A2osX.QC.Prefix
.1 lda A2osX.QC.Prefix,x
2015-03-15 22:00:40 +00:00
sta MLIOPEN00.PATH,x
2015-03-14 21:48:35 +00:00
dex
bne .1
ldx A2osX.QC.Prefix
ldy #0
.2 lda SYSKERNEL+1,y
2015-03-15 22:00:40 +00:00
sta MLIOPEN00.PATH+1,x
2015-03-14 21:48:35 +00:00
inx
iny
cpy SYSKERNEL
bne .2
2015-03-15 22:00:40 +00:00
stx MLIOPEN00.PATH
2015-03-14 21:48:35 +00:00
2015-03-15 22:00:40 +00:00
>LDAXI MLIOPEN00.PATH
2015-03-14 21:48:35 +00:00
jsr A2osX.QC.PrintAX
jsr MLI
.DA #MLIOPEN
2015-03-15 22:00:40 +00:00
.DA MLIOPEN00
2015-03-14 21:48:35 +00:00
bcs .9
2015-03-15 22:00:40 +00:00
lda MLIOPEN00+5
sta MLIREAD00+1
sta MLICLOSE00+1
2015-03-14 21:48:35 +00:00
jsr MLI
.DA #MLIREAD
2015-03-15 22:00:40 +00:00
.DA MLIREAD00
2015-03-14 21:48:35 +00:00
bcs .9
jsr MLI
.DA #MLICLOSE
2015-03-15 22:00:40 +00:00
.DA MLICLOSE00
2015-03-14 21:48:35 +00:00
bcs .9
php
sei
sta SETALTZP
lda RRAMWRAMBNK1
lda RRAMWRAMBNK1
2015-06-03 18:30:57 +00:00
>LDYAI MLIREAD00.ADDR+$2F00
2015-03-14 21:48:35 +00:00
>STYA TmpPtr1
2015-06-03 18:30:57 +00:00
>LDYAI $D000+$2F00
2015-03-14 21:48:35 +00:00
>STYA TmpPtr2
2015-06-03 18:30:57 +00:00
ldx #$30
2015-03-14 21:48:35 +00:00
ldy #$F9 do not trash NMI,BRK,IRQ Vectors
.3 lda (TmpPtr1),y
sta (TmpPtr2),y
dey
cpy #$FF
bne .3
dec TmpPtr1+1
dec TmpPtr2+1
dex
bne .3
lda RROMBNK1
sta CLRALTZP
plp
clc
.9 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
*--------------------------------------
2015-03-15 22:00:40 +00:00
MLISETPREFIX00 .DA #1
2015-03-14 21:48:35 +00:00
.DA A2osX.QC.Prefix
2015-03-15 22:00:40 +00:00
MLIOPEN00 .DA #3
.DA MLIOPEN00.PATH
.DA MLIOPEN00.BUFF
2015-03-14 21:48:35 +00:00
.BS 1
2015-03-15 22:00:40 +00:00
MLIREAD00 .DA #4
2015-03-14 21:48:35 +00:00
.BS 1
2015-03-15 22:00:40 +00:00
.DA MLIREAD00.ADDR
2015-06-03 18:30:57 +00:00
.DA $2FFA
2015-03-14 21:48:35 +00:00
.BS 2
2015-03-15 22:00:40 +00:00
MLICLOSE00 .DA #1
2015-03-14 21:48:35 +00:00
.BS 1
*--------------------------------------
SYSKERNEL >PSTRING "SYS/KERNEL"
*--------------------------------------
MSG.STAGE1 >PSTRING "A2osX[Stage1]:Init"
MSG.SETPREFIXOK >PSTRING "Set Prefix OK"
MSG.SETPREFIXKO >PSTRING "Insert Vol:"
MSG.KLOADING >PSTRING "Loading Kernel..."
MSG.KLOADING.KO >PSTRING "Error While Loading Kernel."
MSG.STAGE1OK >PSTRING "A2osX[Stage1]:Complete."
*--------------------------------------
A2osX.QC.END .EQ *
A2osX.QC.SIZE .EQ A2osX.QC.END-A2osX.QC.START
.BS $200-A2osX.QC.SIZE
.EP
*--------------------------------------
MAN
SAVE A2OSX.S.QC
LOAD A2OSX.S
ASM