mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-30 08:51:06 +00:00
187 lines
3.6 KiB
Plaintext
187 lines
3.6 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
SHARED.GetKeyCharY
|
||
sta CLRREADAUX
|
||
lda (ZPSListDataPtr),y
|
||
sta SETREADAUX
|
||
beq SHARED.IsDigit.9
|
||
SHARED.IsIDValid
|
||
cmp #'.'
|
||
beq SHARED.IsDigit.8
|
||
|
||
cmp #'_'
|
||
beq SHARED.IsDigit.8
|
||
SHARED.IsDigitOrL
|
||
cmp #'z'+1
|
||
bcs SHARED.IsDigit.RTS
|
||
cmp #'a'
|
||
bcs SHARED.IsDigit.8
|
||
SHARED.IsDigitOrUC
|
||
cmp #'Z'+1
|
||
bcs SHARED.IsDigit.RTS
|
||
cmp #'A'
|
||
bcs SHARED.IsDigit.8
|
||
|
||
jmp ZP.IsDigit
|
||
SHARED.IsDigit.9
|
||
sec
|
||
rts
|
||
SHARED.IsDigit.8
|
||
clc
|
||
SHARED.IsDigit.RTS
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.IsHexDigit
|
||
jsr ZP.IsDigit
|
||
bcc .8
|
||
cmp #'A'
|
||
bcc SHARED.IsDigit.9
|
||
cmp #'F'+1
|
||
bcc .1
|
||
cmp #'a'
|
||
bcc SHARED.IsDigit.9
|
||
cmp #'f'+1
|
||
bcs SHARED.IsDigit.RTS
|
||
|
||
eor #$20
|
||
.1
|
||
* clc
|
||
sbc #'A'-11 cc so A->10 (11-CC)
|
||
clc
|
||
.8 and #$0F
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.SetKeyCharY
|
||
sta CLRWRITEAUX
|
||
sta (ZPSListDataPtr),y
|
||
sta SETWRITEAUX
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.GetDataByte
|
||
sta CLRREADAUX
|
||
lda (ZPSListDataPtr)
|
||
sta SETREADAUX
|
||
bra SHARED.SetDataByte.1
|
||
*--------------------------------------
|
||
SHARED.SetDataByte
|
||
sta CLRWRITEAUX
|
||
sta (ZPSListDataPtr)
|
||
sta SETWRITEAUX
|
||
SHARED.SetDataByte.1
|
||
inc ZPSListDataPtr
|
||
bne .8
|
||
inc ZPSListDataPtr+1
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.TXTPTR.GetY
|
||
sta CLRREADAUX
|
||
lda (TXTPTR),y
|
||
sta SETREADAUX
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.ZPPtr3.GetY
|
||
sta CLRREADAUX
|
||
lda (ZPPtr3),y
|
||
sta SETREADAUX
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.TXTPTR.GetNext
|
||
sta CLRREADAUX
|
||
lda (TXTPTR)
|
||
sta SETREADAUX
|
||
beq SHARED.RTS
|
||
SHARED.TXTPTR.Next
|
||
inc TXTPTR
|
||
bne SHARED.RTS
|
||
inc TXTPTR+1
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.FORPNT.getY
|
||
sta CLRREADAUX
|
||
lda (FORPNT),y
|
||
sta SETREADAUX
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.FORPNT.PutY
|
||
sta CLRWRITEAUX
|
||
sta (FORPNT),y
|
||
sta SETWRITEAUX
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.FORPNT.PutNext
|
||
sta CLRWRITEAUX
|
||
sta (FORPNT)
|
||
sta SETWRITEAUX
|
||
SHARED.FORPNT.Next
|
||
inc FORPNT
|
||
bne SHARED.RTS
|
||
inc FORPNT+1
|
||
SHARED.RTS rts
|
||
*--------------------------------------
|
||
SHARED.SPtr1PPtr2
|
||
>STYA ZPPtr1
|
||
>PULLW ZPPtr2
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.SPtr2PPtr1
|
||
>STYA ZPPtr2
|
||
>PULLW ZPPtr1
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.GetCharPtr1
|
||
lda (ZPPtr1)
|
||
beq SHARED.RTS
|
||
|
||
inc ZPPtr1
|
||
bne .8
|
||
inc ZPPtr1+1 never Z
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.AddYp1ToPtr1
|
||
sec
|
||
.HS 90 BCC
|
||
SHARED.AddYToPtr1
|
||
clc
|
||
tya
|
||
adc ZPPtr1
|
||
sta ZPPtr1
|
||
bcc .8
|
||
inc ZPPtr1+1
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.AddYp1ToPtr2
|
||
sec
|
||
.HS 90 BCC
|
||
SHARED.AddYToPtr2
|
||
clc
|
||
tya
|
||
adc ZPPtr2
|
||
sta ZPPtr2
|
||
bcc .8
|
||
clc keep CC as some JMP exit here
|
||
inc ZPPtr2+1
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.GetCharPtr2
|
||
lda (ZPPtr2)
|
||
bne SHARED.NextCharPtr2
|
||
rts
|
||
SHARED.PutCharPtr2
|
||
sta (ZPPtr2)
|
||
SHARED.NextCharPtr2
|
||
inc ZPPtr2
|
||
bne .8
|
||
inc ZPPtr2+1
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.PullYA sta CLRREADAUX
|
||
>PULLYA
|
||
sta SETREADAUX
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE USR/SRC/SYS/KERNEL.S.SHARED
|
||
LOAD USR/SRC/SYS/KERNEL.S
|
||
ASM
|