Kernel 0.92

This commit is contained in:
Rémy GIBERT 2018-12-21 15:32:45 +01:00
parent 0c79cdb036
commit 3c534a25fd
20 changed files with 210 additions and 197 deletions

Binary file not shown.

View File

@ -215,8 +215,17 @@ Remove an environment variable
# LoadTxtFile # LoadTxtFile
Load TXT a file in memory (with ending 0) Load TXT a file in memory (with ending 0)
## C
`int loadtxtfile ( const char * filename, short int flags, short int ftype, int auxtype );`
## ASM
**In:** **In:**
Y,A = File Path `>PUSHW auxtype`
`>PUSHB ftype`
`>PUSHB flags`
`>LDYA filename`
`>SYSCALL loadtxtfile`
## RETURN VALUE ## RETURN VALUE
Y,A = File Length (without ending 0) Y,A = File Length (without ending 0)
@ -224,11 +233,17 @@ Load TXT a file in memory (with ending 0)
# LoadFile # LoadFile
Load a file in memory Load a file in memory
## C
`int loadfile ( const char * filename, short int flags, short int ftype, int auxtype );`
## ASM
**In:** **In:**
PUSHW = AUXTYPE (Handled by.... `>PUSHW auxtype`
PUSHB = TYPE ... `>PUSHB ftype`
PUSHB = MODE ... `>PUSHB flags`
LDYA = PATH ...FOpen) `>LDYA filename`
`>SYSCALL loadfile`
## RETURN VALUE ## RETURN VALUE
Y,A = File Length Y,A = File Length

Binary file not shown.

View File

@ -8,6 +8,7 @@ AUTO 4,1
*-------------------------------------- *--------------------------------------
.INB INC/MACROS.I .INB INC/MACROS.I
.INB INC/A2OSX.I .INB INC/A2OSX.I
.INB INC/MLI.I
.INB INC/MLI.E.I .INB INC/MLI.E.I
.INB INC/ETH.I .INB INC/ETH.I
.INB INC/LIBTCPIP.I .INB INC/LIBTCPIP.I
@ -167,7 +168,12 @@ CS.RUN.HOSTOK >INC.G ArgIndex
>INC.G ArgIndex >INC.G ArgIndex
>SYSCALL ArgV >SYSCALL ArgV
bcs CS.RUN.RTS bcs CS.RUN.RTS
pha
>PUSHWI 0 Aux type
>PUSHBI S.FI.T.TXT
>PUSHBI O.RDONLY
pla
>SYSCALL LoadTxtFile >SYSCALL LoadTxtFile
bcs .9 bcs .9

View File

@ -132,5 +132,5 @@ DS.END
.ED .ED
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/BIN/MEM.S SAVE USR/SRC/BIN/MEM.S
ASM ASM

View File

@ -181,6 +181,9 @@ CS.RUN jsr CMD.Init
lda (pPS),y lda (pPS),y
beq .1 no arg, continue starting interactive beq .1 no arg, continue starting interactive
>PUSHWI 0 Aux type
>PUSHBI S.FI.T.TXT
>PUSHBI O.RDONLY
lda #1 lda #1
>SYSCALL ArgV >SYSCALL ArgV
>SYSCALL LoadTxtFile >SYSCALL LoadTxtFile
@ -381,6 +384,7 @@ CS.RUN.BATCH >SYSCALL GetChar
>PUSHBI 2 >PUSHBI 2
>LDYA L.MSG.TRACE >LDYA L.MSG.TRACE
>SYSCALL printf >SYSCALL printf
bcs .9 bcs .9
*-------------------------------------- *--------------------------------------
CS.RUN.Exec jsr CL.Parse CS.RUN.Exec jsr CL.Parse
@ -551,7 +555,7 @@ CS.END
*-------------------------------------- *--------------------------------------
MSG.GREETINGS .AZ "\r\nA2osX-Shell %d.%d\r\n\r\n" MSG.GREETINGS .AZ "\r\nA2osX-Shell %d.%d\r\n\r\n"
MSG.PROMPT .AZ "\e[7h$ " MSG.PROMPT .AZ "\e[7h$ "
MSG.TRACE .AS ">%s" MSG.TRACE .AZ ">%s\r\n"
MSG.BATCHERR .AZ "^\r\nLine #%D:" MSG.BATCHERR .AZ "^\r\nLine #%D:"
MSG.ERROR .AS "[$%h]:%S." MSG.ERROR .AS "[$%h]:%S."
MSG.ECHOCRLF .AZ "\r\n" MSG.ECHOCRLF .AZ "\r\n"

View File

@ -7,11 +7,11 @@ K.ENV.SIZE .EQ 256
K.PIPE.SIZE .EQ 256 K.PIPE.SIZE .EQ 256
*-------------------------------------- *--------------------------------------
K.IRQDEV.MAX .EQ 4 K.IRQDEV.MAX .EQ 4
K.DEV.MAX .EQ 32 K.DEV.MAX .EQ 28
K.FLT.MAX .EQ 4
K.NOD.MAX .EQ 32 K.NOD.MAX .EQ 32
K.PS.MAX .EQ 32 K.PS.MAX .EQ 32
K.OF.MAX .EQ 32 K.OF.MAX .EQ 32
K.FLT.MAX .EQ 4
K.EVT.MAX .EQ 4 K.EVT.MAX .EQ 4
K.SCR.MAX .EQ 6 K.SCR.MAX .EQ 6
K.TTY.MAX .EQ 4 K.TTY.MAX .EQ 4
@ -228,7 +228,7 @@ SYS.ExecV .EQ $A2
SYS.Kill .EQ $A6 SYS.Kill .EQ $A6
* .EQ $A8 * .EQ $A8
SYS.GetMemStat .EQ $AA * .EQ $AA
* .EQ $AC * .EQ $AC
* .EQ $AE * .EQ $AE
@ -269,7 +269,7 @@ SYS.GetMemByID .EQ $E6
SYS.GetMem .EQ $E8 SYS.GetMem .EQ $E8
SYS.GetMem0 .EQ $EA SYS.GetMem0 .EQ $EA
* .EQ $EC SYS.GetMemStat .EQ $EC
SYS.SListAdd .EQ $EE SYS.SListAdd .EQ $EE
SYS.SListLookup .EQ $F0 SYS.SListLookup .EQ $F0
@ -554,12 +554,6 @@ S.TIME.WDAY .EQ 7 1..7
* *
S.TIME .EQ 8 S.TIME .EQ 8
*-------------------------------------- *--------------------------------------
S.PFT.PATH .EQ 0 /dev, /mnt
S.PFT.HANDLER .EQ 16
S.PFT.DATA .EQ 24 8 bytes OPAQUE data for handler
*
S.PFT .EQ 32
*--------------------------------------
* S.STAT * S.STAT
*-------------------------------------- *--------------------------------------
S.STAT.MODE .EQ 0 S.STAT.MODE .EQ 0

View File

@ -4,7 +4,10 @@ AUTO 4,1
.LIST OFF .LIST OFF
*-------------------------------------- *--------------------------------------
Dev.Table.hPath .EQ $1300 K.Dev.MAX Dev.Table.hPath .EQ $1300 K.Dev.MAX
Dev.Table.hFD .EQ $1320 K.Dev.MAX Dev.Table.hFD .EQ $131C K.Dev.MAX
*--------------------------------------
Flt.Table.hPath .EQ $1338 K.FLT.MAX
Flt.Table.hLib .EQ $133C K.FLT.MAX
*-------------------------------------- *--------------------------------------
Nod.Table.hPath .EQ $1340 K.NOD.MAX Nod.Table.hPath .EQ $1340 K.NOD.MAX
Nod.Table.hFD .EQ $1360 K.NOD.MAX Nod.Table.hFD .EQ $1360 K.NOD.MAX
@ -17,11 +20,7 @@ PS.Table.Stats .EQ $13E0 K.PS.MAX
OF.Table.hPath .EQ $1400 K.OF.MAX OF.Table.hPath .EQ $1400 K.OF.MAX
OF.Table.hFD .EQ $1420 K.OF.MAX OF.Table.hFD .EQ $1420 K.OF.MAX
*-------------------------------------- *--------------------------------------
Evt.Table .EQ $1440 K.EVT.MAX*S.EVT=4*8=32b A2osX.EndTables .EQ $1440
*--------------------------------------
Flt.Table .EQ $1460 K.FLT.MAX*S.FLT=4*32=128b
*--------------------------------------
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE INC/KERNEL.I SAVE INC/KERNEL.I

View File

@ -29,7 +29,7 @@ CS.START cld
.DA #0 .DA #0
.DA CS.END-CS.START Code Size (without Constants) .DA CS.END-CS.START Code Size (without Constants)
.DA DS.END-DS.START Data SegmentSize .DA DS.END-DS.START Data SegmentSize
.DA #32 Stack Size .DA #16 Stack Size
.DA #ZS.END-ZS.START Zero Page Size .DA #ZS.END-ZS.START Zero Page Size
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------

View File

@ -84,7 +84,7 @@ A2osX.SaveSX .EQ $101 Aux
* Aux $3FE -> 3FF : IRQ Vector * Aux $3FE -> 3FF : IRQ Vector
*-------------------------------------- *--------------------------------------
K.S.STAT .EQ $0300 S.STAT for internal kernel operations K.S.STAT .EQ $0300 S.STAT for internal kernel operations
*K.S.DIB .EQ $0340 S.DIB=25 or higher depends on dev type Evt.Table .EQ $0340 K.EVT.MAX*S.EVT=4*8=32b
K.S.IOCTL .EQ $0360 9 bytes K.S.IOCTL .EQ $0360 9 bytes
K.MLI.PATH .EQ $0369 64+1 K.MLI.PATH .EQ $0369 64+1
K.MLI.PARAMS .EQ $03AA Main, 18 bytes min for GetFileInfo (ATLK needs MORE!!!...32 max for now) K.MLI.PARAMS .EQ $03AA Main, 18 bytes min for GetFileInfo (ATLK needs MORE!!!...32 max for now)
@ -163,11 +163,11 @@ S.DCB.TTY.bTITLE .EQ 10
S.DCB.TTY.OUTTAIL .EQ 14 S.DCB.TTY.OUTTAIL .EQ 14
S.DCB.TTY.OUTHEAD .EQ 15 S.DCB.TTY.OUTHEAD .EQ 15
S.DCB.TTY.INBUFFER .EQ 16 S.DCB.TTY.INBUFFER .EQ 16
S.DCB.TTY.INBUFFER.MAX .EQ 40 S.DCB.TTY.INBUFFER.MAX .EQ 32
S.DCB.TTY.OUTBUFFER .EQ 40 S.DCB.TTY.OUTBUFFER .EQ 32
S.DCB.TTY.OUTBUFFER.MAX .EQ 64 S.DCB.TTY.OUTBUFFER.MAX .EQ 48
* *
S.DCB.TTY .EQ 64 S.DCB.TTY .EQ 48
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/SYS/KERNEL.S.DEF SAVE USR/SRC/SYS/KERNEL.S.DEF

View File

@ -8,13 +8,12 @@ AUTO 4,1
*-------------------------------------- *--------------------------------------
DRV.DiskII cld DRV.DiskII cld
cpx #IOCTL.FORMAT cpx #IOCTL.FORMAT
bcs .9 bcs DRV.RamDrive.9
>STYA pIOCTL >STYA pIOCTL
jmp (.1,x) jmp (.1,x)
.1 .DA DRV.DiskII.STATUS .1 .DA DRV.DiskII.STATUS
.DA DRV.BLK READ .DA DRV.BLK READ
.DA DRV.BLK WRITE .DA DRV.BLK WRITE
.9 jmp A2osX.BadCall
*-------------------------------------- *--------------------------------------
DRV.DiskII.STATUS DRV.DiskII.STATUS
>LDYAI DRV.DiskII.DIB >LDYAI DRV.DiskII.DIB
@ -35,14 +34,14 @@ DRV.DiskII.DIB .DA #S.DIB.S.BLOCK+S.DIB.S.WRITE+S.DIB.S.READ
*-------------------------------------- *--------------------------------------
DRV.RamDrive cld DRV.RamDrive cld
cpx #IOCTL.CONTROL cpx #IOCTL.CONTROL
bcs .9 bcs DRV.RamDrive.9
>STYA pIOCTL >STYA pIOCTL
jmp (.1,x) jmp (.1,x)
.1 .DA DRV.RamDrive.STATUS .1 .DA DRV.RamDrive.STATUS
.DA DRV.BLK READ .DA DRV.BLK READ
.DA DRV.BLK WRITE .DA DRV.BLK WRITE
.DA DRV.BLK FORMAT .DA DRV.BLK FORMAT
.9 jmp A2osX.BadCall DRV.RamDrive.9 jmp A2osX.BadCall
*-------------------------------------- *--------------------------------------
DRV.RamDrive.STATUS DRV.RamDrive.STATUS
jsr DRV.Blk jsr DRV.Blk
@ -69,14 +68,13 @@ DRV.RamDrive.DIB
*-------------------------------------- *--------------------------------------
DRV.BlkDevice cld DRV.BlkDevice cld
cpx #IOCTL.CONTROL cpx #IOCTL.CONTROL
bcs .9 bcs DRV.RamDrive.9
>STYA pIOCTL >STYA pIOCTL
jmp (.1,x) jmp (.1,x)
.1 .DA DRV.BlkDevice.STATUS .1 .DA DRV.BlkDevice.STATUS
.DA DRV.BLK READ .DA DRV.BLK READ
.DA DRV.BLK WRITE .DA DRV.BLK WRITE
.DA DRV.BLK FORMAT .DA DRV.BLK FORMAT
.9 jmp A2osX.BadCall
*-------------------------------------- *--------------------------------------
DRV.BlkDevice.STATUS DRV.BlkDevice.STATUS
jsr DRV.Blk jsr DRV.Blk
@ -191,38 +189,32 @@ DRV.SmartPort.Cnt
*-------------------------------------- *--------------------------------------
DRV.NULL cld DRV.NULL cld
>STYA pIOCTL >STYA pIOCTL
jmp (.1,x) txa
beq DRV.NULL.STATUS
jmp (.1-12,x)
*-------------------------------------- *--------------------------------------
.1 .DA DRV.NULL.STATUS .1
.DA A2osX.BADCALL READBLOCK * .DA DRV.NULL.STATUS
.DA A2osX.BADCALL WRITEBLOCK * .DA A2osX.BADCALL READBLOCK
.DA A2osX.BADCALL FORMAT * .DA A2osX.BADCALL WRITEBLOCK
.DA A2osX.BADCALL CONTROL * .DA A2osX.BADCALL FORMAT
.DA A2osX.BADCALL INIT * .DA A2osX.BADCALL CONTROL
* .DA A2osX.BADCALL INIT
.DA DRV.NULL.OPEN .DA DRV.NULL.OPEN
.DA DRV.NULL.CLOSE .DA DRV.NULL.CLOSE
.DA DRV.NULL.READ .DA DRV.NULL.READ
.DA DRV.NULL.WRITE .DA DRV.NULL.WRITE
*-------------------------------------- *--------------------------------------
DRV.NULL.STATUS >LDYAI DRV.NULL.DIB
jmp DRV.STATUS.YA
DRV.NULL.READ ldx #C.EOF
jmp DRV.READ.X
DRV.NULL.OPEN
DRV.NULL.WRITE
DRV.NULL.CLOSE clc
rts
*--------------------------------------
DRV.NULL.DIB .DA #S.DIB.S.WRITE+S.DIB.S.READ+S.DIB.S.OPENED DRV.NULL.DIB .DA #S.DIB.S.WRITE+S.DIB.S.READ+S.DIB.S.OPENED
.DA #0,#0,#0 .DA #0,#0,#0
>PSTR "NULL DEVICE" >PSTR "NULL Device"
.BS 5 .BS 5
.DA #S.DIB.T.CHAR .DA #S.DIB.T.CHAR
.DA #0 .DA #0
.DA K.VER .DA K.VER
*-------------------------------------- *--------------------------------------
DRV.NULL.STATUS >LDYAI DRV.NULL.DIB
*--------------------------------------
DRV.STATUS.YA >STYA .2+1 DRV.STATUS.YA >STYA .2+1
ldy #S.IOCTL.STATCODE ldy #S.IOCTL.STATCODE
@ -255,6 +247,8 @@ DRV.STATUS.YA >STYA .2+1
sec sec
rts rts
*-------------------------------------- *--------------------------------------
DRV.NULL.READ ldx #C.EOF
*--------------------------------------
DRV.READ.X ldy #S.IOCTL.BYTECNT DRV.READ.X ldy #S.IOCTL.BYTECNT
lda #1 lda #1
sta (pIOCTL),y sta (pIOCTL),y
@ -270,7 +264,10 @@ DRV.READ.X ldy #S.IOCTL.BYTECNT
sta .1+2 sta .1+2
.1 stx $ffff SELF MODIFIED .1 stx $ffff SELF MODIFIED
clc *--------------------------------------
DRV.NULL.OPEN
DRV.NULL.WRITE
DRV.NULL.CLOSE clc
rts rts
*-------------------------------------- *--------------------------------------
MAN MAN

View File

@ -4,38 +4,44 @@ AUTO 4,1
*/-------------------------------------- */--------------------------------------
* # LoadTxtFile * # LoadTxtFile
* Load TXT a file in memory (with ending 0) * Load TXT a file in memory (with ending 0)
* ## C
* `int loadtxtfile ( const char * filename, short int flags, short int ftype, int auxtype );`
* ## ASM
* **In:** * **In:**
* Y,A = File Path * `>PUSHW auxtype`
* `>PUSHB ftype`
* `>PUSHB flags`
* `>LDYA filename`
* `>SYSCALL loadtxtfile`
* ## RETURN VALUE * ## RETURN VALUE
* Y,A = File Length (without ending 0) * Y,A = File Length (without ending 0)
* X = hMem of Loaded File * X = hMem of Loaded File
*\-------------------------------------- *\--------------------------------------
K.LoadTxtFile pha K.LoadTxtFile sec
>PUSHWI 0 Aux type
>PUSHBI S.FI.T.TXT
>PUSHBI O.RDONLY
pla
sec
.HS 90 BCC .HS 90 BCC
*/-------------------------------------- */--------------------------------------
* # LoadFile * # LoadFile
* Load a file in memory * Load a file in memory
* ## C
* `int loadfile ( const char * filename, short int flags, short int ftype, int auxtype );`
* ## ASM
* **In:** * **In:**
* PUSHW = AUXTYPE (Handled by.... * `>PUSHW auxtype`
* PUSHB = TYPE ... * `>PUSHB ftype`
* PUSHB = MODE ... * `>PUSHB flags`
* LDYA = PATH ...FOpen) * `>LDYA filename`
* `>SYSCALL loadfile`
* ## RETURN VALUE * ## RETURN VALUE
* Y,A = File Length * Y,A = File Length
* X = hMem of Loaded File * X = hMem of Loaded File
*\-------------------------------------- *\--------------------------------------
K.LoadFile clc K.LoadFile clc
ror FIO.bTXT ror FIO.bTXT
jsr K.FOpen jsr K.FOpen
bcc .12 bcs .9
rts
.12 sta FIO.hFile .12 sta .99+2 hFILE
pha pha
>PUSHWI K.S.Stat >PUSHWI K.S.Stat
@ -66,48 +72,51 @@ K.LoadFile clc
>PUSHW K.S.Stat+S.STAT.SIZE >PUSHW K.S.Stat+S.STAT.SIZE
>PUSHW FIO.Mem >PUSHW FIO.Mem
lda FIO.hFile lda .99+2
jsr K.FRead jsr K.FRead
bcs .98 bcc .2
sty .6+1 pha
sta .7+1 Save Bytes read
jsr .99 close file
bit FIO.bTXT
bpl .6
clc set ending 0
lda .6+1
adc FIO.Mem
sta .5+1
lda .7+1
adc FIO.Mem+1
sta .5+2
.5 stz $ffff Self Modified
.6 ldy #$ff Self Modified
.7 lda #$ff Self Modified
.8 ldx #$ff Self Modified
clc
.9 rts
.98 pha
lda .8+1 lda .8+1
jsr K.FreeMem jsr K.FreeMem
pla pla
.99 pha .99 pha
lda FIO.hFile lda #$ff SELF MODIFIED
jsr K.FClose jsr K.FClose
pla pla
sec sec
.9 rts
.2 sty .6+1
sta .7+1 Save Bytes read
bit FIO.bTXT
bpl .5
pha set ending 0
tya
* clc
adc FIO.Mem
sta .4+1
pla
adc FIO.Mem+1
sta .4+2
.4 stz $ffff Self Modified
.5 jsr .99 close file
.6 ldy #$ff Self Modified
.7 lda #$ff Self Modified
.8 ldx #$ff Self Modified
clc
rts rts
*-------------------------------------- *--------------------------------------
FIO.bTXT .BS 1 FIO.bTXT .BS 1
FIO.hFile .BS 1
FIO.Mem .BS 2 FIO.Mem .BS 2
*/-------------------------------------- */--------------------------------------
* # ChTyp * # ChTyp

View File

@ -270,6 +270,12 @@ MemMgrInit >LDYAI Mem.MHiMem
dex dex
bpl .1 bpl .1
ldx #K.FLT.MAX*2-1
.11 stz Flt.Table.hPath,x
dex
bpl .11
ldx #K.NOD.MAX*2-1 ldx #K.NOD.MAX*2-1
.2 stz Nod.Table.hPath,x .2 stz Nod.Table.hPath,x
@ -294,8 +300,6 @@ MemMgrInit >LDYAI Mem.MHiMem
dex dex
bpl .5 bpl .5
stz Flt.Table
rts rts
*-------------------------------------- *--------------------------------------
SysScrInit >LDYAI Mem.XHiMem SysScrInit >LDYAI Mem.XHiMem

View File

@ -103,7 +103,7 @@ K.SYSCALL.JMP .DA 0 $00
.DA 0 .DA 0
.DA K.Kill .DA K.Kill
.DA 0 .DA 0
.DA K.GetMemStat .DA 0
.DA 0 .DA 0
.DA 0 .DA 0
@ -142,7 +142,7 @@ K.SYSCALL.JMP .DA 0 $00
.DA K.GetMemByID .DA K.GetMemByID
.DA K.GetMem .DA K.GetMem
.DA K.GetMem0 .DA K.GetMem0
.DA 0 .DA K.GetMemStat
.DA K.SListAdd .DA K.SListAdd
*-------------------------------------- *--------------------------------------
.DA K.SListLookup $F0 .DA K.SListLookup $F0

View File

@ -7,8 +7,6 @@ AUTO 4,1
* Out : * Out :
*-------------------------------------- *--------------------------------------
K.PFTAdd K.PFTAdd
clc
rts
*-------------------------------------- *--------------------------------------
* K.PFTRemove * K.PFTRemove
* In : * In :
@ -16,59 +14,52 @@ K.PFTAdd
*-------------------------------------- *--------------------------------------
K.PFTRemove K.PFTRemove
clc clc
rts K.PFTRemove.RTS rts
*-------------------------------------- *--------------------------------------
* PFT.CheckPathYA * PFT.CheckPathYA
* In : * In :
* Y,A = PATH (C-String) * Y,A = PATH (C-String)
* Out : * Out :
*-------------------------------------- *--------------------------------------
PFT.CheckPathYA stx .71+1 Save SYSCALL # PFT.CheckPathYA stx .6+1 Save SYSCALL #
jsr K.realpath.I realpath in K.Buf256 jsr K.realpath.I realpath in K.Buf256
bcs .9 bcs K.PFTRemove.RTS
>LDYAI Flt.Table ldx #0
.1 lda Flt.Table.hPath,x
beq .8
jsr K.GetMemPtr
>STYA ZPPtr1 >STYA ZPPtr1
.1 lda (ZPPtr1) Get Filter char.... ldy #$ff
beq .80
ldy #0 .2 iny
lda (ZPPtr1),y "/FILTER\0"
.2 lda (ZPPtr1),y
beq .3 end of filter string.... beq .3 end of filter string....
lda K.Buf256,y cmp K.Buf256,y can be \0
beq .8 beq .2
cmp (ZPPtr1),y bra .8
bne .8
iny
bne .2
.3 lda K.Buf256,y .3 lda K.Buf256,y path is "/FILTER/..." ?
cmp #'/' cmp #'/'
bne .8 bne .8
ldy #S.PFT.HANDLER lda Flt.Table.hLib,x get hLib
lda (ZPPtr1),y get hLib
jsr K.GetMemPtr jsr K.GetMemPtr
>STYA .72+1 >STYA .7+1
pla discard JSR return @ pla discard JSR return @
pla pla
>LDYAI K.Buf256 pass full path to handler >LDYAI K.Buf256 pass full path to handler
.71 ldx #$ff SELF MODIFIED SYSCALL # .6 ldx #$ff SELF MODIFIED SYSCALL #
.72 jmp $ffff SELF MODIFIED .7 jmp $ffff SELF MODIFIED
.9 rts .8 inx
cpx #K.FLT.MAX
.8 lda ZPPtr1 bne .1
clc
adc (ZPPtr1) Add STR len
adc #S.PFT
sta ZPPtr1
bcc .1
.80 >LDYAI K.Buf256 .80 >LDYAI K.Buf256
*-------------------------------------- *--------------------------------------

View File

@ -194,11 +194,9 @@ K.PrintF.1 stz PrintF.Cnt
stz PrintF.GetByte+1 stz PrintF.GetByte+1
ldy #0 .1 jsr MEM.GetCharPtr1
.1 lda (ZPPtr1),y
beq .8 end of format.. beq .8 end of format..
iny
cmp #'%' cmp #'%'
bne .10 bne .10
@ -207,9 +205,8 @@ K.PrintF.1 stz PrintF.Cnt
sta K.PrintF.PadC sta K.PrintF.PadC
.2 ldx #PrintFTBL2-PrintFTBL1-1 .2 ldx #PrintFTBL2-PrintFTBL1-1
lda (ZPPtr1),y jsr MEM.GetCharPtr1
beq .99 beq .99
iny
.3 cmp PrintFTBL1,x do we have a %x command? .3 cmp PrintFTBL1,x do we have a %x command?
beq .6 yes, jmp to it! beq .6 yes, jmp to it!
@ -243,12 +240,10 @@ K.PrintF.1 stz PrintF.Cnt
sta K.PrintF.PadL sta K.PrintF.PadL
bra .2 go get next char... bra .2 go get next char...
.6 phy .6 txa
txa
asl asl
tax tax
jsr PrintF.ESC jsr PrintF.ESC
ply
bcc .1 bcc .1
bcs .99 bcs .99
@ -262,9 +257,8 @@ K.PrintF.1 stz PrintF.Cnt
bne .20 bne .20
ldx #PrintFTBL2.OUT-PrintFTBL2-1 ldx #PrintFTBL2.OUT-PrintFTBL2-1
lda (ZPPtr1),y jsr MEM.GetCharPtr1
beq .99 beq .99
iny
.12 cmp PrintFTBL2,x .12 cmp PrintFTBL2,x
beq .13 beq .13

View File

@ -84,7 +84,7 @@ K.StrToUL clc Unsigned
bcs K.StrToUL.rts bcs K.StrToUL.rts
* clc * clc
K.StrToUL.Exit adc ZPPtr2 adc ZPPtr2
sta (ZPPtr1) sta (ZPPtr1)
lda #0 lda #0
adc ZPPtr2+1 adc ZPPtr2+1

View File

@ -1207,6 +1207,58 @@ RESET.VALUES .DA #0 S.DCB.TTY.MODE
.DA #S.DCB.TTY.OUTBUFFER S.DCB.TTY.OUTHEAD .DA #S.DCB.TTY.OUTBUFFER S.DCB.TTY.OUTHEAD
.DA #S.DCB.TTY.INBUFFER S.DCB.TTY.INBUFFER .DA #S.DCB.TTY.INBUFFER S.DCB.TTY.INBUFFER
*-------------------------------------- *--------------------------------------
SCR.BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0
SCR.BASEH .HS 04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07
*--------------------------------------
BUF.BASEL .DA #0
.DA #80
.DA #160
.DA #240
.DA #320
.DA #400
.DA #480
.DA #560
.DA #640
.DA #720
.DA #800
.DA #880
.DA #960
.DA #1040
.DA #1120
.DA #1200
.DA #1280
.DA #1360
.DA #1440
.DA #1520
.DA #1600
.DA #1680
.DA #1760
.DA #1840
BUF.BASEH .DA /0
.DA /80
.DA /160
.DA /240
.DA /320
.DA /400
.DA /480
.DA /560
.DA /640
.DA /720
.DA /800
.DA /880
.DA /960
.DA /1040
.DA /1120
.DA /1200
.DA /1280
.DA /1360
.DA /1440
.DA /1520
.DA /1600
.DA /1680
.DA /1760
.DA /1840
*--------------------------------------
CtrlChars .HS 05080A0C0D151B CtrlChars .HS 05080A0C0D151B
CtrlChars.Cnt .EQ *-CtrlChars CtrlChars.Cnt .EQ *-CtrlChars
*-------------------------------------- *--------------------------------------

View File

@ -2,58 +2,6 @@ NEW
PREFIX PREFIX
AUTO 4,1 AUTO 4,1
*-------------------------------------- *--------------------------------------
SCR.BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0
SCR.BASEH .HS 04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07
*--------------------------------------
BUF.BASEL .DA #0
.DA #80
.DA #160
.DA #240
.DA #320
.DA #400
.DA #480
.DA #560
.DA #640
.DA #720
.DA #800
.DA #880
.DA #960
.DA #1040
.DA #1120
.DA #1200
.DA #1280
.DA #1360
.DA #1440
.DA #1520
.DA #1600
.DA #1680
.DA #1760
.DA #1840
BUF.BASEH .DA /0
.DA /80
.DA /160
.DA /240
.DA /320
.DA /400
.DA /480
.DA /560
.DA /640
.DA /720
.DA /800
.DA /880
.DA /960
.DA /1040
.DA /1120
.DA /1200
.DA /1280
.DA /1360
.DA /1440
.DA /1520
.DA /1600
.DA /1680
.DA /1760
.DA /1840
*--------------------------------------
DRV.TERM.CLRSCR ldx #23 DRV.TERM.CLRSCR ldx #23
sta SET80STORE sta SET80STORE

View File

@ -21,7 +21,7 @@ AUTO 4,1
.INB USR/SRC/SYS/KERNEL.S.INIT .INB USR/SRC/SYS/KERNEL.S.INIT
.INB USR/SRC/X.PRINTF.S .INB USR/SRC/X.PRINTF.S
A2osX.MAIN .PH $1480 A2osX.MAIN .PH A2osX.EndTables
.INB USR/SRC/SYS/KERNEL.S.CORE .INB USR/SRC/SYS/KERNEL.S.CORE
.INB USR/SRC/SYS/KERNEL.S.DRV .INB USR/SRC/SYS/KERNEL.S.DRV
.INB USR/SRC/SYS/KERNEL.S.TERM .INB USR/SRC/SYS/KERNEL.S.TERM