mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-03 05:29:38 +00:00
Kernel 0.92+
This commit is contained in:
parent
4988ec02fc
commit
e813c58973
Binary file not shown.
|
@ -11,8 +11,14 @@ AUTO 4,1
|
||||||
.INB INC/MLI.I
|
.INB INC/MLI.I
|
||||||
.INB INC/MLI.E.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPTR1 .EQ ZPBIN
|
.DUMMY
|
||||||
ZPBufPtr .EQ ZPBIN+2
|
.OR ZPBIN
|
||||||
|
ZS.START
|
||||||
|
ZPPTR1 .BS 2
|
||||||
|
ZPBufPtr .BS 2
|
||||||
|
BytesRead .BS 1
|
||||||
|
ByteIndex .BS 1
|
||||||
|
ZS.END .ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* File Header (16 Bytes)
|
* File Header (16 Bytes)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -25,7 +31,7 @@ CS.START cld
|
||||||
.DA CS.END-CS.START CS
|
.DA CS.END-CS.START CS
|
||||||
.DA DS.END-DS.START DS
|
.DA DS.END-DS.START DS
|
||||||
.DA #16 SS
|
.DA #16 SS
|
||||||
.DA #4 ZP
|
.DA #ZS.END-ZS.START Zero Page Size
|
||||||
.DA 0
|
.DA 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Relocation Table
|
* Relocation Table
|
||||||
|
@ -35,7 +41,6 @@ CS.START cld
|
||||||
.DA CS.DOEVENT
|
.DA CS.DOEVENT
|
||||||
.DA CS.QUIT
|
.DA CS.QUIT
|
||||||
L.MSG.USAGE .DA MSG.USAGE
|
L.MSG.USAGE .DA MSG.USAGE
|
||||||
L.MSG.Init .DA MSG.Init
|
|
||||||
L.MSG.LINENUM .DA MSG.LINENUM
|
L.MSG.LINENUM .DA MSG.LINENUM
|
||||||
L.MSG.CTRLCHAR .DA MSG.CTRLCHAR
|
L.MSG.CTRLCHAR .DA MSG.CTRLCHAR
|
||||||
L.ASCII .DA ASCII
|
L.ASCII .DA ASCII
|
||||||
|
@ -89,12 +94,7 @@ CS.INIT
|
||||||
>STYA ZPBufPtr
|
>STYA ZPBufPtr
|
||||||
txa
|
txa
|
||||||
>STA.G hBuf
|
>STA.G hBuf
|
||||||
|
|
||||||
|
|
||||||
* >PUSHBI 0
|
|
||||||
* >LDYA L.MSG.Init
|
|
||||||
* >SYSCALL printf
|
|
||||||
|
|
||||||
clc
|
clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -144,7 +144,7 @@ CS.RUN bra .11
|
||||||
>PUSHWI 256
|
>PUSHWI 256
|
||||||
>PUSHW ZPBufPtr
|
>PUSHW ZPBufPtr
|
||||||
pla
|
pla
|
||||||
>SYSCALL FRead
|
>SYSCALL fread
|
||||||
|
|
||||||
bcc CS.RUN.PRINT
|
bcc CS.RUN.PRINT
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ CS.RUN bra .11
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.PRINT sty BytesRead Y,A = Bytes read
|
CS.RUN.PRINT sty BytesRead Y,A = Bytes read
|
||||||
stz ByteIndex
|
stz ByteIndex
|
||||||
|
|
||||||
* jsr PrintStack
|
* jsr PrintStack
|
||||||
|
|
||||||
>INCW.G LineNum
|
>INCW.G LineNum
|
||||||
|
@ -223,14 +223,14 @@ CS.RUN.PRINT sty BytesRead Y,A = Bytes read
|
||||||
.3 >PUSHW ZPPtr1
|
.3 >PUSHW ZPPtr1
|
||||||
|
|
||||||
>PUSHBI 2
|
>PUSHBI 2
|
||||||
>LDYA L.MSG.CTRLCHAR
|
>LDYA L.MSG.CTRLCHAR
|
||||||
>SYSCALL printf
|
>SYSCALL printf
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
bra .7
|
bra .7
|
||||||
|
|
||||||
.4 lda #13
|
.4 lda #13
|
||||||
>SYSCALL PutChar
|
>SYSCALL PutChar
|
||||||
bcs .9
|
bcs .9
|
||||||
lda #10
|
lda #10
|
||||||
|
|
||||||
|
@ -256,32 +256,26 @@ CS.RUN.PRINTNUM clc
|
||||||
>SYSCALL printf
|
>SYSCALL printf
|
||||||
.8 rts
|
.8 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.OPEN pha
|
CS.RUN.OPEN phy
|
||||||
|
pha
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
>STA.G bPrintedBlankLine Reset this flag for the new file
|
||||||
|
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI S.FI.T.TXT
|
>PUSHBI S.FI.T.TXT
|
||||||
>PUSHBI O.RDONLY+O.TEXT
|
>PUSHBI O.RDONLY+O.TEXT
|
||||||
|
|
||||||
pla
|
pla
|
||||||
|
ply
|
||||||
>SYSCALL FOpen
|
>SYSCALL FOpen
|
||||||
bcs .9
|
rts
|
||||||
|
|
||||||
pha
|
|
||||||
|
|
||||||
lda #0
|
|
||||||
>STA.G bPrintedBlankLine Reset this flag for the new file
|
|
||||||
|
|
||||||
pla
|
|
||||||
clc
|
|
||||||
.9 rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.QUIT >LDA.G hBuf
|
CS.QUIT >LDA.G hBuf
|
||||||
beq CS.RUN.CLOSE
|
beq CS.RUN.CLOSE
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
|
|
||||||
CS.RUN.CLOSE ldy #hFILE
|
CS.RUN.CLOSE >LDA.G hFILE
|
||||||
lda (pData),y
|
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
pha
|
pha
|
||||||
|
@ -312,7 +306,6 @@ MSG.USAGE .AS "Usage : CAT File1 [File2...]\r\n"
|
||||||
.AS " -A : Show All non printable caracters\r\n"
|
.AS " -A : Show All non printable caracters\r\n"
|
||||||
.AS " -N : Number all output lines\r\n"
|
.AS " -N : Number all output lines\r\n"
|
||||||
.AZ " -S : Suppress repeated empty output lines\r\n"
|
.AZ " -S : Suppress repeated empty output lines\r\n"
|
||||||
MSG.Init .AZ "\e[7l"
|
|
||||||
MSG.LINENUM .AZ "%5D:"
|
MSG.LINENUM .AZ "%5D:"
|
||||||
MSG.CTRLCHAR .AZ "[%S]"
|
MSG.CTRLCHAR .AZ "[%S]"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -348,9 +341,6 @@ ASCII >PSTR "NULL"
|
||||||
>PSTR "GS"
|
>PSTR "GS"
|
||||||
>PSTR "RS"
|
>PSTR "RS"
|
||||||
>PSTR "US"
|
>PSTR "US"
|
||||||
*--------------------------------------
|
|
||||||
BytesRead .BS 1
|
|
||||||
ByteIndex .BS 1
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DUMMY
|
.DUMMY
|
||||||
.OR 0
|
.OR 0
|
||||||
|
|
|
@ -157,6 +157,7 @@ GP.SysCall dec IRQ.InKernel
|
||||||
ldy .5+1
|
ldy .5+1
|
||||||
lda .6+1
|
lda .6+1
|
||||||
ldx .7+1
|
ldx .7+1
|
||||||
|
inc IRQ.InKernel
|
||||||
jmp GP.Sleep
|
jmp GP.Sleep
|
||||||
|
|
||||||
.4 ldx #$FF Self Modified
|
.4 ldx #$FF Self Modified
|
||||||
|
@ -177,8 +178,7 @@ GP.LibCall dec IRQ.InKernel
|
||||||
pla
|
pla
|
||||||
.1 jsr $FFFF SELF MODIFIED
|
.1 jsr $FFFF SELF MODIFIED
|
||||||
|
|
||||||
inc IRQ.InKernel
|
GP.LibCall.8 inc IRQ.InKernel
|
||||||
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
GP.AtkCall dec IRQ.InKernel
|
GP.AtkCall dec IRQ.InKernel
|
||||||
|
@ -190,8 +190,7 @@ GP.AtkCall dec IRQ.InKernel
|
||||||
.1 .DA *
|
.1 .DA *
|
||||||
jsr GO.A2osX
|
jsr GO.A2osX
|
||||||
|
|
||||||
inc IRQ.InKernel
|
bra GP.LibCall.8
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
GP.RomCallPushFAC
|
GP.RomCallPushFAC
|
||||||
jsr GP.ROMCALL
|
jsr GP.ROMCALL
|
||||||
|
|
Loading…
Reference in New Issue
Block a user