mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-30 23:49:37 +00:00
128 lines
2.5 KiB
Plaintext
128 lines
2.5 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
SHARED.IsIDValid
|
||
cmp #'.'
|
||
beq SHARED.IsDigit.8
|
||
|
||
cmp #'_'
|
||
beq SHARED.IsDigit.8
|
||
SHARED.IsDigitOrL
|
||
cmp #'z'+1
|
||
bcs SHARED.RTS
|
||
|
||
cmp #'a'
|
||
bcs SHARED.IsDigit.8
|
||
|
||
cmp #'Z'+1
|
||
bcs SHARED.RTS
|
||
|
||
cmp #'A'
|
||
bcs SHARED.IsDigit.8
|
||
|
||
jmp ZP.IsDigit
|
||
SHARED.IsDigit.9
|
||
sec
|
||
rts
|
||
SHARED.IsDigit.8
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.TXTPTRgY sta IO.CLRREADAUX
|
||
lda (TXTPTR),y
|
||
sta IO.SETREADAUX
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.TXTPTRgn sta IO.CLRREADAUX
|
||
lda (TXTPTR)
|
||
sta IO.SETREADAUX
|
||
beq SHARED.RTS
|
||
SHARED.TXTPTRn inc TXTPTR
|
||
bne SHARED.RTS
|
||
inc TXTPTR+1
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.FORPNTgY sta IO.CLRREADAUX
|
||
lda (FORPNT),y
|
||
sta IO.SETREADAUX
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.FORPNTpY sta IO.CLRWRITEAUX
|
||
sta (FORPNT),y
|
||
sta IO.SETWRITEAUX
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.FORPNTgn sta IO.CLRREADAUX
|
||
lda (FORPNT)
|
||
sta IO.SETREADAUX
|
||
bra SHARED.FORPNTn
|
||
*--------------------------------------
|
||
SHARED.FORPNTpn sta IO.CLRWRITEAUX
|
||
sta (FORPNT)
|
||
sta IO.SETWRITEAUX
|
||
SHARED.FORPNTn inc FORPNT
|
||
bne SHARED.RTS
|
||
inc FORPNT+1
|
||
SHARED.RTS rts
|
||
*--------------------------------------
|
||
SHARED.GetCP1 lda (ZPPtr1)
|
||
beq SHARED.RTS
|
||
|
||
inc ZPPtr1
|
||
bne .8
|
||
|
||
inc ZPPtr1+1 never Z
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.AddYp12P1
|
||
sec
|
||
.HS 90 BCC
|
||
SHARED.AddY2P1 clc
|
||
tya
|
||
adc ZPPtr1
|
||
sta ZPPtr1
|
||
bcc .8
|
||
|
||
inc ZPPtr1+1
|
||
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.AddYp12P2
|
||
sec
|
||
.HS 90 BCC
|
||
SHARED.AddY2P2 clc
|
||
tya
|
||
adc ZPPtr2
|
||
sta ZPPtr2
|
||
bcc .8
|
||
|
||
clc keep CC as some JMP exit here
|
||
inc ZPPtr2+1
|
||
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.GetCP2 lda (ZPPtr2)
|
||
bne SHARED.NextCP2
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.PutCP2 sta (ZPPtr2)
|
||
SHARED.NextCP2 inc ZPPtr2
|
||
bne .8
|
||
|
||
inc ZPPtr2+1
|
||
.8 rts
|
||
*--------------------------------------
|
||
SHARED.PullP2P1 >PULLW ZPPtr2
|
||
>PULLW ZPPtr1
|
||
rts
|
||
*--------------------------------------
|
||
SHARED.P3gY sta IO.CLRREADAUX
|
||
lda (ZPPtr3),y
|
||
sta IO.SETREADAUX
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/sys/kernel.s.shared
|
||
LOAD usr/src/sys/kernel.s
|
||
ASM
|