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.Upd jsr SCRN.UpdateStatusBar
bcs .9
bcs Prompt.Find.RTS
jmp SCRN.UpdateMain
.9Prompt.Help.RTS
rts
*--------------------------------------
Prompt.Find cmp #3
bne .1
@ -484,7 +482,8 @@ Prompt.Find cmp #3
bne .2
.2
clc
.9 rts
.9
Prompt.Find.RTS rts
*--------------------------------------
Prompt.Replace cmp #3
bne .1

View File

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

View File

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

View File

@ -285,6 +285,7 @@ CS.RUN.LOOP >SLEEP
cmp #3 Ctrl-C
bne .4
lda (pData) batch mode ?
beq .5
@ -299,7 +300,9 @@ CS.RUN.LOOP >SLEEP
bpl .5 not from PAUSE command
cpx #C.CR
bne .3
bne .5
jsr CheckLFAfterCR Check for any extra LF
bcs .9
.5 >STZ.G bPause
*--------------------------------------
@ -426,6 +429,17 @@ CS.QUIT jsr HIS.Quit
clc
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
lda (pData),y
dey

View File

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

View File

@ -9,16 +9,19 @@ K.MEM.nALIGNm1 .EQ $F0
*K.MEM.ALIGN .EQ 64
*K.MEM.nALIGNm1 .EQ $C0
*--------------------------------------
K.IRQDEV.MAX .EQ 4
K.DEV.MAX .EQ 14
K.DEV.MAX .EQ 28
K.FLT.MAX .EQ 4
K.NOD.MAX .EQ 32
K.PS.MAX .EQ 32
K.OF.MAX .EQ 32
K.USR.MAX .EQ 16
K.PS.MAX .EQ 32
K.EVT.MAX .EQ 4
K.SCR.MAX .EQ 6
K.TTY.MAX .EQ 4
K.USR.MAX .EQ 16
K.IRQDEV.MAX .EQ 4
*--------------------------------------
ZPDRV .EQ $20 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.hFD .EQ $1360 K.NOD.MAX
*--------------------------------------
PS.Table.PID .EQ $1380 K.PS.MAX
PS.Table.hPS .EQ $13A0 K.PS.MAX
PS.Table.Hits .EQ $13C0 K.PS.MAX
PS.Table.Stats .EQ $13E0 K.PS.MAX
OF.Table.hPath .EQ $1380 K.OF.MAX
OF.Table.hFD .EQ $13A0 K.OF.MAX
*--------------------------------------
OF.Table.hPath .EQ $1400 K.OF.MAX
OF.Table.hFD .EQ $1420 K.OF.MAX
PS.Table.PID .EQ $13C0 K.PS.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.hFile .EQ $1450 K.USR.MAX

View File

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