A2osX/SYS/KERNEL.S.SHARED.txt

128 lines
2.4 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.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
2021-05-04 17:31:21 +00:00
bcs SHARED.RTS
2021-05-09 12:39:40 +00:00
2019-07-26 14:23:07 +00:00
cmp #'a'
2019-07-28 20:39:30 +00:00
bcs SHARED.IsDigit.8
2021-05-09 12:39:40 +00:00
2019-07-28 20:39:30 +00:00
cmp #'Z'+1
2021-05-04 17:31:21 +00:00
bcs SHARED.RTS
2021-05-09 12:39:40 +00:00
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
rts
2019-07-26 14:23:07 +00:00
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.TXTPTRgY sta CLRREADAUX
2019-07-26 14:23:07 +00:00
lda (TXTPTR),y
sta SETREADAUX
rts
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.TXTPTRgn sta CLRREADAUX
2019-07-26 14:23:07 +00:00
lda (TXTPTR)
sta SETREADAUX
2020-01-21 11:06:59 +00:00
beq SHARED.RTS
2021-05-04 17:31:21 +00:00
SHARED.TXTPTRn inc TXTPTR
2020-01-21 11:06:59 +00:00
bne SHARED.RTS
2019-07-26 14:23:07 +00:00
inc TXTPTR+1
2020-01-15 16:43:23 +00:00
rts
2019-07-26 14:23:07 +00:00
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.FORPNTgY sta CLRREADAUX
2020-02-03 19:41:04 +00:00
lda (FORPNT),y
2020-01-29 16:46:51 +00:00
sta SETREADAUX
rts
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.FORPNTpY sta CLRWRITEAUX
2020-01-21 11:06:59 +00:00
sta (FORPNT),y
sta SETWRITEAUX
rts
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.FORPNTgn sta CLRREADAUX
2020-02-18 15:34:56 +00:00
lda (FORPNT)
sta SETREADAUX
2021-05-04 17:31:21 +00:00
bra SHARED.FORPNTn
2020-02-18 15:34:56 +00:00
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.FORPNTpn sta CLRWRITEAUX
2020-01-21 07:34:32 +00:00
sta (FORPNT)
sta SETWRITEAUX
2021-05-04 17:31:21 +00:00
SHARED.FORPNTn inc FORPNT
2020-01-21 11:06:59 +00:00
bne SHARED.RTS
2020-01-21 07:34:32 +00:00
inc FORPNT+1
2020-01-21 11:06:59 +00:00
SHARED.RTS rts
2020-01-21 07:34:32 +00:00
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.GetCP1 lda (ZPPtr1)
2020-01-21 11:06:59 +00:00
beq SHARED.RTS
2019-07-26 14:23:07 +00:00
inc ZPPtr1
bne .8
2021-05-04 17:31:21 +00:00
2019-07-26 14:23:07 +00:00
inc ZPPtr1+1 never Z
.8 rts
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.AddYp12P1
2019-07-26 14:23:07 +00:00
sec
.HS 90 BCC
2021-05-04 17:31:21 +00:00
SHARED.AddY2P1 clc
2019-07-26 14:23:07 +00:00
tya
adc ZPPtr1
sta ZPPtr1
bcc .8
2021-05-04 17:31:21 +00:00
2019-07-26 14:23:07 +00:00
inc ZPPtr1+1
2021-05-04 17:31:21 +00:00
2019-07-26 14:23:07 +00:00
.8 rts
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.AddYp12P2
2019-07-26 14:23:07 +00:00
sec
.HS 90 BCC
2021-05-04 17:31:21 +00:00
SHARED.AddY2P2 clc
2019-07-26 14:23:07 +00:00
tya
adc ZPPtr2
sta ZPPtr2
bcc .8
2021-05-04 17:31:21 +00:00
2019-07-26 14:23:07 +00:00
clc keep CC as some JMP exit here
inc ZPPtr2+1
2021-05-04 17:31:21 +00:00
2019-07-26 14:23:07 +00:00
.8 rts
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.GetCP2 lda (ZPPtr2)
bne SHARED.NextCP2
2019-07-26 14:23:07 +00:00
rts
2021-05-04 17:31:21 +00:00
*--------------------------------------
SHARED.PutCP2 sta (ZPPtr2)
SHARED.NextCP2 inc ZPPtr2
2019-07-26 14:23:07 +00:00
bne .8
2021-05-04 17:31:21 +00:00
2019-07-26 14:23:07 +00:00
inc ZPPtr2+1
.8 rts
*--------------------------------------
2021-05-04 17:31:21 +00:00
SHARED.PullP2P1 >PULLW ZPPtr2
>PULLW ZPPtr1
rts
*--------------------------------------
SHARED.P3gY sta CLRREADAUX
2020-02-18 15:34:56 +00:00
lda (ZPPtr3),y
2019-07-29 15:38:55 +00:00
sta SETREADAUX
2020-02-18 15:34:56 +00:00
rts
2019-07-29 15:38:55 +00:00
*--------------------------------------
2019-07-26 14:23:07 +00:00
MAN
2020-12-15 13:23:22 +00:00
SAVE usr/src/sys/kernel.s.shared
LOAD usr/src/sys/kernel.s
2019-07-26 14:23:07 +00:00
ASM