Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-10-19 08:13:04 +02:00
parent 7f60e0e325
commit 1a3d46c79d
3 changed files with 29 additions and 48 deletions

Binary file not shown.

Binary file not shown.

View File

@ -90,8 +90,7 @@ Cmd.Exec.EXT ldy #0
>PUSHEA.G CMD.Stat Command line is already full path, no search
>LDYA ZPCMDBuf
>SYSCALL STAT
bcc .2
rts
bcs .99
.1 >LDYAI 256 Get a buffer for found path
>SYSCALL GetMem
@ -122,16 +121,22 @@ Cmd.Exec.EXT ldy #0
* CMD.hCmdLine = /path/bin
.2 >DEBUG
ldx #0
.2 ldx #0
jsr Cmd.RemoveStrAtX
>LDYA ZPCMDBuf
>SYSCALL puts
>DEBUG
>LDA.G CMD.hCmdLine
>SYSCALL GetMemPtr
ldx #0
jsr CMD.InsertStrYAAtX
>LDYA ZPCMDBuf
>SYSCALL puts
>DEBUG
>LDA.G CMD.hCmdLine
>SYSCALL FreeMem
@ -595,17 +600,9 @@ Cmd.INT.IF >STZ.G CMD.IFNOT
Cmd.InsertStrYAAtX
>STYA ZPPtr3 new string to insert
>LDYA ZPCMDBuf
>STYA ZPPtr1
jsr Cmd.GetStrAtX
bcs .9
.1 dex
bmi .2
jsr Cmd.NextStrPtr1
>STYA ZPPtr1
bra .1
.2 >LDYA ZPPtr1
>STYA ZPPtr4 Save Arg[x] ptr
>LDYA ZPPtr3
@ -646,20 +643,13 @@ Cmd.InsertStrYAAtX
bne .6
.8 clc
rts
.9 rts
*--------------------------------------
Cmd.RemoveStrAtX
>LDYA ZPCMDBuf
>STYA ZPPtr1
.1 dex
bmi .2
jsr Cmd.GetStrAtX
bcs .9
jsr Cmd.NextStrPtr1
>STYA ZPPtr1
bra .1
.2 jsr Cmd.NextStrPtr1
>STYA ZPPtr2
.3 ldy #0
@ -703,25 +693,25 @@ Cmd.GetStrAtX >LDYA ZPCMDBuf
bcc .1
rts
.8 clc
.8 >LDYA ZPPtr1
clc
rts
*--------------------------------------
Cmd.NextStrPtr1 lda (ZPPtr1)
beq .9
.1 inc ZPPtr1
bne .2
inc ZPPtr1+1
.2 lda (ZPPtr1)
bne .1
phx
>LDYA ZPPtr1
>SYSCALL strlen
pha
tya
sec +1
adc ZPPtr1
tay
pla
adc ZPPtr1+1
plx
* clc
inc ZPPtr1
bne .8
inc ZPPtr1+1
.8 clc
rts
.9 sec
@ -746,15 +736,6 @@ Cmd.NextStrPtr2 lda (ZPPtr2)
.9 sec
rts
*--------------------------------------
Cmd.NextCharPtr1
lda (ZPPtr1)
beq .8
inc ZPPtr1
bne .8
inc ZPPtr1+1 never Z
.8 rts
*--------------------------------------
Cmd.NextCharPtr2NB
.1 jsr Cmd.NextCharPtr2
beq .9