A2osX/SYS/KERNEL.S.SHARED.txt

161 lines
3.1 KiB
Plaintext
Raw Normal View History

2019-07-26 14:23:07 +00:00
NEW
AUTO 3,1
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.GetKeyCharY
sta CLRREADAUX
2019-07-26 14:23:07 +00:00
lda (ZPSListDataPtr),y
sta SETREADAUX
2019-07-28 20:39:30 +00:00
beq SHARED.IsDigit.9
SHARED.IsIDValid
cmp #'.'
beq SHARED.IsDigit.8
2019-07-26 14:23:07 +00:00
cmp #'_'
2019-07-28 20:39:30 +00:00
beq SHARED.IsDigit.8
SHARED.IsDigitOrL
cmp #'z'+1
bcs SHARED.IsDigit.RTS
2019-07-26 14:23:07 +00:00
cmp #'a'
2019-07-28 20:39:30 +00:00
bcs SHARED.IsDigit.8
SHARED.IsDigitOrUC
cmp #'Z'+1
bcs SHARED.IsDigit.RTS
2019-07-26 14:23:07 +00:00
cmp #'A'
2019-07-28 20:39:30 +00:00
bcs SHARED.IsDigit.8
2019-07-26 14:23:07 +00:00
2019-07-28 20:39:30 +00:00
jmp ZP.IsDigit
SHARED.IsDigit.9
sec
2019-07-26 14:23:07 +00:00
rts
2019-07-28 20:39:30 +00:00
SHARED.IsDigit.8
clc
SHARED.IsDigit.RTS
rts
2019-07-26 14:23:07 +00:00
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.IsHexDigit
jsr ZP.IsDigit
2019-07-26 14:23:07 +00:00
bcc .8
cmp #'A'
2019-07-28 20:39:30 +00:00
bcc SHARED.IsDigit.9
2019-07-26 14:23:07 +00:00
cmp #'F'+1
bcc .1
cmp #'a'
2019-07-28 20:39:30 +00:00
bcc SHARED.IsDigit.9
2019-07-26 14:23:07 +00:00
cmp #'f'+1
2019-07-28 20:39:30 +00:00
bcs SHARED.IsDigit.RTS
2019-07-26 14:23:07 +00:00
eor #$20
2019-10-03 06:25:27 +00:00
.1
2019-07-26 14:23:07 +00:00
* clc
sbc #'A'-11 cc so A->10 (11-CC)
clc
2019-10-03 06:25:27 +00:00
.8 and #$0F
2019-07-26 14:23:07 +00:00
rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.SetKeyCharY
sta CLRWRITEAUX
2019-07-26 14:23:07 +00:00
sta (ZPSListDataPtr),y
sta SETWRITEAUX
rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.GetDataByte
sta CLRREADAUX
2019-07-26 14:23:07 +00:00
lda (ZPSListDataPtr)
sta SETREADAUX
2019-07-28 20:39:30 +00:00
bra SHARED.SetDataByte.1
2019-07-26 14:23:07 +00:00
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.SetDataByte
sta CLRWRITEAUX
2019-07-26 14:23:07 +00:00
sta (ZPSListDataPtr)
sta SETWRITEAUX
2019-10-03 06:25:27 +00:00
SHARED.SetDataByte.1
2019-07-26 14:23:07 +00:00
inc ZPSListDataPtr
bne .8
inc ZPSListDataPtr+1
.8 rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.TXTPTR.GetY
sta CLRREADAUX
2019-07-26 14:23:07 +00:00
lda (TXTPTR),y
sta SETREADAUX
rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.TXTPTR.GetNext
2019-07-26 14:23:07 +00:00
sta CLRREADAUX
lda (TXTPTR)
sta SETREADAUX
beq .9
inc TXTPTR
bne .9
inc TXTPTR+1
2019-10-03 06:25:27 +00:00
.9 rts
2019-07-26 14:23:07 +00:00
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.SPtr1PPtr2
>STYA ZPPtr1
2019-07-26 14:23:07 +00:00
>PULLW ZPPtr2
rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.SPtr2PPtr1
>STYA ZPPtr2
2019-07-26 14:23:07 +00:00
>PULLW ZPPtr1
rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.GetCharPtr1
lda (ZPPtr1)
bne SHARED.NextCharPtr1
2019-07-26 14:23:07 +00:00
rts
2019-07-28 20:39:30 +00:00
SHARED.PutCharPtr1
sta (ZPPtr1)
2019-10-03 06:25:27 +00:00
SHARED.NextCharPtr1
2019-07-26 14:23:07 +00:00
inc ZPPtr1
bne .8
inc ZPPtr1+1 never Z
.8 rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.AddYp1ToPtr1
2019-07-26 14:23:07 +00:00
sec
.HS 90 BCC
2019-07-28 20:39:30 +00:00
SHARED.AddYToPtr1
clc
2019-07-26 14:23:07 +00:00
tya
adc ZPPtr1
sta ZPPtr1
bcc .8
inc ZPPtr1+1
.8 rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.AddYp1ToPtr2
2019-07-26 14:23:07 +00:00
sec
.HS 90 BCC
2019-07-28 20:39:30 +00:00
SHARED.AddYToPtr2
clc
2019-07-26 14:23:07 +00:00
tya
adc ZPPtr2
sta ZPPtr2
bcc .8
clc keep CC as some JMP exit here
inc ZPPtr2+1
.8 rts
*--------------------------------------
2019-07-28 20:39:30 +00:00
SHARED.GetCharPtr2
lda (ZPPtr2)
bne SHARED.NextCharPtr2
2019-07-26 14:23:07 +00:00
rts
2019-07-28 20:39:30 +00:00
SHARED.PutCharPtr2
sta (ZPPtr2)
SHARED.NextCharPtr2
2019-07-26 14:23:07 +00:00
inc ZPPtr2
bne .8
inc ZPPtr2+1
.8 rts
*--------------------------------------
2019-07-29 15:38:55 +00:00
SHARED.PullYA sta CLRREADAUX
2019-08-30 15:16:58 +00:00
>PULLYA
2019-07-29 15:38:55 +00:00
sta SETREADAUX
rts
*--------------------------------------
2019-07-26 14:23:07 +00:00
MAN
SAVE USR/SRC/SYS/KERNEL.S.SHARED
LOAD USR/SRC/SYS/KERNEL.S
ASM