Kernel 0.92

This commit is contained in:
Rémy GIBERT 2018-11-27 17:22:15 +01:00
parent 4579924c61
commit e92e9ed4d3
4 changed files with 36 additions and 31 deletions

Binary file not shown.

Binary file not shown.

View File

@ -333,22 +333,25 @@ K.realpath.I clc
lda (ZPPtr1),y
sta K.Buf256,x
bne .4
*--------------------------------------
* X=LEN, K.Buf256 = /dir1../file(/) /x0
*--------------------------------------
dex
beq .89 we have '/'....nothing to do...
lda K.Buf256,x Skip any / at the end of string....
lda K.Buf256,x
cmp #'/'
bne .5
dex
bne .50
stz K.Buf256,x remove ending / if any
*--------------------------------------
* X=LEN, K.Buf256 = /dir1/./../file\0
*--------------------------------------
.50 ldx #1
lda K.Buf256,x
beq .89
.5 ldy #0 dot counter=0
.6 lda K.Buf256,x
cmp #'/'
.6 cmp #'/'
beq .8
cmp #'.'
@ -358,34 +361,37 @@ K.realpath.I clc
.HS 2C BIT ABS, skip "LDY #0"
.7 ldy #0 not a dot....reset dot counter
txa
beq .89
dex
bra .6 always, should end with a '/'
inx
lda K.Buf256,x
bne .6 always, should end with a '/'
.8 tya
beq .80 Y was 0....nothing to do...
dey "/." ?
dey "./" ?
bne .9 no..
lda K.Buf256+2,x
beq .12
lda K.Buf256-2,x
cmp #'/' "/./" ?
bne .80
.12 jsr K.RealPath.RemoveAtX we found "/./", remove,useless....
dex
dex
jsr K.RealPath.RemoveAtX we found "/./", remove,useless....
bra .80
.9 dey "/.." ?
bne .90 "/..." ??!!...mmm...syntax error
.9 dey "../" ?
bne .90 ".../" ??!!...mmm...syntax error
lda K.Buf256+3,x
beq .11
lda K.Buf256-3,x
cmp #'/' "/../" ?
bne .80
dex
dex
dex
.11 txa we found "/../"
txa we found "/../"
beq .90 at the beginning of string...cannot remove /dir/..
jsr K.RealPath.RemoveAtX remove "/.."
@ -398,10 +404,9 @@ K.realpath.I clc
jsr K.RealPath.RemoveAtX ...remove "/dir"
.80 txa
beq .89 Empty path!!! go put back "/" an exit
dex
bra .5
.80 inx
lda K.Buf256,x
bne .5
*--------------------------------------
.89 lda #$ff SELF MODIFIED
bpl .98

View File

@ -128,13 +128,13 @@ M32.Cmp ldx #4
bne .4
lda #%010 001 ACC = ARG
lda #%010 010 ACC = ARG
rts
.4 lda #%100 010 ACC > ARG
.4 lda #%100 100 ACC > ARG
rts
.5 lda #%001 100 ACC < ARG
.5 lda #%001 001 ACC < ARG
rts
*--------------------------------------
MAN