Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-10-18 17:07:14 +02:00
parent be400f181b
commit eed3899f67
9 changed files with 71 additions and 34 deletions

Binary file not shown.

View File

@ -470,10 +470,8 @@ Ctrl.Z jsr BUF.ComputeCOffset
Prompt.Help >STZ.G PromptMode Prompt.Help >STZ.G PromptMode
Prompt.Help.Upd jsr SCRN.UpdateStatusBar Prompt.Help.Upd jsr SCRN.UpdateStatusBar
bcs .9 bcs Prompt.Find.RTS
jmp SCRN.UpdateMain jmp SCRN.UpdateMain
.9Prompt.Help.RTS
rts
*-------------------------------------- *--------------------------------------
Prompt.Find cmp #3 Prompt.Find cmp #3
bne .1 bne .1
@ -484,7 +482,8 @@ Prompt.Find cmp #3
bne .2 bne .2
.2 .2
clc clc
.9 rts .9
Prompt.Find.RTS rts
*-------------------------------------- *--------------------------------------
Prompt.Replace cmp #3 Prompt.Replace cmp #3
bne .1 bne .1

View File

@ -69,6 +69,7 @@ CS.RUN lda #1
lda #E.NSP lda #E.NSP
* sec * sec
rts rts
.12 jsr CS.RUN.DUMP .12 jsr CS.RUN.DUMP
bcs .9 bcs .9
lda #0 lda #0
@ -82,12 +83,15 @@ CS.RUN lda #1
.1 lda PS.Table.hPS,x .1 lda PS.Table.hPS,x
beq .7 beq .7
jsr CS.RUN.DUMP jsr CS.RUN.DUMP
>SLEEP >SLEEP
.7 inc Index .7 inc Index
ldx Index ldx Index
cpx #K.PS.MAX cpx #K.PS.MAX
bne .1 bne .1
.8 lda #0 tell Kernel that all done ok, but .8 lda #0 tell Kernel that all done ok, but
sec we do not want to stay in memory sec we do not want to stay in memory
.9 rts .9 rts
@ -140,8 +144,8 @@ CS.RUN.DUMP >SYSCALL GetMemPtr
jmp CS.RUN.PrintArgs jmp CS.RUN.PrintArgs
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.RUN.DecodeFlag CS.RUN.DecodeFlags
s lda (ZPPSPtr) Get flags lda (ZPPSPtr) Get flags
ldy #PS.FLAGS+7 ldy #PS.FLAGS+7
ldx #7 ldx #7
.2 lsr .2 lsr

View File

@ -90,16 +90,10 @@ CL.CHARIN.CTRL cpx #C.CR
bne .13 bne .13
jmp CL.SUPPR jmp CL.SUPPR
.18 ldy #S.PS.hStdIn Check for any extra LF .18 jsr CheckLFAfterCR Check for any extra LF
lda (pPS),y
>SYSCALL feof
bcs .9 bcs .9
tay lda #$ff
bne .19
>SYSCALL GetChar
.19 lda #$ff
>STA.G CL.bReady >STA.G CL.bReady
.13 clc .13 clc

View File

@ -285,6 +285,7 @@ CS.RUN.LOOP >SLEEP
cmp #3 Ctrl-C cmp #3 Ctrl-C
bne .4 bne .4
lda (pData) batch mode ? lda (pData) batch mode ?
beq .5 beq .5
@ -299,7 +300,9 @@ CS.RUN.LOOP >SLEEP
bpl .5 not from PAUSE command bpl .5 not from PAUSE command
cpx #C.CR cpx #C.CR
bne .3 bne .5
jsr CheckLFAfterCR Check for any extra LF
bcs .9
.5 >STZ.G bPause .5 >STZ.G bPause
*-------------------------------------- *--------------------------------------
@ -426,6 +429,17 @@ CS.QUIT jsr HIS.Quit
clc clc
rts rts
*-------------------------------------- *--------------------------------------
CheckLFAfterCR ldy #S.PS.hStdIn Check for any extra LF
lda (pPS),y
>SYSCALL feof
bcs .9
tay
bne .9
>SYSCALL GetChar
.9 rts
*--------------------------------------
CheckSleep ldy #Sleep+3 CheckSleep ldy #Sleep+3
lda (pData),y lda (pData),y
dey dey

View File

@ -19,6 +19,7 @@ ZPhStr .BS 1
ZPStrPtr .BS 2 ZPStrPtr .BS 2
ArgIndex .BS 1 ArgIndex .BS 1
ArgUsername .BS 1 ArgUsername .BS 1
bDelete .BS 1
ZS.END .ED ZS.END .ED
*-------------------------------------- *--------------------------------------
* File Header (16 Bytes) * File Header (16 Bytes)
@ -88,6 +89,7 @@ CS.RUN >LDYAI S.PW
lda #0 lda #0
sec sec
rts rts
.9 >PUSHBI 0 .9 >PUSHBI 0
>LDYA L.MSG.INV >LDYA L.MSG.INV
>SYSCALL printf >SYSCALL printf
@ -107,34 +109,44 @@ CS.RUN.CheckArg inc ArgIndex
lda (ZPStrPtr) lda (ZPStrPtr)
cmp #'-' cmp #'-'
bne .4 bne .4
ldy #1 ldy #1
lda (ZPStrPtr),y lda (ZPStrPtr),y
ldx OptionList
ldx #OptionVars-OptionList-1
.2 cmp OptionList,x .2 cmp OptionList,x
beq .3 beq .3
dex dex
bne .2 bpl .2
.9 >PUSHBI 0 .9 >PUSHBI 0
>LDYA L.MSG.USAGE >LDYA L.MSG.USAGE
>SYSCALL printf >SYSCALL printf
lda #E.SYN lda #E.SYN
sec sec
rts rts
.3 ldy OptionVars-1,x
.3 ldy OptionVars,x
lda #$80 lda #$80
sta (pData),y sta 0,y
bra CS.RUN.CheckArg bra CS.RUN.CheckArg
.4 lda ArgUsername .4 lda ArgUsername
bne .9 bne .9
lda ArgIndex lda ArgIndex
sta ArgUsername sta ArgUsername
bra CS.RUN.CheckArg bra CS.RUN.CheckArg
.8 lda ArgUsername .8 lda ArgUsername
beq .9 beq .9
clc clc
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.RmDir >LDA.G bDelete CS.RUN.RmDir lda bDelete
bmi .1 bmi .1
lda ZPPWPtr lda ZPPWPtr
@ -145,6 +157,7 @@ CS.RUN.RmDir >LDA.G bDelete
adc /S.PW.DIR adc /S.PW.DIR
>SYSCALL remove >SYSCALL remove
rts rts
.1 >PUSHW L.CMD.RM .1 >PUSHW L.CMD.RM
>LDYA ZPStrPtr >LDYA ZPStrPtr
@ -182,7 +195,7 @@ CS.QUIT lda ZPhStr
*-------------------------------------- *--------------------------------------
CS.END CS.END
*-------------------------------------- *--------------------------------------
OptionList >PSTR "Rr" OptionList .AS "Rr"
OptionVars .DA #bDelete,#bDelete OptionVars .DA #bDelete,#bDelete
*-------------------------------------- *--------------------------------------
* Initialized DATA * Initialized DATA
@ -197,9 +210,7 @@ CMD.RM .AZ "${ROOT}BIN/RM -R -Q "
.DUMMY .DUMMY
.OR 0 .OR 0
DS.START DS.START
bDelete .BS 1 DS.END .ED
DS.END
.ED
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/USERDEL.S SAVE USR/SRC/BIN/USERDEL.S

View File

@ -9,16 +9,19 @@ K.MEM.nALIGNm1 .EQ $F0
*K.MEM.ALIGN .EQ 64 *K.MEM.ALIGN .EQ 64
*K.MEM.nALIGNm1 .EQ $C0 *K.MEM.nALIGNm1 .EQ $C0
*-------------------------------------- *--------------------------------------
K.IRQDEV.MAX .EQ 4 K.DEV.MAX .EQ 28
K.DEV.MAX .EQ 14
K.FLT.MAX .EQ 4 K.FLT.MAX .EQ 4
K.NOD.MAX .EQ 32 K.NOD.MAX .EQ 32
K.PS.MAX .EQ 32
K.OF.MAX .EQ 32 K.OF.MAX .EQ 32
K.USR.MAX .EQ 16
K.PS.MAX .EQ 32
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
K.USR.MAX .EQ 16 K.IRQDEV.MAX .EQ 4
*-------------------------------------- *--------------------------------------
ZPDRV .EQ $20 32 bytes ZPDRV .EQ $20 32 bytes
ZPLIB .EQ $40 32 bytes ZPLIB .EQ $40 32 bytes

View File

@ -12,13 +12,13 @@ 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
*-------------------------------------- *--------------------------------------
PS.Table.PID .EQ $1380 K.PS.MAX OF.Table.hPath .EQ $1380 K.OF.MAX
PS.Table.hPS .EQ $13A0 K.PS.MAX OF.Table.hFD .EQ $13A0 K.OF.MAX
PS.Table.Hits .EQ $13C0 K.PS.MAX
PS.Table.Stats .EQ $13E0 K.PS.MAX
*-------------------------------------- *--------------------------------------
OF.Table.hPath .EQ $1400 K.OF.MAX PS.Table.PID .EQ $13C0 K.PS.MAX
OF.Table.hFD .EQ $1420 K.OF.MAX PS.Table.hPS .EQ $13E0 K.PS.MAX
PS.Table.Hits .EQ $1400 K.PS.MAX
PS.Table.Stats .EQ $1420 K.PS.MAX
*-------------------------------------- *--------------------------------------
S.Table.hSession .EQ $1440 K.USR.MAX S.Table.hSession .EQ $1440 K.USR.MAX
S.Table.hFile .EQ $1450 K.USR.MAX S.Table.hFile .EQ $1450 K.USR.MAX

View File

@ -258,35 +258,47 @@ MemMgrInit >LDYAI Mem.MHiMem
sta CLRWRITEAUX sta CLRWRITEAUX
ldx #K.DEV.MAX*2-1 ldx #K.DEV.MAX*2-1
.1 stz Dev.Table,x .1 stz Dev.Table,x
dex dex
bpl .1 bpl .1
ldx #K.FLT.MAX*2-1 ldx #K.FLT.MAX*2-1
.11 stz Flt.Table.hPath,x .11 stz Flt.Table.hPath,x
dex dex
bpl .11 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
dex dex
bpl .2 bpl .2
ldx #K.PS.MAX*4-1 ldx #K.PS.MAX*4-1
.3 stz PS.Table.PID,x .3 stz PS.Table.PID,x
dex dex
bpl .3 bpl .3
ldx #K.OF.MAX*2-1 ldx #K.OF.MAX*2-1
.4 stz OF.Table.hPath,x .4 stz OF.Table.hPath,x
dex dex
bpl .4 bpl .4
ldx #K.EVT.MAX*S.EVT-1 ldx #K.EVT.MAX*S.EVT-1
.5 stz Evt.Table,x .5 stz Evt.Table,x
dex dex
bpl .5 bpl .5
ldx #K.USR.MAX*2-1 ldx #K.USR.MAX*2-1
.6 stz S.Table.hSession,x .6 stz S.Table.hSession,x
dex dex
bpl .6 bpl .6
rts rts
*-------------------------------------- *--------------------------------------
SysScrInit >LDYAI Mem.XHiMem SysScrInit >LDYAI Mem.XHiMem