2020-01-24 14:21:08 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*/--------------------------------------
|
2020-03-09 16:24:08 +00:00
|
|
|
|
* # StrVGet
|
2020-01-30 14:59:40 +00:00
|
|
|
|
* ## ASM
|
|
|
|
|
* `>PUSHB hSTRV`
|
|
|
|
|
* `>PUSHB index`
|
2020-03-09 16:24:08 +00:00
|
|
|
|
* `>PUSHW ptr`
|
|
|
|
|
* `>SYSCALL StrVGet`
|
2020-01-24 14:21:08 +00:00
|
|
|
|
* ## RETURN VALUE
|
2020-03-09 16:24:08 +00:00
|
|
|
|
* CC: Y,A = Ptr
|
|
|
|
|
* CS: Y,A = NULL
|
2020-01-24 14:21:08 +00:00
|
|
|
|
*\--------------------------------------
|
2020-03-09 16:24:08 +00:00
|
|
|
|
K.StrVGet >PULLW FORPNT ptr
|
2020-01-24 14:21:08 +00:00
|
|
|
|
*/--------------------------------------
|
2020-03-09 16:24:08 +00:00
|
|
|
|
* # StrVShift
|
2020-01-28 16:42:51 +00:00
|
|
|
|
* ## ASM
|
|
|
|
|
* `>PUSHB hSTRV`
|
2020-01-30 14:59:40 +00:00
|
|
|
|
* `>PUSHB index`
|
2020-03-09 16:24:08 +00:00
|
|
|
|
* `>SYSCALL StrVShift`
|
2020-01-24 14:21:08 +00:00
|
|
|
|
* ## RETURN VALUE
|
|
|
|
|
*\--------------------------------------
|
2020-03-09 16:24:08 +00:00
|
|
|
|
K.StrVShift >PULLA index
|
2020-01-28 16:42:51 +00:00
|
|
|
|
eor #$ff
|
2020-03-10 16:42:07 +00:00
|
|
|
|
tay
|
2020-03-09 16:24:08 +00:00
|
|
|
|
|
2020-03-10 16:42:07 +00:00
|
|
|
|
>PULLA hSTRV
|
|
|
|
|
jmp K.SYSCALL.JMPX
|
2020-01-28 16:42:51 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* # StrVAdd
|
|
|
|
|
* ## ASM
|
|
|
|
|
* `>PUSHB hSTRV`
|
|
|
|
|
* `>PUSHW str`
|
|
|
|
|
* `>SYSCALL StrVAdd`
|
|
|
|
|
* ## RETURN VALUE
|
2020-01-30 14:59:40 +00:00
|
|
|
|
* CC : str added to hSTRV
|
|
|
|
|
* CS : hSTRV full
|
2020-01-28 16:42:51 +00:00
|
|
|
|
*\--------------------------------------
|
2020-02-07 15:35:52 +00:00
|
|
|
|
K.StrVAdd >PULLW TXTPTR str
|
2020-01-30 14:59:40 +00:00
|
|
|
|
>PULLA
|
2020-03-10 16:42:07 +00:00
|
|
|
|
jmp K.SYSCALL.JMPX
|
2020-01-28 16:42:51 +00:00
|
|
|
|
*--------------------------------------
|
2020-03-12 16:44:11 +00:00
|
|
|
|
STRV.NStrPtr1 ldy #$ff
|
|
|
|
|
|
|
|
|
|
.1 iny
|
|
|
|
|
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1
|
|
|
|
|
bne .1
|
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.2 tya
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1
|
|
|
|
|
bne .8
|
|
|
|
|
inc ZPPtr1+1 skip \0
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 sec Y,A = 0
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
STRV.Ptr1Ptr2cpy
|
|
|
|
|
ldx #0
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.4 lda (ZPPtr1),y
|
|
|
|
|
sta (ZPPtr2),y
|
|
|
|
|
beq .6
|
|
|
|
|
|
|
|
|
|
.5 iny
|
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
inc ZPPtr2+1
|
|
|
|
|
bra .4
|
|
|
|
|
|
|
|
|
|
.6 inx
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
inc ZPPtr2+1
|
|
|
|
|
|
|
|
|
|
.7 lda (ZPPtr1),y
|
|
|
|
|
sta (ZPPtr2),y Ending \0 ?
|
|
|
|
|
bne .5
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-01-24 14:21:08 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.STRV
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
|
|
|
|
ASM
|