A2osX/SYS/KERNEL.S.SHARED.txt

183 lines
3.5 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
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.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
2020-01-21 11:06:59 +00:00
beq SHARED.RTS
2020-01-15 16:43:23 +00:00
SHARED.TXTPTR.Next
2019-07-26 14:23:07 +00:00
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
*--------------------------------------
2020-01-29 16:46:51 +00:00
SHARED.FORPNT.getY
sta CLRREADAUX
2020-02-03 19:41:04 +00:00
lda (FORPNT),y
2020-01-29 16:46:51 +00:00
sta SETREADAUX
rts
*--------------------------------------
2020-01-21 11:06:59 +00:00
SHARED.FORPNT.PutY
sta CLRWRITEAUX
sta (FORPNT),y
sta SETWRITEAUX
rts
*--------------------------------------
2020-02-18 15:34:56 +00:00
SHARED.FORPNT.GetNext
sta CLRREADAUX
lda (FORPNT)
sta SETREADAUX
bra SHARED.FORPNT.Next
*--------------------------------------
2020-01-21 11:06:59 +00:00
SHARED.FORPNT.PutNext
2020-01-21 07:34:32 +00:00
sta CLRWRITEAUX
sta (FORPNT)
sta SETWRITEAUX
2020-01-29 16:46:51 +00:00
SHARED.FORPNT.Next
2020-01-21 07:34:32 +00:00
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
*--------------------------------------
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.GetCharPtr1
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
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
*--------------------------------------
2020-02-18 15:34:56 +00:00
SHARED.ZPPtr3.GetY
sta CLRREADAUX
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
*--------------------------------------
2020-03-12 07:46:43 +00:00
SHARED.GetScrnDevX
sta CLRREADAUX
lda A2osX.SCRNDEVS,x
sta SETREADAUX
rts
*--------------------------------------
2020-05-04 20:46:21 +00:00
SHARED.GetPDrv ldy #S.FD.DEV.DRVPTR
lda (pFD),y
sta pDRV
iny
lda (pFD),y
sta pDRV+1
rts
*--------------------------------------
2020-05-28 21:13:52 +00:00
SHARED.ClrStat ldx #S.STAT-1
.1 stz K.S.STAT,x
dex
bpl .1
lda CORE.FSID
sta K.S.STAT+S.STAT.FSID
rts
*--------------------------------------
2020-05-04 20:46:21 +00:00
DEV.FIFO .AS "/dev/fifo" STAT,UNISTD
*--------------------------------------
2019-07-26 14:23:07 +00:00
MAN
SAVE USR/SRC/SYS/KERNEL.S.SHARED
LOAD USR/SRC/SYS/KERNEL.S
ASM