Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-10-24 17:36:45 +02:00
parent d1a6f92adb
commit 5b5b785a26
10 changed files with 31 additions and 28 deletions

Binary file not shown.

Binary file not shown.

View File

@ -34,6 +34,7 @@ CS.START cld
.DA CS.QUIT
L.MSG0 .DA MSG0
L.MSG1 .DA MSG1
L.MSG2.ERR .DA MSG2.ERR
L.MSG2 .DA MSG2
L.MSG2.C .DA MSG2.C
L.MSG2.B .DA MSG2.B
@ -55,22 +56,22 @@ CS.RUN >LDYA L.MSG0
>STA.G DEV.FD
jsr DumpFD
bcs .9
>PUSHEA.G DEV.DIB
>LDA.G DEV.FD
>SYSCALL GetDevStatus
bcs .6
bcc .6
jsr DumpDIB
>PUSHA
>PUSHBI 6
>LDYA L.MSG2.ERR
>SYSCALL printf
bcs .9
bra .7
.6 lda #13
>SYSCALL PutChar
lda #10
>SYSCALL PutChar
.6 jsr DumpDIB
.7 >INC.G DEV.ID
cmp #K.DEV.MAX
@ -95,9 +96,11 @@ DumpFD ldy #S.FD.DEV.DRVPTR+1
adc ZPPTR1+1
>PUSHYA
>PUSHB.G DEV.FD
>PUSHB.G DEV.ID
>PUSHBI 5
>PUSHBI 6
>LDYA L.MSG1
>SYSCALL printf
rts
@ -160,11 +163,12 @@ CS.QUIT clc
rts
*--------------------------------------
CS.END
MSG0 .AZ "ID Name Addr. Status Typ/Sub IDString Version Size (BLK)"
MSG1 .AZ "%03d %7s $%H "
MSG0 .AZ "ID FD Name Addr. Status Typ/Sub IDString Version Size (BLK)"
MSG1 .AZ "%03d %03d %7s $%H "
MSG2.ERR .AZ "Device Error : $%h\r\n"
MSG2 .AZ "%s $%h/$%h %16S %03d.%03d "
MSG2.B .AZ "%10u"
MSG2.C .AZ "n/a"
MSG2.B .AZ "%10u\r\n"
MSG2.C .AZ "n/a\r\n"
MSG.SFLAGS .AS "BWRLNEIO"
*--------------------------------------
.DUMMY

View File

@ -39,7 +39,7 @@ Cmd.Parse >STZ.G CMD.bCmd
pla Y,A = expanded string
>SYSCALL Args2ArgV
plx
pla Get Back expanded string
>SYSCALL FreeMem
>LDYAI 256

View File

@ -150,9 +150,10 @@ CS.INIT jsr SetPWD
.9 rts
*--------------------------------------
CS.RUN >LDA.G bReadMode READ Command ?
bne CS.RUN.READ
beq .22
jmp CS.RUN.READ
ldy #S.PS.RC
.22 ldy #S.PS.RC
lda (pPs),y
beq .11
@ -175,7 +176,7 @@ CS.RUN >LDA.G bReadMode READ Command ?
jmp CS.RUN.BATCH
*--------------------------------------
.10 jsr CL.RESET reset CmdBuf
>STA.G bSecureRead Clear password mode
>STZ.G bSecureRead Clear password mode
jsr CL.PrintPrompt
bcs .9
@ -186,6 +187,7 @@ CS.RUN >LDA.G bReadMode READ Command ?
tay
beq .1
rts
.21 cmp #C.EOF

View File

@ -12,9 +12,7 @@ AUTO 4,1
*\--------------------------------------
ARG.bInQuote .BS 1
*--------------------------------------
K.Args2ArgV >DEBUG
jsr MEM.SPtr1PPtr2
K.Args2ArgV jsr MEM.SPtr1PPtr2
ldx #0 Arg Count

View File

@ -75,7 +75,7 @@ CORE.Run stz CORE.PSIndex
ldy #S.PS.PID
lda (pPs),y
beq *
jsr CORE.PSFree.A
jsr CORE.PSFree
bra .8
.7 jsr CORE.PSLeave Save ZP & Ptrs
@ -281,10 +281,11 @@ CORE.Dispatch stz CORE.PSIndex
.8 clc
rts
*--------------------------------------
* PS.Free.A
* CORE.PSFree
* In : A = PID to free
*--------------------------------------
CORE.PSFree.A sta .1+1 Save PS ID
CORE.PSFree sta .1+1 Save PS ID
jsr CORE.GetPSByID S.PS in ZPPtr1
bcs .9
>STYA ZPPtr1

View File

@ -410,7 +410,7 @@ IO.WRITE.PIPE >PULLW K.S.IOCTL+S.IOCTL.BUFPTR
* Y,A = ...
*\--------------------------------------
K.IOCTL jsr K.GetMemPtr
bcs .9
bcs K.IOCTL.9
>STYA pFD
@ -421,9 +421,9 @@ K.IOCTL jsr K.GetMemPtr
>PULLYA param
jmp (pDRV) SELF MODIFIED x = op
K.IOCTL.pDrvJmp jmp (pDrv)
.9 lda #MLI.E.NODEV
K.IOCTL.9 lda #MLI.E.NODEV
>RET 3
*--------------------------------------
K.IOCTL.GetPDrv ldy #S.FD.DEV.DRVPTR
@ -433,7 +433,6 @@ K.IOCTL.GetPDrv ldy #S.FD.DEV.DRVPTR
lda (pFD),y
sta pDRV+1
rts
K.IOCTL.pDrvJmp jmp (pDrv)
*/--------------------------------------
* # pipe
* ## C

View File

@ -248,7 +248,6 @@ K.FreeMem.ERR >PUSHA
K.FreeMem tay
beq K.FreeMem.ERR Slot=0, reserved by Kernel
cmp Mem.LastSlot
bcc .10
bne K.FreeMem.ERR

View File

@ -41,7 +41,7 @@ K.Exec >STYA PS.Args
pha save error code
lda .8+1
jsr CORE.PSFree.A
jsr CORE.PSFree
pla get back error code
sec
rts