mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-16 18:30:26 +00:00
Kernel 0.92
This commit is contained in:
parent
6efb851d03
commit
1d907e3d9a
Binary file not shown.
Binary file not shown.
@ -38,29 +38,29 @@ A2osX.QC.Start1 sei
|
||||
|
||||
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
|
||||
|
||||
jsr A2osX.QC.PrintYA
|
||||
|
||||
.3 jsr MLI
|
||||
.DA #MLISETPREFIX
|
||||
.DA MLISETPREFIX00
|
||||
bcc .4
|
||||
|
||||
>LDYAI MSG.SETPREFIXKO
|
||||
jsr A2osX.QC.PrintAX
|
||||
jsr A2osX.QC.PrintYA
|
||||
>LDYAI A2osX.QC.Prefix
|
||||
jsr A2osX.QC.PrintAX
|
||||
jsr A2osX.QC.PrintYA
|
||||
|
||||
>DEBUG
|
||||
|
||||
bra .3
|
||||
|
||||
.4 >LDYAI MSG.SETPREFIXOK
|
||||
jsr A2osX.QC.PrintAX
|
||||
jsr A2osX.QC.PrintYA
|
||||
|
||||
jsr A2osX.QC.KLoad
|
||||
bcs *
|
||||
@ -71,13 +71,13 @@ A2osX.QC.Start1 sei
|
||||
* jsr SETPWRC
|
||||
|
||||
.8 >LDYAI MSG.INIT1OK
|
||||
jsr A2osX.QC.PrintAX
|
||||
jsr A2osX.QC.PrintYA
|
||||
|
||||
>DEBUGOA
|
||||
jmp $2000
|
||||
*--------------------------------------
|
||||
A2osX.QC.KLoad >LDYAI MSG.KLOAD
|
||||
jsr A2osX.QC.PrintAX
|
||||
jsr A2osX.QC.PrintYA
|
||||
|
||||
ldx A2osX.QC.Prefix
|
||||
|
||||
@ -93,7 +93,7 @@ A2osX.QC.KLoad >LDYAI MSG.KLOAD
|
||||
stx A2osX.QC.Prefix
|
||||
|
||||
>LDYAI A2osX.QC.Prefix
|
||||
jsr A2osX.QC.PrintAX
|
||||
jsr A2osX.QC.PrintYA
|
||||
|
||||
jsr MLI
|
||||
.DA #MLIOPEN
|
||||
@ -121,18 +121,18 @@ A2osX.QC.KLoad >LDYAI MSG.KLOAD
|
||||
|
||||
.9 pha
|
||||
>LDYAI MSG.KLOAD.KO
|
||||
jsr A2osX.QC.PrintAX
|
||||
jsr A2osX.QC.PrintYA
|
||||
pla
|
||||
jsr PRBYTE
|
||||
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
A2osX.QC.PrintAX
|
||||
sta TmpPtr1
|
||||
stx TmpPtr1+1
|
||||
A2osX.QC.PrintYA
|
||||
>STYA TmpPtr1
|
||||
lda (TmpPtr1)
|
||||
tax
|
||||
beq .9
|
||||
|
||||
ldy #1
|
||||
|
||||
.1 lda (TmpPtr1),y
|
||||
|
26
A2osX.S.txt
26
A2osX.S.txt
@ -112,7 +112,9 @@ A2osX.Prefix >LDYAI MSG.BOOTPREFIX
|
||||
bcs *
|
||||
ldx Boot.Prefix
|
||||
stx A2osX.QC.B.Start+4
|
||||
|
||||
ldy #1
|
||||
|
||||
.1 lda Boot.Prefix,y
|
||||
sta A2osX.QC.B.Start+4,y
|
||||
ora #$80
|
||||
@ -160,10 +162,11 @@ A2osX.SetupQC lda RRAMWRAMBNK2
|
||||
A2osX.EnumKM >LDYAI MSG.KMENUM
|
||||
jsr PrintFYA
|
||||
jsr EnumKM
|
||||
|
||||
bcs *
|
||||
*--------------------------------------
|
||||
A2osX.MLIQuit >LDYAI MSG.INIT0OK
|
||||
jsr PrintFYA
|
||||
|
||||
>DEBUGOA
|
||||
jsr MLI
|
||||
.DA #MLIQUIT
|
||||
@ -229,6 +232,7 @@ EnumKM.EL .EQ $27
|
||||
*--------------------------------------
|
||||
EnumKM ldx #0
|
||||
ldy Boot.Prefix
|
||||
|
||||
.1 inx
|
||||
lda SYS,x
|
||||
sta Boot.Prefix+1,y
|
||||
@ -242,7 +246,7 @@ EnumKM ldx #0
|
||||
.DA #MLIOPEN
|
||||
.DA MLIOPEN01
|
||||
bcs .99
|
||||
|
||||
|
||||
lda MLIOPEN01+5
|
||||
sta MLIREAD01+1
|
||||
sta MLICLOSE01+1
|
||||
@ -259,20 +263,27 @@ EnumKM ldx #0
|
||||
|
||||
.3 >LDYA EnumKM.BPTR
|
||||
>STYA TmpPtr1
|
||||
|
||||
lda (TmpPtr1)
|
||||
|
||||
and #$F0 Empty ?
|
||||
beq .5 yes, skip
|
||||
|
||||
and #$C0 anything out of type 1,2 or 3 ?
|
||||
bne .5 yes, skip
|
||||
|
||||
lda (TmpPtr1)
|
||||
and #$0F
|
||||
cmp KM.PREFIX at least enough chars for KM.*?
|
||||
bcc .5 no, skip
|
||||
|
||||
ldy #$10 file type
|
||||
lda (TmpPtr1),y
|
||||
cmp #$06 'BIN'?
|
||||
bne .5 skip
|
||||
|
||||
ldy KM.PREFIX
|
||||
|
||||
.4 lda (TmpPtr1),y
|
||||
cmp KM.PREFIX,y
|
||||
bne .5
|
||||
@ -292,18 +303,19 @@ EnumKM ldx #0
|
||||
bne .3
|
||||
bra .2
|
||||
|
||||
.8 jsr MLI
|
||||
.DA #MLICLOSE
|
||||
.DA MLICLOSE01
|
||||
rts
|
||||
|
||||
.98 cmp #MLI.E.EOF
|
||||
beq .8
|
||||
pha
|
||||
jsr .8
|
||||
pla
|
||||
|
||||
.99 sec
|
||||
rts
|
||||
|
||||
.8 jsr MLI
|
||||
.DA #MLICLOSE
|
||||
.DA MLICLOSE01
|
||||
rts
|
||||
*--------------------------------------
|
||||
EnumKM.EC .BS 1
|
||||
EnumKM.BPTR .BS 2
|
||||
|
@ -26,12 +26,16 @@ CMD.Init >LDYAI 256
|
||||
*--------------------------------------
|
||||
CMD.Quit ldy #CMD.hArgVBuf
|
||||
jsr .8
|
||||
|
||||
ldy #CMD.hCLBuf
|
||||
jsr .8
|
||||
|
||||
ldy #hFileBuf
|
||||
.8 lda (pData),y
|
||||
|
||||
.8 lda (pData),y
|
||||
beq .9
|
||||
>SYSCALL FreeMem
|
||||
clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
* Input : CMD.IntCmd,ZPArgVBuf
|
||||
|
@ -174,15 +174,9 @@ L.ERR.Messages .DA ERR.Messages
|
||||
CS.INIT clc
|
||||
CS.INIT.RTS rts
|
||||
*--------------------------------------
|
||||
CS.RUN lda #'1'
|
||||
>SYSCALL putchar
|
||||
|
||||
jsr CMD.Init
|
||||
CS.RUN jsr CMD.Init
|
||||
bcs CS.INIT.RTS
|
||||
|
||||
lda #'2'
|
||||
>SYSCALL putchar
|
||||
|
||||
ldy #S.PS.ARGC
|
||||
lda (pPS),y
|
||||
beq .1 no arg, continue starting interactive
|
||||
|
@ -15,12 +15,10 @@ PS.ArgV .BS 2
|
||||
* ## RETURN VALUE
|
||||
* A = Child PSID
|
||||
*\--------------------------------------
|
||||
K.ExecL >DEBUG
|
||||
sty .1+1
|
||||
K.ExecL sty .1+1
|
||||
sta .2+1
|
||||
>PULLB PS.Flags
|
||||
lda #'1'
|
||||
>SYSCALL putchar
|
||||
|
||||
>LDYAI 256
|
||||
jsr K.GetMem
|
||||
bcs .99
|
||||
@ -34,8 +32,6 @@ K.ExecL >DEBUG
|
||||
jsr K.Args2ArgV
|
||||
|
||||
bcs .9
|
||||
lda #'2'
|
||||
>SYSCALL putchar
|
||||
|
||||
jsr PS.Exec
|
||||
|
||||
|
@ -11,6 +11,7 @@ HEXBUF .EQ FAC
|
||||
K.PrintF.PadL .EQ FAC+4
|
||||
K.PrintF.PadC .EQ FAC+5
|
||||
BCDBUF .EQ ARG
|
||||
HEXBUF.Signed .EQ ARG.SIGN
|
||||
*/--------------------------------------
|
||||
* # PutChar
|
||||
* Print A (char) to StdOut
|
||||
@ -332,20 +333,25 @@ PrintF.B.1 ldx #8
|
||||
PrintF.I sec signed short
|
||||
.HS 90 BCC
|
||||
PrintF.D clc unsigned short (BYTE)
|
||||
ldx #0 one byte
|
||||
|
||||
ror HEXBUF.Signed
|
||||
|
||||
jsr PrintF.GetByte
|
||||
bcs PrintF.BB.RTS
|
||||
sta HEXBUF
|
||||
|
||||
stz HEXBUF+1
|
||||
|
||||
ldx #0 one byte
|
||||
|
||||
bra PrintF.DD.1
|
||||
|
||||
PrintF.II sec signed int
|
||||
.HS 90 BCC
|
||||
PrintF.DD clc unsigned int (WORD)
|
||||
ldx #1 two bytes
|
||||
|
||||
|
||||
ror HEXBUF.Signed
|
||||
|
||||
jsr PrintF.GetByte
|
||||
bcs PrintF.BB.RTS
|
||||
sta HEXBUF
|
||||
@ -354,6 +360,8 @@ PrintF.DD clc unsigned int (WORD)
|
||||
bcs PrintF.BB.RTS
|
||||
sta HEXBUF+1
|
||||
|
||||
ldx #1 two bytes
|
||||
|
||||
PrintF.DD.1 stz HEXBUF+2
|
||||
stz HEXBUF+3
|
||||
bra PrintF.U.1
|
||||
@ -362,6 +370,8 @@ PrintF.L sec signed long
|
||||
.HS 90 BCC
|
||||
PrintF.U clc unsigned long (DWORD)
|
||||
|
||||
ror HEXBUF.Signed
|
||||
|
||||
ldx #$ff
|
||||
|
||||
.1 jsr PrintF.GetByte
|
||||
@ -374,12 +384,14 @@ PrintF.U clc unsigned long (DWORD)
|
||||
|
||||
* ldx #3 4 bytes
|
||||
|
||||
PrintF.U.1 bcc PrintF.Hex2Dec unsigned, nothing to check
|
||||
PrintF.U.1 clc
|
||||
bit HEXBUF.Signed
|
||||
bpl PrintF.Hex2Dec unsigned, nothing to check
|
||||
|
||||
lda HEXBUF,x get sign
|
||||
bpl PrintF.Hex2Dec
|
||||
|
||||
* sec
|
||||
|
||||
sec
|
||||
|
||||
ldy #0
|
||||
|
||||
@ -395,7 +407,7 @@ PrintF.U.1 bcc PrintF.Hex2Dec unsigned, nothing to check
|
||||
*--------------------------------------
|
||||
* Convert HEXBUF to ASCBUF decimal padded with 0
|
||||
*--------------------------------------
|
||||
PrintF.Hex2Dec ror .31+1
|
||||
PrintF.Hex2Dec ror HEXBUF.Signed
|
||||
|
||||
ldx #4
|
||||
|
||||
@ -425,8 +437,9 @@ PrintF.Hex2Dec ror .31+1
|
||||
|
||||
cld
|
||||
|
||||
.31 bit #$ff SELF MODIFIED -sign to print before digits ?
|
||||
bit HEXBUF.Signed
|
||||
bpl .9
|
||||
|
||||
lda #'-'
|
||||
jsr PrintF.COut
|
||||
|
||||
|
@ -4,7 +4,7 @@ AUTO 4,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF SYS/KM.APPLETALK
|
||||
.TF SYS/ATK/KM.APPLETALK
|
||||
*--------------------------------------
|
||||
.INB INC/MACROS.I
|
||||
.INB INC/IO.I
|
||||
@ -162,5 +162,5 @@ MLIGETPREFIX.PARAMS
|
||||
.DA BUF.PREFIX
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/SYS/ATK/KM.APPLETALK.S
|
||||
SAVE USR/SRC/SYS/KM.APPLETALK.S
|
||||
ASM
|
||||
|
@ -299,5 +299,5 @@ NSCDRV.SIZE .EQ *-NSCDRV.B.START
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/BIN/SYS/KM.NSC.S
|
||||
SAVE USR/SRC/SYS/KM.NSC.S
|
||||
ASM
|
||||
|
@ -377,7 +377,7 @@ RW.BLOCK2.CT .BS 4 Creation time
|
||||
RW.BLOCK2.TB .BS 2 Total Blocks
|
||||
RW.BLOCK2.END .EQ *
|
||||
*--------------------------------------
|
||||
.INB USR/SRC/BIN/X.PRINTF.S
|
||||
.INB USR/SRC/X.PRINTF.S
|
||||
*--------------------------------------
|
||||
RW.MSG .AZ "RAMWorks (I,II,III,z-Ram) Driver For A2osX\n"
|
||||
RW.MSG.OK .AZ "/RAM3 Device Already Installed.\n"
|
||||
@ -662,5 +662,5 @@ RWDRVX.SIZE .EQ RWDRVX.B.END-RWDRVX.B.START
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/BIN/SYS/KM.RAMWORKS.S
|
||||
SAVE USR/SRC/SYS/KM.RAMWORKS.S
|
||||
ASM
|
||||
|
@ -225,4 +225,4 @@ X.DigitCount .BS 1
|
||||
X.DigitBuffer .BS 6
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/BIN/X.PRINTF.S
|
||||
SAVE USR/SRC/X.PRINTF.S
|
||||
|
Loading…
x
Reference in New Issue
Block a user