mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-18 06:07:29 +00:00
131 lines
1.8 KiB
Plaintext
131 lines
1.8 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
STRVX.StrVShift phy
|
||
|
||
jsr K.GetMemPtr
|
||
>STYA ZPPtr1 strV
|
||
|
||
plx
|
||
|
||
.1 inx
|
||
beq .2
|
||
|
||
jsr STRV.NStrPtr1
|
||
bcc .1
|
||
|
||
rts
|
||
|
||
.2 >LDYA ZPPtr1
|
||
>STYA ZPPtr2
|
||
|
||
jsr STRV.NStrPtr1
|
||
|
||
jsr STRV.Ptr1Ptr2cpy
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
STRVX.StrVGet phy
|
||
|
||
jsr K.GetMemPtr
|
||
>STYA ZPPtr1 strV
|
||
|
||
plx
|
||
|
||
.1 inx
|
||
beq .2
|
||
|
||
jsr STRV.NStrPtr1
|
||
bcc .1
|
||
|
||
rts
|
||
|
||
.2 lda (ZPPtr1)
|
||
tay
|
||
bne .3
|
||
|
||
sec
|
||
rts Y,A = 0
|
||
|
||
.3 lda FORPNT+1
|
||
beq .8
|
||
|
||
.4 ldy #$ff
|
||
|
||
.5 iny
|
||
lda (ZPPtr1),y
|
||
jsr SHARED.FORPNT.PutY
|
||
bne .5
|
||
|
||
>LDYA FORPNT
|
||
clc
|
||
rts
|
||
|
||
.8 >LDYA ZPPtr1
|
||
clc
|
||
.9 rts
|
||
*--------------------------------------
|
||
STRVX.StrVAdd jsr K.GetMemPtr
|
||
>STYA ZPPtr1
|
||
|
||
lda TXTPTR+1
|
||
bne .10
|
||
|
||
sta (ZPPtr1)
|
||
clc
|
||
rts
|
||
|
||
.10 lda #1 for \0
|
||
sta ZPPtr2
|
||
stz ZPPtr2+1
|
||
|
||
.1 jsr STRV.NStrPtr1
|
||
bcs .2
|
||
|
||
jsr SHARED.AddYp1ToPtr2
|
||
bra .1
|
||
|
||
.2 ldy #$ff
|
||
|
||
.3 iny
|
||
jsr SHARED.TXTPTR.GetY
|
||
bne .3
|
||
|
||
tya
|
||
sec
|
||
adc ZPPtr2
|
||
bcc .4
|
||
|
||
inc ZPPtr2+1
|
||
|
||
ldy #S.MEM.LEN
|
||
lda (ZPMemMgrSPtr),y
|
||
cmp ZPPtr2
|
||
|
||
iny
|
||
lda (ZPMemMgrSPtr),y
|
||
sbc ZPPtr2+1
|
||
bcs .4
|
||
|
||
lda #E.OOM
|
||
sec
|
||
rts
|
||
|
||
.4 ldy #$ff
|
||
|
||
.5 iny
|
||
jsr SHARED.TXTPTR.GetY
|
||
sta (ZPPtr1),y
|
||
bne .5
|
||
|
||
iny
|
||
sta (ZPPtr1),y StrV Ending \0
|
||
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE USR/SRC/SYS/KERNEL.S.STRVX
|
||
LOAD USR/SRC/SYS/KERNEL.S
|
||
ASM
|