mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-12 14:29:33 +00:00
Kernel 0.9.1 : ASM rewrite, SLIST Debugging
This commit is contained in:
parent
cc36ac74e5
commit
ce0894c9c6
Binary file not shown.
Binary file not shown.
@ -99,7 +99,7 @@ SRC.ParseLine lda #0
|
||||
|
||||
jsr SYM.LookupGlobal
|
||||
bcs SRC.ParseLine.Undef
|
||||
jsr SYM.UpdateGlobal
|
||||
* jsr SYM.UpdateGlobal
|
||||
bra SRC.ParseLine.DirOp
|
||||
|
||||
.6 jsr SYM.AddGlobalPC
|
||||
|
@ -41,7 +41,7 @@ SYM.Dump >LDYA L.MSG.SYMBOLS
|
||||
|
||||
stz ZPLinePtr
|
||||
stz ZPLinePtr+1
|
||||
|
||||
>DEBUG
|
||||
.1 >PUSHB.G SYM.hGlobals
|
||||
>PUSHW ZPLinePtr
|
||||
>PUSHW ZPTmpBuf
|
||||
@ -70,7 +70,7 @@ SYM.Dump >LDYA L.MSG.SYMBOLS
|
||||
|
||||
>LDYA L.MSG.GSYMBOL
|
||||
>SYSCALL PrintF.YA
|
||||
>DEBUG
|
||||
|
||||
bcc .1
|
||||
rts
|
||||
|
||||
|
@ -268,7 +268,6 @@ CS.RUN >SYSCALL GetChar
|
||||
.9 pha
|
||||
jsr SRC.PrintLineErr
|
||||
|
||||
>DEBUG
|
||||
jsr SYM.Dump
|
||||
pla
|
||||
pha
|
||||
|
@ -384,9 +384,9 @@ S.PS.PC .EQ 14
|
||||
S.PS.ARGC .EQ 16
|
||||
S.PS.hARGS .EQ 17
|
||||
|
||||
S.PS.ZP .EQ 24 24 Bytes
|
||||
S.PS.ZP .EQ 24 8+32 Bytes
|
||||
*
|
||||
S.PS .EQ 48
|
||||
S.PS .EQ 64
|
||||
*--------------------------------------
|
||||
* LIB Function Indexes
|
||||
*--------------------------------------
|
||||
|
@ -74,7 +74,7 @@ SLIST.Lookup jsr SLIST.Search
|
||||
tax
|
||||
jsr MEM.SetDataByteY
|
||||
|
||||
.1 jsr SLIST.NextBlockByte
|
||||
.1 jsr SLIST.GetNextBlockByte
|
||||
iny
|
||||
jsr MEM.SetDataByteY
|
||||
dex
|
||||
@ -97,26 +97,26 @@ SLIST.GetByID jsr SLIST.Select
|
||||
|
||||
jsr MEM.SetDataByteY
|
||||
|
||||
.1 jsr SLIST.NextBlockByte
|
||||
.1 jsr SLIST.GetNextBlockByte
|
||||
iny
|
||||
jsr MEM.SetDataByteY
|
||||
dex
|
||||
bne .1
|
||||
|
||||
jsr SLIST.NextBlockByte
|
||||
jsr SLIST.GetNextBlockByte
|
||||
|
||||
tax
|
||||
|
||||
iny
|
||||
jsr MEM.SetDataByteY
|
||||
|
||||
.2 jsr SLIST.NextBlockByte
|
||||
.2 jsr SLIST.GetNextBlockByte
|
||||
iny
|
||||
jsr MEM.SetDataByteY
|
||||
dex
|
||||
bne .2
|
||||
|
||||
jsr SLIST.NextBlockByte
|
||||
jsr SLIST.GetNextBlockByte
|
||||
|
||||
lda SLIST.IndexOfs
|
||||
ldy SLIST.BlockOfs
|
||||
@ -133,11 +133,11 @@ SLIST.UpdateByID
|
||||
jsr SLIST.GetBlockByte
|
||||
tax
|
||||
|
||||
.1 jsr SLIST.NextBlockByte
|
||||
.1 jsr SLIST.GetNextBlockByte
|
||||
dex
|
||||
bne .1
|
||||
|
||||
jsr SLIST.NextBlockByte set pos at DATALEN
|
||||
jsr SLIST.GetNextBlockByte set pos at DATALEN
|
||||
|
||||
ldy #0
|
||||
|
||||
@ -196,7 +196,7 @@ SLIST.Select jsr K.GetMemPtr.A
|
||||
sty SLIST.IndexOfs
|
||||
|
||||
lda (ZPSListIndex),y
|
||||
|
||||
beq *
|
||||
jsr K.GetMemPtr.A
|
||||
>STYA ZPSListBlock
|
||||
|
||||
@ -211,7 +211,7 @@ SLIST.Search jsr K.GetMemPtr.A
|
||||
stz SLIST.ID+1
|
||||
|
||||
lda (ZPSListIndex)
|
||||
|
||||
beq *
|
||||
jsr K.GetMemPtr.A
|
||||
>STYA ZPSListBlock
|
||||
|
||||
@ -219,18 +219,21 @@ SLIST.Search jsr K.GetMemPtr.A
|
||||
stz SLIST.ID
|
||||
|
||||
jsr SLIST.GetBlockByte
|
||||
|
||||
tax
|
||||
beq .9
|
||||
|
||||
|
||||
.1 ldy #0
|
||||
|
||||
cmp #30
|
||||
bcs *
|
||||
|
||||
|
||||
.2 jsr MEM.GetKeyCharY
|
||||
bcs .4
|
||||
bcs .40
|
||||
iny
|
||||
sta .3+1
|
||||
|
||||
jsr SLIST.NextBlockByte
|
||||
jsr SLIST.GetNextBlockByte
|
||||
.3 cmp #$ff SELF MODIFIED
|
||||
bne .4
|
||||
|
||||
@ -240,25 +243,30 @@ SLIST.Search jsr K.GetMemPtr.A
|
||||
jsr MEM.GetKeyCharY
|
||||
bcs .8 End of Key....match!!!!
|
||||
|
||||
jsr SLIST.NextBlockByte
|
||||
jsr SLIST.GetNextBlockByte
|
||||
bra .41
|
||||
|
||||
.8 jsr SLIST.NextBlockByte Advance to DATA LEN
|
||||
.8 jsr SLIST.GetNextBlockByte Advance to DATA LEN
|
||||
|
||||
clc Y = Key Length
|
||||
rts
|
||||
|
||||
.4 jsr SLIST.NextBlockByte skip remaining key chars
|
||||
.40 inx
|
||||
|
||||
.4 jsr SLIST.GetNextBlockByte skip remaining key chars
|
||||
dex
|
||||
bne .4
|
||||
|
||||
cmp #30
|
||||
bcs *
|
||||
|
||||
.41 tax A=get Data Len
|
||||
|
||||
.5 jsr SLIST.NextBlockByte skip data bytes
|
||||
.5 jsr SLIST.GetNextBlockByte skip data bytes
|
||||
dex
|
||||
bne .5
|
||||
|
||||
jsr SLIST.NextBlockByte
|
||||
jsr SLIST.GetNextBlockByte
|
||||
|
||||
ldx SLIST.IndexOfs
|
||||
stx SLIST.ID+1
|
||||
@ -271,26 +279,42 @@ SLIST.Search jsr K.GetMemPtr.A
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
SLIST.NextBlockByte
|
||||
inc SLIST.BlockOfs
|
||||
bne SLIST.GetBlockByte
|
||||
|
||||
SLIST.GetNextBlockByte
|
||||
phy
|
||||
inc SLIST.IndexOfs
|
||||
ldy SLIST.IndexOfs
|
||||
ldy SLIST.BlockOfs
|
||||
iny
|
||||
beq .1
|
||||
|
||||
lda (ZPSListBlock),y
|
||||
sty SLIST.BlockOfs
|
||||
ply
|
||||
rts
|
||||
|
||||
.1 ldy SLIST.IndexOfs
|
||||
iny
|
||||
lda (ZPSListIndex),y
|
||||
beq .9
|
||||
|
||||
sty SLIST.IndexOfs
|
||||
|
||||
jsr K.GetMemPtr.A
|
||||
>STYA ZPSListBlock
|
||||
* stz SLIST.BlockOfs
|
||||
.HS A9 lda imm
|
||||
stz SLIST.BlockOfs
|
||||
|
||||
lda (ZPSListBlock)
|
||||
ply
|
||||
rts
|
||||
|
||||
.9 >DEBUG
|
||||
lda #0
|
||||
ply
|
||||
rts
|
||||
|
||||
SLIST.GetBlockByte
|
||||
phy
|
||||
ldy SLIST.BlockOfs
|
||||
lda (ZPSListBlock),y
|
||||
|
||||
ply
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
SLIST.AddBlockByte
|
||||
@ -300,23 +324,27 @@ SLIST.AddBlockByte
|
||||
inc SLIST.BlockOfs
|
||||
bne .8
|
||||
|
||||
inc SLIST.IndexOfs
|
||||
|
||||
phx
|
||||
>LDYAI 256
|
||||
jsr K.GetMem0.YA
|
||||
bcs .9
|
||||
>STYA ZPSListBlock
|
||||
txa
|
||||
|
||||
inc SLIST.IndexOfs
|
||||
ldy SLIST.IndexOfs
|
||||
sta (ZPSListIndex),y
|
||||
|
||||
* stz SLIST.BlockOfs
|
||||
|
||||
plx
|
||||
|
||||
.8 ply
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 ply
|
||||
.9 plx
|
||||
ply
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -331,7 +359,7 @@ SLIST.SetBlockByte
|
||||
|
||||
ldy SLIST.IndexOfs
|
||||
lda (ZPSListIndex),y
|
||||
|
||||
beq *
|
||||
jsr K.GetMemPtr.A
|
||||
>STYA ZPSListBlock
|
||||
* stz SLIST.BlockOfs
|
||||
|
Loading…
Reference in New Issue
Block a user