Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-06-04 17:49:58 +02:00
parent a2c877fad4
commit e6c28cd69e
8 changed files with 96 additions and 78 deletions

Binary file not shown.

View File

@ -179,51 +179,41 @@ IO.PrintBatchErrMsg
.5 iny .5 iny
lda (ZPPtr1),y lda (ZPPtr1),y
sta (ZPCLBuf),y
beq .6 beq .6
cmp #C.CR eor #C.CR
beq .6 bne .5
phy sta (ZPCLBuf),y
>PUSHA
ldy #S.PS.hStdErr
lda (pPS),y
>SYSCALL fputc
ply
bra .5
.6 >PUSHBI 0 .6 >PUSHW ZPCLBuf
>PUSHW L.MSG.ECHOCRLF
ldy #S.PS.hStdErr >PUSHBI 2
lda (pPS),y >PUSHW L.MSG.BATCHLINE
>SYSCALL fprintf jsr .80
ldy #$ff ldy #$ff
ldx #'-'
.7 iny .7 iny
lda (ZPPtr1),y lda (ZPCLBuf),y
beq .8 beq .8
cmp #C.CR txa
beq .8 sta (ZPCLBuf),y
phy
>PUSHBI '-'
ldy #S.PS.hStdErr
lda (pPS),y
>SYSCALL fputc
ply
bra .7 bra .7
.8 >PUSHW M32.TMP .8 >PUSHW M32.TMP
>PUSHW ZPCLBuf
>PUSHBI 2 >PUSHBI 4
>PUSHW L.MSG.BATCHERR >PUSHW L.MSG.BATCHERR
ldy #S.PS.hStdErr
.80 ldy #S.PS.hStdErr
lda (pPS),y lda (pPS),y
>SYSCALL fprintf >SYSCALL fprintf
rts .9 rts
*-------------------------------------- *--------------------------------------
IO.PrintErrMsg pha Save EC for PrintF IO.PrintErrMsg pha Save EC for PrintF

View File

@ -58,7 +58,7 @@ E.NOFOR .EQ $C5
E.NOIF .EQ $C6 E.NOIF .EQ $C6
E.BADEXP .EQ $C7 E.BADEXP .EQ $C7
E.BADFTYPE .EQ $C8 E.BADFTYPE .EQ $C8
E.FUNDEF .EQ $C7 E.FUNDEF .EQ $C9
*-------------------------------------- *--------------------------------------
.INB INC/MACROS.I .INB INC/MACROS.I
.INB INC/A2OSX.I .INB INC/A2OSX.I
@ -112,6 +112,7 @@ L.MSG.PROMPT .DA MSG.PROMPT
L.MSG.PROMPTCRLF .DA MSG.PROMPTCRLF L.MSG.PROMPTCRLF .DA MSG.PROMPTCRLF
L.MSG.TRACE .DA MSG.TRACE L.MSG.TRACE .DA MSG.TRACE
L.MSG.ECHOCRLF .DA MSG.ECHOCRLF L.MSG.ECHOCRLF .DA MSG.ECHOCRLF
L.MSG.BATCHLINE .DA MSG.BATCHLINE
L.MSG.BATCHERR .DA MSG.BATCHERR L.MSG.BATCHERR .DA MSG.BATCHERR
L.MSG.ERROR .DA MSG.ERROR L.MSG.ERROR .DA MSG.ERROR
L.MSG.PRINTENV .DA MSG.PRINTENV L.MSG.PRINTENV .DA MSG.PRINTENV
@ -193,7 +194,6 @@ L.PS1 .DA PS1
L.M32.Printf .DA M32.Printf L.M32.Printf .DA M32.Printf
L.ERR.Codes .DA ERR.Codes L.ERR.Codes .DA ERR.Codes
L.ERR.Messages .DA ERR.Messages L.ERR.Messages .DA ERR.Messages
L.NOD.Template .DA NOD.Template
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
CS.INIT clc CS.INIT clc
@ -586,8 +586,9 @@ CS.END
MSG.GREETINGS .AZ "\r\nA2osX-SH %d.%d\r\n\r\n" MSG.GREETINGS .AZ "\r\nA2osX-SH %d.%d\r\n\r\n"
MSG.PROMPT .AZ "\e[?7h$ " Enable Line Wrap MSG.PROMPT .AZ "\e[?7h$ " Enable Line Wrap
MSG.PROMPTCRLF .AZ "\e[?7l\r\n" Disable Line Wrap MSG.PROMPTCRLF .AZ "\e[?7l\r\n" Disable Line Wrap
MSG.TRACE .AZ ">%s\r\n" MSG.TRACE .AS ">"
MSG.BATCHERR .AZ "^\r\nLine #%D:" MSG.BATCHLINE .AZ "%s\r\n"
MSG.BATCHERR .AZ "%s^\r\nLine #%D:"
MSG.ERROR .AS "[$%h]:%S." MSG.ERROR .AS "[$%h]:%S."
MSG.ECHOCRLF .AZ "\r\n" MSG.ECHOCRLF .AZ "\r\n"
MSG.PRINTENV .AZ "%s = %s\r\n" MSG.PRINTENV .AZ "%s = %s\r\n"
@ -703,7 +704,6 @@ EXP.OP.LOGIC .AZ "AND"
EscChars .AS 'DBAC' EscChars .AS 'DBAC'
EscChars.Cnt .EQ *-EscChars EscChars.Cnt .EQ *-EscChars
EscChars.Remap .DA #C.BS,#C.VT,#C.LF,#C.FS EscChars.Remap .DA #C.BS,#C.VT,#C.LF,#C.FS
NOD.Template .AZ "/DEV/PIPE%h"
M32.Printf .AZ "%L" M32.Printf .AZ "%L"
*-------------------------------------- *--------------------------------------
.DUMMY .DUMMY

View File

@ -751,9 +751,10 @@ CS.QUIT jsr LeaveSubDir
.7 lda (pData),y .7 lda (pData),y
beq .9 beq .9
>SYSCALL FreeMem >SYSCALL FreeMem
.9 rts .9 clc
rts
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/X.CPMVRM.S SAVE USR/SRC/BIN/X.CPMVRM.S
LOAD USR/SRC/BIN/CP.S LOAD USR/SRC/BIN/RM.S
ASM ASM

View File

@ -492,13 +492,13 @@ READ php
dex dex
bpl .11 bpl .11
ldx DEVSLOTx0
ldy #S.IP ldy #S.IP
.ELSE .ELSE
ldy #0 ldy #0
.FIN .FIN
ldx DEVSLOTx0
.2 inc Counter .2 inc Counter
bne .3 bne .3
inc Counter+1 inc Counter+1

View File

@ -853,7 +853,7 @@ IO.MLIOPEN >LDYAI 1024 get a ProDOS IOBUF
*-------------------------------------- *--------------------------------------
IO.DEVDIR .DA #5 >PSTR "/DEV/" IO.DEVDIR .DA #5 >PSTR "/DEV/"
*-------------------------------------- *--------------------------------------
STAT.FIFO .AZ "/DEV/FIFO%d" STAT.FIFO .AS "/DEV/FIFO"
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/SYS/KERNEL.S.IO SAVE USR/SRC/SYS/KERNEL.S.IO

View File

@ -769,6 +769,39 @@ MEM.NextCharPtr2
bne .8 bne .8
inc ZPPtr2+1 inc ZPPtr2+1
.8 rts .8 rts
*/--------------------------------------
* # GetMemStat
* **In:**
* Y,A = Ptr to 24 bytes buffer
* ## RETURN VALUE
* Buffer filled with memory stats
*\--------------------------------------
K.GetMemStat >STYA ZPPtr1
ldy #23
ldx #7
.1 lda DevMgr.Stat,x
sta (ZPPtr1),y
dey
dex
bpl .1
sta SETREADAUX
jsr .2
sta CLRREADAUX
.2 ldx #7
.3 lda Mem.Table,x
sta (ZPPtr1),y
dey
dex
bpl .3
rts
*-------------------------------------- *--------------------------------------
DevMgr.Stat .DA DevMgr.FreeMem DevMgr.Stat .DA DevMgr.FreeMem
DevMgr.Free .DA DevMgr.FreeMem DevMgr.Free .DA DevMgr.FreeMem

View File

@ -1,38 +1,5 @@
NEW NEW
AUTO 3,1 AUTO 3,1
*/--------------------------------------
* # GetMemStat
* **In:**
* Y,A = Ptr to 24 bytes buffer
* ## RETURN VALUE
* Buffer filled with memory stats
*\--------------------------------------
K.GetMemStat >STYA ZPPtr1
ldy #23
ldx #7
.1 lda DevMgr.Stat,x
sta (ZPPtr1),y
dey
dex
bpl .1
sta SETREADAUX
jsr .2
sta CLRREADAUX
.2 ldx #7
.3 lda Mem.Table,x
sta (ZPPtr1),y
dey
dex
bpl .3
rts
*-------------------------------------- *--------------------------------------
* # ChMod * # ChMod
* change permissions of a file * change permissions of a file
@ -310,15 +277,42 @@ K.MKFIFO >STYA ZPPtr1 pathname buffer
jsr K.pipe jsr K.pipe
bcs STAT.Access2Mode.RTS bcs STAT.Access2Mode.RTS
sta K.S.STAT+S.STAT.DEV sta K.S.STAT+S.STAT.DEV hFD
tax
ldy #11
lda #0
sta (ZPPtr1),y
dey
>PUSHA txa
>PUSHBI 1
>PUSHWI STAT.FIFO
>LDYA ZPPtr1
jsr K.sprintf
and #$0F
jsr .7
sta (ZPPtr1),y
dey
txa
lsr
lsr
lsr
lsr
jsr .7
.1 sta (ZPPtr1),y
lda STAT.FIFO-1,y
dey
bpl .1
bra K.MkNod.I bra K.MkNod.I
.7 ora #$30
cmp #'9'+1
bcc .8
adc #6
.8 rts
*/-------------------------------------- */--------------------------------------
* # MkNod * # MkNod
* Create a special or ordinary file. * Create a special or ordinary file.