mirror of https://github.com/A2osX/A2osX.git
parent
a417f7aba6
commit
949d7e3b22
Binary file not shown.
|
@ -149,10 +149,6 @@ EXP.Eval.Next stz SRC.ACC
|
||||||
bcs EXP.EvalExitSYN
|
bcs EXP.EvalExitSYN
|
||||||
|
|
||||||
jsr SYM.LookupGlobal
|
jsr SYM.LookupGlobal
|
||||||
.DO ASMDBG=1
|
|
||||||
lda #"?"
|
|
||||||
jsr EXP.DBG
|
|
||||||
.FIN
|
|
||||||
bcc EXP.EvalOperator
|
bcc EXP.EvalOperator
|
||||||
EXP.EvalExitRTS rts
|
EXP.EvalExitRTS rts
|
||||||
|
|
||||||
|
@ -225,11 +221,6 @@ EXP.EvalOperator
|
||||||
lda SRC.ACC.F
|
lda SRC.ACC.F
|
||||||
sta SRC.ARG.F
|
sta SRC.ARG.F
|
||||||
|
|
||||||
.DO ASMDBG=1
|
|
||||||
lda #'@'
|
|
||||||
jsr EXP.DBG
|
|
||||||
.FIN
|
|
||||||
|
|
||||||
jmp EXP.Eval.Next0
|
jmp EXP.Eval.Next0
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
EXP.GetLocal jsr SRC.GetNextChar
|
EXP.GetLocal jsr SRC.GetNextChar
|
||||||
|
|
|
@ -287,17 +287,6 @@ OUT.PrintLineErr
|
||||||
>PUSHBI 1
|
>PUSHBI 1
|
||||||
jsr OUT.Print
|
jsr OUT.Print
|
||||||
|
|
||||||
.DO ASMDBG=1
|
|
||||||
>PUSHW L.MSG.EQU0+2
|
|
||||||
>PUSHB (ZPSymbolBuf) flags
|
|
||||||
>PUSHBI 1
|
|
||||||
>SYSCALL printf
|
|
||||||
|
|
||||||
>LDYA L.MSG.CRLF
|
|
||||||
>STYA ZPTmpBuf
|
|
||||||
jsr SYM.Dump.GLP
|
|
||||||
.FIN
|
|
||||||
|
|
||||||
jmp OUT.PrintCR
|
jmp OUT.PrintCR
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
OUT.PrintLineErrDashA
|
OUT.PrintLineErrDashA
|
||||||
|
@ -316,6 +305,12 @@ OUT.PrintLineErrDashA
|
||||||
.8 clc
|
.8 clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
|
OUT.PrintWarn1 jsr OUT.PrintLine.1
|
||||||
|
|
||||||
|
>LDYA L.MSG.WARN1
|
||||||
|
>SYSCALL PutS
|
||||||
|
rts
|
||||||
|
*---------------------------------------
|
||||||
OUT.Print >SYSCALL PrintF
|
OUT.Print >SYSCALL PrintF
|
||||||
bcs OUT.Print.RTS
|
bcs OUT.Print.RTS
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
|
|
|
@ -847,23 +847,31 @@ SRC.GetKeyword >STYA ZPPtr1 KeyWord table
|
||||||
|
|
||||||
.3 lda (ZPLinePtr),y
|
.3 lda (ZPLinePtr),y
|
||||||
beq .6
|
beq .6
|
||||||
|
|
||||||
jsr SRC.IsKeywordLetterUC
|
jsr SRC.IsKeywordLetterUC
|
||||||
bcs .6
|
bcs .6
|
||||||
|
|
||||||
iny
|
iny
|
||||||
cmp (ZPPtr1),y
|
cmp (ZPPtr1),y
|
||||||
bne .7
|
bne .7
|
||||||
|
|
||||||
dex
|
dex
|
||||||
bne .3
|
bne .3
|
||||||
|
|
||||||
lda (ZPLinePtr),y All chars match...
|
lda (ZPLinePtr),y All chars match...
|
||||||
beq .4 End of Line ?
|
beq .4 End of Line ?
|
||||||
|
|
||||||
jsr SRC.IsKeywordLetterUC
|
jsr SRC.IsKeywordLetterUC
|
||||||
bcc .7 Additional letters...
|
bcc .7 Additional letters...
|
||||||
|
|
||||||
.4 lda ZPLinePtr found!
|
.4 lda ZPLinePtr found!
|
||||||
clc
|
clc
|
||||||
adc (ZPPtr1) skip KW in source line
|
adc (ZPPtr1) skip KW in source line
|
||||||
sta ZPLinePtr
|
sta ZPLinePtr
|
||||||
bcc .5
|
bcc .5
|
||||||
|
|
||||||
inc ZPLinePtr+1
|
inc ZPLinePtr+1
|
||||||
|
|
||||||
.5 plx Keyword.ID
|
.5 plx Keyword.ID
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
@ -874,43 +882,57 @@ SRC.GetKeyword >STYA ZPPtr1 KeyWord table
|
||||||
adc ZPPtr1
|
adc ZPPtr1
|
||||||
sta ZPPtr1
|
sta ZPPtr1
|
||||||
bcc .8
|
bcc .8
|
||||||
|
|
||||||
inc ZPPtr1+1
|
inc ZPPtr1+1
|
||||||
|
|
||||||
.8 plx Keyword.ID
|
.8 plx Keyword.ID
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.9 plx
|
.9 plx
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.IsAMReserved
|
SRC.IsAMReserved
|
||||||
ldx SRC.AM.RESERVED
|
ldx SRC.AM.RESERVED
|
||||||
|
|
||||||
.1 cmp SRC.AM.RESERVED,x
|
.1 cmp SRC.AM.RESERVED,x
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
dex
|
dex
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.IsMODReserved
|
SRC.IsMODReserved
|
||||||
ldx SRC.MOD.RESERVED
|
ldx SRC.MOD.RESERVED
|
||||||
|
|
||||||
.1 cmp SRC.MOD.RESERVED,x
|
.1 cmp SRC.MOD.RESERVED,x
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
dex
|
dex
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.IsEXPReserved
|
SRC.IsEXPReserved
|
||||||
ldx SRC.EXP.RESERVED
|
ldx SRC.EXP.RESERVED
|
||||||
|
|
||||||
.1 cmp SRC.EXP.RESERVED,x
|
.1 cmp SRC.EXP.RESERVED,x
|
||||||
beq SRC.IsEXPReserved.8
|
beq SRC.IsEXPReserved.8
|
||||||
|
|
||||||
dex
|
dex
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
SRC.IsEXPReserved.8
|
SRC.IsEXPReserved.8
|
||||||
|
@ -918,22 +940,22 @@ SRC.IsEXPReserved.8
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.IsKeywordLetterUC
|
SRC.IsKeywordLetterUC
|
||||||
cmp #'.'
|
|
||||||
beq SRC.IsEXPReserved.8
|
|
||||||
|
|
||||||
cmp #'_'
|
|
||||||
beq SRC.IsEXPReserved.8
|
|
||||||
|
|
||||||
cmp #'A'
|
cmp #'A'
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
cmp #'Z'+1
|
cmp #'Z'+1
|
||||||
bcc .99
|
bcc .99
|
||||||
|
|
||||||
cmp #'a'
|
cmp #'a'
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
cmp #'z'+1
|
cmp #'z'+1
|
||||||
|
bcs .99
|
||||||
|
|
||||||
eor #$20
|
eor #$20
|
||||||
|
|
||||||
rts CC if lowercase
|
rts CC if lowercase
|
||||||
|
|
||||||
.9 sec
|
.9 sec
|
||||||
.99 rts
|
.99 rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
|
@ -941,26 +963,41 @@ SRC.IsLetterOrDigit
|
||||||
jsr SRC.IsDigit10
|
jsr SRC.IsDigit10
|
||||||
bcc SRC.IsLetterRTS
|
bcc SRC.IsLetterRTS
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.IsLetter cmp #'A'
|
SRC.IsLetter cmp #'_'
|
||||||
|
beq .8
|
||||||
|
|
||||||
|
cmp #'A'
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
cmp #'Z'+1
|
cmp #'Z'+1
|
||||||
bcc SRC.IsLetterRTS
|
bcc SRC.IsLetterRTS
|
||||||
|
|
||||||
cmp #'a'
|
cmp #'a'
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
cmp #'z'+1
|
cmp #'z'+1
|
||||||
|
|
||||||
rts CC if lowercase
|
rts CC if lowercase
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
rts
|
||||||
|
|
||||||
.9 sec
|
.9 sec
|
||||||
|
|
||||||
SRC.IsLetterRTS rts
|
SRC.IsLetterRTS rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.IsDigit16 jsr SRC.IsDigit10
|
SRC.IsDigit16 jsr SRC.IsDigit10
|
||||||
bcc .8
|
bcc .8
|
||||||
|
|
||||||
cmp #'A'
|
cmp #'A'
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
cmp #'F'+1
|
cmp #'F'+1
|
||||||
bcc .1
|
bcc .1
|
||||||
|
|
||||||
cmp #'a'
|
cmp #'a'
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
cmp #'f'+1
|
cmp #'f'+1
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
|
@ -968,23 +1005,33 @@ SRC.IsDigit16 jsr SRC.IsDigit10
|
||||||
.1
|
.1
|
||||||
* clc
|
* clc
|
||||||
sbc #'A'-11 cc so A->10 (11-CC)
|
sbc #'A'-11 cc so A->10 (11-CC)
|
||||||
|
|
||||||
clc
|
clc
|
||||||
|
|
||||||
.8 and #$0F
|
.8 and #$0F
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.9 sec
|
.9 sec
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.IsDigit10 cmp #'0'
|
SRC.IsDigit10 cmp #'0'
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
cmp #'9'+1
|
cmp #'9'+1
|
||||||
|
|
||||||
rts cc if ok, cs if not
|
rts cc if ok, cs if not
|
||||||
|
|
||||||
.9 sec
|
.9 sec
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.IsDigit8 cmp #'0'
|
SRC.IsDigit8 cmp #'0'
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
cmp #'7'+1
|
cmp #'7'+1
|
||||||
|
|
||||||
rts cc if ok, cs if not
|
rts cc if ok, cs if not
|
||||||
|
|
||||||
.9 sec
|
.9 sec
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
|
@ -1003,15 +1050,18 @@ SRC.SkipXp1 sec
|
||||||
SRC.GetNextCharNB
|
SRC.GetNextCharNB
|
||||||
jsr SRC.GetNextChar
|
jsr SRC.GetNextChar
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
cmp #C.SPACE
|
cmp #C.SPACE
|
||||||
beq SRC.GetNextCharNB
|
beq SRC.GetNextCharNB
|
||||||
|
|
||||||
clc
|
clc
|
||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SRC.GetNextChar lda (ZPLinePtr)
|
SRC.GetNextChar lda (ZPLinePtr)
|
||||||
beq SRC.GetChar.ERR
|
beq SRC.GetChar.ERR
|
||||||
|
|
||||||
cmp #$0D
|
cmp #C.CR
|
||||||
beq SRC.GetChar.ERR
|
beq SRC.GetChar.ERR
|
||||||
|
|
||||||
inc ZPLinePtr
|
inc ZPLinePtr
|
||||||
|
@ -1022,7 +1072,7 @@ SRC.GetNextChar lda (ZPLinePtr)
|
||||||
SRC.GetChar lda (ZPLinePtr)
|
SRC.GetChar lda (ZPLinePtr)
|
||||||
beq SRC.GetChar.ERR
|
beq SRC.GetChar.ERR
|
||||||
|
|
||||||
cmp #$0D
|
cmp #C.CR
|
||||||
beq SRC.GetChar.ERR
|
beq SRC.GetChar.ERR
|
||||||
|
|
||||||
clc
|
clc
|
||||||
|
@ -1079,7 +1129,12 @@ SRC.GetACCSize lda SRC.ACC.F
|
||||||
and #SYMG.F.FWREF
|
and #SYMG.F.FWREF
|
||||||
beq .1
|
beq .1
|
||||||
|
|
||||||
ldx #2
|
lda SRC.ACC+1
|
||||||
|
bne .10
|
||||||
|
|
||||||
|
jsr OUT.PrintWarn1
|
||||||
|
|
||||||
|
.10 ldx #2
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.1 ldx SRC.ACC.SIZE
|
.1 ldx SRC.ACC.SIZE
|
||||||
|
|
|
@ -20,12 +20,21 @@ SYM.Init lda #SL..+SL._
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>STA.G SYM.hList
|
>STA.G SYM.hList
|
||||||
|
|
||||||
|
lda #SL..+SL._
|
||||||
|
>SYSCALL SListNew
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
>STA.G FWR.hList
|
||||||
|
|
||||||
>LDYAI 256
|
>LDYAI 256
|
||||||
>SYSCALL GetMem
|
>SYSCALL GetMem
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>STYA ZPSymbolBuf
|
>STYA ZPSymbolBuf
|
||||||
txa
|
txa
|
||||||
>STA.G SYM.hBuf
|
>STA.G SYM.hBuf
|
||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SYM.Quit >LDA.G SYM.hBuf
|
SYM.Quit >LDA.G SYM.hBuf
|
||||||
|
@ -33,7 +42,12 @@ SYM.Quit >LDA.G SYM.hBuf
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
|
|
||||||
.1 >LDA.G SYM.hList
|
.1 >LDA.G FWR.hList
|
||||||
|
beq .2
|
||||||
|
|
||||||
|
>SYSCALL SListFree
|
||||||
|
|
||||||
|
.2 >LDA.G SYM.hList
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
>SYSCALL SListFree
|
>SYSCALL SListFree
|
||||||
|
@ -59,9 +73,7 @@ SYM.NewGlobal >LDA.G ASM.PASS
|
||||||
|
|
||||||
jsr SRC.SkipX
|
jsr SRC.SkipX
|
||||||
|
|
||||||
.1 stz SRC.ACC.F
|
stz SRC.ACC.F
|
||||||
jsr SYM.PC2Acc
|
|
||||||
jsr SYM.Acc2Global
|
|
||||||
|
|
||||||
lda #SYMG
|
lda #SYMG
|
||||||
>STA.G SYM.BufPtr
|
>STA.G SYM.BufPtr
|
||||||
|
@ -69,13 +81,10 @@ SYM.NewGlobal >LDA.G ASM.PASS
|
||||||
lda #0
|
lda #0
|
||||||
sta (ZPSymbolBuf),y
|
sta (ZPSymbolBuf),y
|
||||||
|
|
||||||
.DO ASMDBG=1
|
jsr SYM.PC2Acc
|
||||||
lda #'1'
|
jsr SYM.Acc2Global
|
||||||
>SYSCALL putchar
|
|
||||||
jsr SYM.Dump.G
|
.80 clc
|
||||||
jsr OUT.PrintCR
|
|
||||||
.FIN
|
|
||||||
clc
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.9 cmp #E.DUPKEY
|
.9 cmp #E.DUPKEY
|
||||||
|
@ -122,14 +131,7 @@ SYM.GetGlobal >PUSHB.G SYM.hList Pass #2: should be already defined...
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.8 .DO ASMDBG=1
|
.8 lda #SYMG
|
||||||
lda #'2'
|
|
||||||
>SYSCALL putchar
|
|
||||||
jsr SYM.Dump.G
|
|
||||||
jsr OUT.PrintCR
|
|
||||||
.FIN
|
|
||||||
|
|
||||||
lda #SYMG
|
|
||||||
>STA.G SYM.BufPtr
|
>STA.G SYM.BufPtr
|
||||||
|
|
||||||
>STZ.G MAC.CtxID
|
>STZ.G MAC.CtxID
|
||||||
|
@ -147,11 +149,18 @@ SYM.LookupGlobal
|
||||||
>PUSHW ZPLinePtr
|
>PUSHW ZPLinePtr
|
||||||
>PUSHWI 0 ScopeID
|
>PUSHWI 0 ScopeID
|
||||||
>SYSCALL SListLookup
|
>SYSCALL SListLookup
|
||||||
bcs .4
|
bcc .10
|
||||||
|
|
||||||
>STYA ZPPtr1 KeyID
|
>LDA.G ASM.PASS pass#2?
|
||||||
|
beq .11
|
||||||
|
|
||||||
jsr SRC.SkipX
|
lda #E.UNDEF.SYMBOL
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
|
||||||
|
.11 jmp SYM.AddFWFef
|
||||||
|
|
||||||
|
.10 >STYA ZPPtr1 KeyID
|
||||||
|
|
||||||
.1 >LDA.G SYM.ID
|
.1 >LDA.G SYM.ID
|
||||||
cmp ZPPtr1
|
cmp ZPPtr1
|
||||||
|
@ -169,47 +178,72 @@ SYM.LookupGlobal
|
||||||
dey
|
dey
|
||||||
bne .2 Keep ACC.F unchanged
|
bne .2 Keep ACC.F unchanged
|
||||||
|
|
||||||
clc
|
jsr SRC.SkipX
|
||||||
.99 rts
|
|
||||||
|
|
||||||
.3 >PUSHB.G SYM.hList
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
.3 phx
|
||||||
|
|
||||||
|
>PUSHB.G SYM.hList
|
||||||
>PUSHW ZPPtr1 KeyID
|
>PUSHW ZPPtr1 KeyID
|
||||||
>PUSHW L.SRC.ACC.SIZE
|
>PUSHW L.SRC.ACC.SIZE
|
||||||
>PUSHWI SYMG-1 Get only Global value
|
>PUSHWI SYMG-1 Get only Global value
|
||||||
>PUSHWI 1 Skip SYMG.F
|
>PUSHWI 1 Skip SYMG.F
|
||||||
>SYSCALL SListGetData
|
>SYSCALL SListGetData
|
||||||
rts
|
bcs .90
|
||||||
|
|
||||||
.4 >LDA.G ASM.PASS pass#2?
|
jsr SYM.LookupFWFef
|
||||||
bne .9 yes, undefined symbol
|
bcs .8
|
||||||
|
|
||||||
|
* lda #2
|
||||||
|
* cmp SRC.ACC.SIZE
|
||||||
|
* beq .8
|
||||||
|
|
||||||
|
* sta SRC.ACC.SIZE
|
||||||
|
|
||||||
lda #SYMG.F.FWREF
|
lda #SYMG.F.FWREF
|
||||||
tsb SRC.ACC.F
|
tsb SRC.ACC.F
|
||||||
|
|
||||||
lda #2
|
.8 plx
|
||||||
sta SRC.ACC.SIZE
|
jsr SRC.SkipX
|
||||||
|
|
||||||
lda #$ff
|
clc
|
||||||
sta SRC.ACC
|
|
||||||
sta SRC.ACC+1
|
|
||||||
|
|
||||||
.5 jsr SRC.GetNextChar
|
|
||||||
bcs .8
|
|
||||||
|
|
||||||
jsr SRC.IsLetterOrDigit
|
|
||||||
bcc .5
|
|
||||||
|
|
||||||
cmp #'.'
|
|
||||||
beq .5
|
|
||||||
|
|
||||||
cmp #'_'
|
|
||||||
beq .5
|
|
||||||
|
|
||||||
.8 clc
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.9 lda #E.UNDEF.SYMBOL
|
.90 plx
|
||||||
sec
|
.9 rts
|
||||||
|
*---------------------------------------
|
||||||
|
SYM.AddFWFef jsr SYM.LookupFWFef
|
||||||
|
bcc .8 Already Defined
|
||||||
|
|
||||||
|
>PUSHB.G FWR.hList
|
||||||
|
>PUSHW ZPLinePtr Pass #1: try to add global...
|
||||||
|
>PUSHWI 0 ScopeID
|
||||||
|
>SYSCALL SListNewKey
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
>STYA.G FWR.ID
|
||||||
|
|
||||||
|
jsr SRC.SkipX
|
||||||
|
|
||||||
|
>PUSHB.G FWR.hList
|
||||||
|
>PUSHW.G FWR.ID
|
||||||
|
>PUSHW ZPSymbolBuf
|
||||||
|
>PUSHWI 1
|
||||||
|
>SYSCALL SListAddData
|
||||||
|
rts
|
||||||
|
|
||||||
|
.8 jsr SRC.SkipX
|
||||||
|
|
||||||
|
clc
|
||||||
|
|
||||||
|
.9 rts
|
||||||
|
*---------------------------------------
|
||||||
|
SYM.LookupFWFef >PUSHB.G FWR.hList
|
||||||
|
>PUSHW ZPLinePtr
|
||||||
|
>PUSHWI 0 ScopeID
|
||||||
|
>SYSCALL SListLookup
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
SYM.StoreGlobal >LDA.G ASM.PASS
|
SYM.StoreGlobal >LDA.G ASM.PASS
|
||||||
|
@ -230,6 +264,7 @@ SYM.StoreGlobal >LDA.G ASM.PASS
|
||||||
|
|
||||||
iny Add 1 for \0 after locals/privates
|
iny Add 1 for \0 after locals/privates
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
inc
|
inc
|
||||||
|
|
||||||
.1 >PUSHYA
|
.1 >PUSHYA
|
||||||
|
@ -274,8 +309,17 @@ SYM.PC2Acc ldy #ASM.PC+3
|
||||||
dex
|
dex
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
lda #2
|
ldx #4
|
||||||
sta SRC.ACC.SIZE
|
|
||||||
|
.2 lda SRC.ACC-1,x
|
||||||
|
bne .3
|
||||||
|
|
||||||
|
dex
|
||||||
|
bne .2
|
||||||
|
|
||||||
|
inx
|
||||||
|
|
||||||
|
.3 stx SRC.ACC.SIZE
|
||||||
|
|
||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
|
@ -651,6 +695,14 @@ SYM.Dump.PushValueY
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
*---------------------------------------
|
||||||
|
.DO SYMDBG=1
|
||||||
|
SYM.Debug >PUSHW L.MSG.SYMDBG
|
||||||
|
>PUSHW.G SYM.ID
|
||||||
|
>PUSHBI 2
|
||||||
|
>SYSCALL PrintF
|
||||||
|
rts
|
||||||
|
.FIN
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE usr/src/bin/asm.s.sym
|
SAVE usr/src/bin/asm.s.sym
|
||||||
|
|
|
@ -6,6 +6,7 @@ NEW
|
||||||
.TF bin/asm
|
.TF bin/asm
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
ASMDBG .EQ 0
|
ASMDBG .EQ 0
|
||||||
|
SYMDBG .EQ 0
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
PAGE.LEN .EQ 23
|
PAGE.LEN .EQ 23
|
||||||
DO.MAXDEPTH .EQ 8
|
DO.MAXDEPTH .EQ 8
|
||||||
|
@ -137,9 +138,13 @@ L.MSG.LSYMBOL .DA MSG.LSYMBOL
|
||||||
L.MSG.PSYMBOL .DA MSG.PSYMBOL
|
L.MSG.PSYMBOL .DA MSG.PSYMBOL
|
||||||
L.MSG.SUMMARY .DA MSG.SUMMARY
|
L.MSG.SUMMARY .DA MSG.SUMMARY
|
||||||
L.MSG.END .DA MSG.END
|
L.MSG.END .DA MSG.END
|
||||||
|
L.MSG.WARN1 .DA MSG.WARN1
|
||||||
.DO ASMDBG=1
|
.DO ASMDBG=1
|
||||||
L.MSG.DBG .DA MSG.DBG
|
L.MSG.DBG .DA MSG.DBG
|
||||||
.FIN
|
.FIN
|
||||||
|
.DO SYMDBG=1
|
||||||
|
L.MSG.SYMDBG .DA MSG.SYMDBG
|
||||||
|
.FIN
|
||||||
L.MSG.SRC.FILE .DA MSG.SRC.FILE
|
L.MSG.SRC.FILE .DA MSG.SRC.FILE
|
||||||
L.MSG.OBJ.FILE .DA MSG.OBJ.FILE
|
L.MSG.OBJ.FILE .DA MSG.OBJ.FILE
|
||||||
L.MSG.CPU.FILE .DA MSG.CPU.FILE
|
L.MSG.CPU.FILE .DA MSG.CPU.FILE
|
||||||
|
@ -158,7 +163,7 @@ J.DIRECTIVES .DA DIR.AC
|
||||||
.DA DIR.CS
|
.DA DIR.CS
|
||||||
.DA DIR.CZ
|
.DA DIR.CZ
|
||||||
.DA DIR.DA
|
.DA DIR.DA
|
||||||
DIR.DO.ID .EQ *-J.DIRECTIVES
|
DIR.DO.ID .EQ *-J.DIRECTIVES
|
||||||
.DA DIR.DO
|
.DA DIR.DO
|
||||||
.DA DIR.DU
|
.DA DIR.DU
|
||||||
.DA DIR.DU
|
.DA DIR.DU
|
||||||
|
@ -241,11 +246,11 @@ CS.RUN jsr CS.RUN.ARGS
|
||||||
|
|
||||||
jsr OUT.Init
|
jsr OUT.Init
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
.1 >SLEEP
|
.1 >SLEEP
|
||||||
jsr CS.RUN.LOOP
|
jsr CS.RUN.LOOP
|
||||||
bcc .1
|
bcc .1
|
||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.LOOP ldy #S.PS.hStdIn
|
CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||||
|
@ -356,9 +361,6 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||||
|
|
||||||
.9 pha
|
.9 pha
|
||||||
jsr OUT.PrintLineErr
|
jsr OUT.PrintLineErr
|
||||||
.DO ASMDBG=1
|
|
||||||
jsr SYM.Dump.1
|
|
||||||
.FIN
|
|
||||||
pla
|
pla
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
@ -387,9 +389,22 @@ CS.RUN.ARGS ldy #S.PS.ARGC
|
||||||
>STA.G SRC.hFILENAME
|
>STA.G SRC.hFILENAME
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.2 ldy #1
|
.2 ldy #2
|
||||||
lda (ZPPtr2),y
|
lda (ZPPtr2),y
|
||||||
cmp #'L'
|
bne .90
|
||||||
|
|
||||||
|
dey
|
||||||
|
lda (ZPPtr2),y
|
||||||
|
|
||||||
|
cmp #'a'
|
||||||
|
bcc .20
|
||||||
|
|
||||||
|
cmp #'z'+1
|
||||||
|
bcs .20
|
||||||
|
|
||||||
|
eor #$20
|
||||||
|
|
||||||
|
.20 cmp #'L'
|
||||||
bne .3
|
bne .3
|
||||||
|
|
||||||
lda #$ff
|
lda #$ff
|
||||||
|
@ -417,7 +432,7 @@ CS.RUN.ARGS ldy #S.PS.ARGC
|
||||||
.90 >PUSHW L.MSG.HELP
|
.90 >PUSHW L.MSG.HELP
|
||||||
>PUSHBI 0
|
>PUSHBI 0
|
||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
|
|
||||||
lda #E.INV.ARGS
|
lda #E.INV.ARGS
|
||||||
sec
|
sec
|
||||||
.99 rts
|
.99 rts
|
||||||
|
@ -564,9 +579,13 @@ MSG.LSYMBOL .CZ " .%d=%h%h%h%h"
|
||||||
MSG.PSYMBOL .CZ " :%d(%d)=%h%h%h%h"
|
MSG.PSYMBOL .CZ " :%d(%d)=%h%h%h%h"
|
||||||
MSG.SUMMARY .CZ "\r\n**** Symbol Table Size : %5D Bytes.\r\n"
|
MSG.SUMMARY .CZ "\r\n**** Symbol Table Size : %5D Bytes.\r\n"
|
||||||
MSG.END .CZ "**** End Of Assembly."
|
MSG.END .CZ "**** End Of Assembly."
|
||||||
|
MSG.WARN1 .CZ "**** WARN : Unoptimized adressing mode due to forward reference.\r\n"
|
||||||
.DO ASMDBG=1
|
.DO ASMDBG=1
|
||||||
MSG.DBG .CZ "\r\nCtxID=%d, ARG=%H%H <op> ACC=%H%H -> ACC %b [%h]\r\n"
|
MSG.DBG .CZ "\r\nCtxID=%d, ARG=%H%H <op> ACC=%H%H -> ACC %b [%h]\r\n"
|
||||||
.FIN
|
.FIN
|
||||||
|
.DO SYMDBG=1
|
||||||
|
MSG.SYMDBG .CZ "SymID=%H\r\n"
|
||||||
|
.FIN
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
ASM.CPU.FILE .BS 65
|
ASM.CPU.FILE .BS 65
|
||||||
|
|
||||||
|
@ -631,6 +650,9 @@ SYM.hBuf .BS 1
|
||||||
SYM.BufPtr .BS 1
|
SYM.BufPtr .BS 1
|
||||||
SYM.ID .BS 2
|
SYM.ID .BS 2
|
||||||
|
|
||||||
|
FWR.hList .BS 1
|
||||||
|
FWR.ID .BS 2
|
||||||
|
|
||||||
MAC.hList .BS 1
|
MAC.hList .BS 1
|
||||||
MAC.hBuf .BS 1
|
MAC.hBuf .BS 1
|
||||||
MAC.BufPtr .BS 1
|
MAC.BufPtr .BS 1
|
||||||
|
|
|
@ -846,6 +846,8 @@ SYM.LookupLabelA
|
||||||
.99 rts
|
.99 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SYM.LookupFree >LDA.G CC.LookupIdx
|
SYM.LookupFree >LDA.G CC.LookupIdx
|
||||||
|
beq .9 Never set by CORE.Init
|
||||||
|
|
||||||
cmp #CC.LookupIdx
|
cmp #CC.LookupIdx
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ BLISTX.New sta SLISTX.Opt
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta (DBlkPtr)
|
sta (DBlkPtr)
|
||||||
|
|
||||||
lda SLISTX.Opt
|
lda SLISTX.Opt
|
||||||
sta (IBlkPtr)
|
sta (IBlkPtr)
|
||||||
|
|
||||||
|
|
|
@ -4,24 +4,19 @@ NEW
|
||||||
* CONTROL SECTION :
|
* CONTROL SECTION :
|
||||||
.LIST ON
|
.LIST ON
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
C0 .EQ Mem.MLoMem
|
C1 .EQ MAIN.S
|
||||||
C1 .EQ Mem.MHiMem
|
C2 .EQ AUX.S
|
||||||
C2 .EQ Mem.XLoMem
|
C3 .EQ D1.S
|
||||||
C3 .EQ Mem.XHiMem
|
C4 .EQ D2.S
|
||||||
*--------------------------------------
|
C5 .EQ E0.S
|
||||||
C5 .EQ AUX.S
|
|
||||||
*--------------------------------------
|
|
||||||
C6 .EQ D1.S
|
|
||||||
C7 .EQ D2.S
|
|
||||||
C8 .EQ E0.S
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.DO Mem.MLoMem>$2000
|
.DO MAIN.S>$C00
|
||||||
.LIST ON
|
.LIST ON
|
||||||
* ERROR:MAIN too big
|
* ERROR:MAIN too big
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.FIN
|
.FIN
|
||||||
.DO Mem.XLoMem>$2000
|
.DO AUX.S>$2000
|
||||||
.LIST ON
|
.LIST ON
|
||||||
* ERROR:AUX too big
|
* ERROR:AUX too big
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
|
|
|
@ -70,7 +70,7 @@ FS.OPEN.REG >MLICALL MLIGETFILEINFO
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
FS.OPEN.ERR pha Save Error Code
|
FS.OPEN.ERR pha Save Error Code
|
||||||
jsr FS.CLOSE.REGDIR
|
jsr FS.MLICLOSE
|
||||||
|
|
||||||
ldx IO.hFILE Cleanup what MkFD did
|
ldx IO.hFILE Cleanup what MkFD did
|
||||||
lda hFDs-1,x
|
lda hFDs-1,x
|
||||||
|
@ -106,23 +106,6 @@ FS.OPEN.DIR lda #S.FD.T.DIR
|
||||||
sec
|
sec
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
FS.CLOSE.REGDIR ldy #S.FD.REG.REF
|
|
||||||
lda (pFD),y
|
|
||||||
beq .1
|
|
||||||
|
|
||||||
sta K.MLI.PARAMS+1
|
|
||||||
>MLICALL MLICLOSE
|
|
||||||
* bcs FS.RTS
|
|
||||||
|
|
||||||
.1 ldy #S.FD.REG.IOBUF
|
|
||||||
lda (pFD),y
|
|
||||||
beq .8
|
|
||||||
|
|
||||||
jmp K.FreeMem
|
|
||||||
|
|
||||||
.8 clc
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
|
||||||
FS.READ.REG ldx #MLIREAD
|
FS.READ.REG ldx #MLIREAD
|
||||||
.HS 2C BIT ABS
|
.HS 2C BIT ABS
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -206,6 +189,23 @@ FS.MLIOPEN >LDYAI 1024 get a ProDOS IOBUF
|
||||||
.9
|
.9
|
||||||
FS.RTS rts
|
FS.RTS rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
FS.MLICLOSE ldy #S.FD.REG.REF
|
||||||
|
lda (pFD),y
|
||||||
|
beq .1
|
||||||
|
|
||||||
|
sta K.MLI.PARAMS+1
|
||||||
|
>MLICALL MLICLOSE
|
||||||
|
* bcs FS.RTS
|
||||||
|
|
||||||
|
.1 ldy #S.FD.REG.IOBUF
|
||||||
|
lda (pFD),y
|
||||||
|
beq .8
|
||||||
|
|
||||||
|
jmp K.FreeMem
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
FS.Stat bit A2osX.FSID
|
FS.Stat bit A2osX.FSID
|
||||||
bmi FS.Stat.FX
|
bmi FS.Stat.FX
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ SLISTX.GetData jsr SLISTX.Select
|
||||||
|
|
||||||
.3 bit SLISTX.bStr
|
.3 bit SLISTX.bStr
|
||||||
bmi .4 String mode : until CR
|
bmi .4 String mode : until CR
|
||||||
|
|
||||||
inc SLISTX.nBufCnt
|
inc SLISTX.nBufCnt
|
||||||
bne .4
|
bne .4
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ SLISTX.AddData jsr SLISTX.Select
|
||||||
jsr SLISTX.SkipKey
|
jsr SLISTX.SkipKey
|
||||||
|
|
||||||
jsr SLISTX.CheckLen
|
jsr SLISTX.CheckLen
|
||||||
|
|
||||||
ldy iByte
|
ldy iByte
|
||||||
lda (DBlkPtr),y
|
lda (DBlkPtr),y
|
||||||
pha
|
pha
|
||||||
|
@ -156,20 +156,20 @@ SLISTX.AddData jsr SLISTX.Select
|
||||||
sta ZPSListDataLen+1
|
sta ZPSListDataLen+1
|
||||||
|
|
||||||
sec
|
sec
|
||||||
|
|
||||||
.1 inc ZPSListDataLen
|
.1 inc ZPSListDataLen
|
||||||
bne .2
|
bne .2
|
||||||
|
|
||||||
inc ZPSListDataLen+1
|
inc ZPSListDataLen+1
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
.2 jsr SHARED.FORPNTgn
|
.2 jsr SHARED.FORPNTgn
|
||||||
bcc .3
|
bcc .3
|
||||||
|
|
||||||
jsr BLISTX.SetBlkByte override ending 0, already allocated
|
jsr BLISTX.SetBlkByte override ending 0, already allocated
|
||||||
clc
|
clc
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.3 jsr BLISTX.AddByte
|
.3 jsr BLISTX.AddByte
|
||||||
bcc .1
|
bcc .1
|
||||||
rts
|
rts
|
||||||
|
@ -198,13 +198,13 @@ SLISTX.SetData jsr SLISTX.Select
|
||||||
txa
|
txa
|
||||||
eor #$ff
|
eor #$ff
|
||||||
sta SLISTX.nDataCnt+1
|
sta SLISTX.nDataCnt+1
|
||||||
|
|
||||||
.1 inc SLISTX.nDataCnt
|
.1 inc SLISTX.nDataCnt
|
||||||
bne .2
|
bne .2
|
||||||
|
|
||||||
inc SLISTX.nDataCnt+1
|
inc SLISTX.nDataCnt+1
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
.2 jsr SHARED.FORPNTgn
|
.2 jsr SHARED.FORPNTgn
|
||||||
jsr BLISTX.SetBlkByte
|
jsr BLISTX.SetBlkByte
|
||||||
bra .1
|
bra .1
|
||||||
|
@ -222,27 +222,29 @@ SLISTX.CheckLen lda ZPSListDataLen
|
||||||
|
|
||||||
tax ldx #0
|
tax ldx #0
|
||||||
tay ldy #0
|
tay ldy #0
|
||||||
|
|
||||||
lda FORPNT+1
|
lda FORPNT+1
|
||||||
pha
|
pha
|
||||||
|
|
||||||
.1 jsr SHARED.FORPNTgY
|
.1 jsr SHARED.FORPNTgY
|
||||||
beq .2
|
beq .2
|
||||||
|
|
||||||
iny
|
iny
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
|
inc FORPNT+1
|
||||||
|
|
||||||
inx
|
inx
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.2 iny add Ending \0
|
.2 iny add Ending \0
|
||||||
bne .3
|
bne .3
|
||||||
|
|
||||||
inx
|
inx
|
||||||
|
|
||||||
.3 sty ZPSListDataLen
|
.3 sty ZPSListDataLen
|
||||||
stx ZPSListDataLen+1
|
stx ZPSListDataLen+1
|
||||||
|
|
||||||
pla
|
pla
|
||||||
sta FORPNT+1
|
sta FORPNT+1
|
||||||
|
|
||||||
|
@ -253,23 +255,23 @@ SLISTX.GetByID jsr SLISTX.Select
|
||||||
jsr BLISTX.GetNByte
|
jsr BLISTX.GetNByte
|
||||||
tax
|
tax
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
.1 phy
|
.1 phy
|
||||||
jsr BLISTX.GetNByte
|
jsr BLISTX.GetNByte
|
||||||
ply
|
ply
|
||||||
|
|
||||||
jsr SHARED.FORPNTpn
|
jsr SHARED.FORPNTpn
|
||||||
|
|
||||||
iny
|
iny
|
||||||
dex
|
dex
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
txa lda #0
|
txa lda #0
|
||||||
|
|
||||||
jsr SHARED.FORPNTpn ending \0
|
jsr SHARED.FORPNTpn ending \0
|
||||||
|
|
||||||
jsr BLISTX.GetNByte ScopeID lo
|
jsr BLISTX.GetNByte ScopeID lo
|
||||||
jsr SHARED.FORPNTpn
|
jsr SHARED.FORPNTpn
|
||||||
|
|
||||||
|
@ -290,7 +292,7 @@ SLISTX.NewKey jsr SLISTX.Lookup
|
||||||
|
|
||||||
>LDYA KeyID
|
>LDYA KeyID
|
||||||
>STYA SLISTX.KeyID End of list
|
>STYA SLISTX.KeyID End of list
|
||||||
|
|
||||||
lda SLISTX.KeyLen
|
lda SLISTX.KeyLen
|
||||||
jsr BLISTX.SetBlkByte override ending 0, already allocated
|
jsr BLISTX.SetBlkByte override ending 0, already allocated
|
||||||
|
|
||||||
|
@ -323,9 +325,9 @@ SLISTX.NewKey jsr SLISTX.Lookup
|
||||||
lda #0 Ending Len = 0
|
lda #0 Ending Len = 0
|
||||||
jsr BLISTX.AddByte
|
jsr BLISTX.AddByte
|
||||||
bcc SLISTX.8
|
bcc SLISTX.8
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.99 lda #E.DUPKEY
|
.99 lda #E.DUPKEY
|
||||||
sec
|
sec
|
||||||
.9 rts
|
.9 rts
|
||||||
|
@ -338,9 +340,9 @@ SLISTX.8 >LDYA SLISTX.KeyID
|
||||||
SLISTX.Lookup jsr K.GetMemPtr
|
SLISTX.Lookup jsr K.GetMemPtr
|
||||||
>STYA IBlkPtr
|
>STYA IBlkPtr
|
||||||
|
|
||||||
lda (IBlkPtr)
|
lda (IBlkPtr)
|
||||||
sta SLISTX.Opt
|
sta SLISTX.Opt
|
||||||
|
|
||||||
stz iByte
|
stz iByte
|
||||||
|
|
||||||
ldy #1
|
ldy #1
|
||||||
|
@ -358,19 +360,19 @@ SLISTX.Lookup jsr K.GetMemPtr
|
||||||
|
|
||||||
jsr SLISTX.IsIDValid
|
jsr SLISTX.IsIDValid
|
||||||
bcc .1
|
bcc .1
|
||||||
|
|
||||||
.2 sty SLISTX.KeyLen
|
.2 sty SLISTX.KeyLen
|
||||||
|
|
||||||
.3 >LDYA KeyID
|
.3 >LDYA KeyID
|
||||||
>STYA SLISTX.KeyID
|
>STYA SLISTX.KeyID
|
||||||
|
|
||||||
ldy iByte
|
ldy iByte
|
||||||
lda (DBlkPtr),y
|
lda (DBlkPtr),y
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
cmp SLISTX.KeyLen
|
cmp SLISTX.KeyLen
|
||||||
bne .6
|
bne .6
|
||||||
|
|
||||||
jsr BLISTX.GetNByte Skip Len
|
jsr BLISTX.GetNByte Skip Len
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
|
@ -379,9 +381,9 @@ SLISTX.Lookup jsr K.GetMemPtr
|
||||||
jsr BLISTX.GetNByte
|
jsr BLISTX.GetNByte
|
||||||
sta .5+1
|
sta .5+1
|
||||||
ply
|
ply
|
||||||
|
|
||||||
jsr SHARED.TXTPTRgY
|
jsr SHARED.TXTPTRgY
|
||||||
|
|
||||||
.5 cmp #$ff SELF MODIFIED
|
.5 cmp #$ff SELF MODIFIED
|
||||||
bne .6
|
bne .6
|
||||||
|
|
||||||
|
@ -392,15 +394,15 @@ SLISTX.Lookup jsr K.GetMemPtr
|
||||||
jsr SLISTX.GetDataLen Get Scope
|
jsr SLISTX.GetDataLen Get Scope
|
||||||
cmp FORPNT+1
|
cmp FORPNT+1
|
||||||
bne .6
|
bne .6
|
||||||
|
|
||||||
lda FORPNT
|
lda FORPNT
|
||||||
cmp SLISTX.DataLen
|
cmp SLISTX.DataLen
|
||||||
beq SLISTX.8
|
beq SLISTX.8
|
||||||
|
|
||||||
.6 >LDYA SLISTX.KeyID
|
.6 >LDYA SLISTX.KeyID
|
||||||
|
|
||||||
jsr SLISTX.Select.I move back...
|
jsr SLISTX.Select.I move back...
|
||||||
jsr SLISTX.SkipKey
|
jsr SLISTX.SkipKey
|
||||||
jsr SLISTX.SkipData
|
jsr SLISTX.SkipData
|
||||||
bra .3
|
bra .3
|
||||||
|
|
||||||
|
@ -439,7 +441,7 @@ SLISTX.SkipKey ldy iByte
|
||||||
.8 rts
|
.8 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SLISTX.SkipData jsr SLISTX.GetDataLen
|
SLISTX.SkipData jsr SLISTX.GetDataLen
|
||||||
|
|
||||||
lda SLISTX.DataLen
|
lda SLISTX.DataLen
|
||||||
ldx SLISTX.DataLen+1
|
ldx SLISTX.DataLen+1
|
||||||
SLISTX.SkipDataAX
|
SLISTX.SkipDataAX
|
||||||
|
@ -464,20 +466,20 @@ SLISTX.GetDataLen
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SLISTX.IsIDValid
|
SLISTX.IsIDValid
|
||||||
bit SLISTX.Opt
|
bit SLISTX.Opt SL..
|
||||||
bpl .2
|
bpl .2
|
||||||
|
|
||||||
cmp #'.'
|
cmp #'.'
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
.1 bit SLISTX.Opt
|
.1 bit SLISTX.Opt SL._
|
||||||
.2 bvc .3
|
.2 bvc .3
|
||||||
|
|
||||||
cmp #'_'
|
cmp #'_'
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
.3 jmp SHARED.IsDigitOrL
|
.3 jmp SHARED.IsDigitOrL
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
|
@ -70,8 +70,8 @@ UNISTD.Close lda (pFD) #S.FD.T
|
||||||
tax
|
tax
|
||||||
jmp (.1,x)
|
jmp (.1,x)
|
||||||
|
|
||||||
.1 .DA FS.CLOSE.REGDIR
|
.1 .DA FS.MLICLOSE
|
||||||
.DA FS.CLOSE.REGDIR
|
.DA FS.MLICLOSE
|
||||||
.DA DEV.CLOSE
|
.DA DEV.CLOSE
|
||||||
.DA DEV.CLOSE
|
.DA DEV.CLOSE
|
||||||
.DA STDIO.IOERR LNK
|
.DA STDIO.IOERR LNK
|
||||||
|
|
|
@ -39,9 +39,6 @@ MAIN.B .PH $1000
|
||||||
.INB usr/src/sys/kernel.s.pft
|
.INB usr/src/sys/kernel.s.pft
|
||||||
.INB usr/src/sys/kernel.s.fs
|
.INB usr/src/sys/kernel.s.fs
|
||||||
.INB usr/src/sys/kernel.s.mathf
|
.INB usr/src/sys/kernel.s.mathf
|
||||||
.LIST ON
|
|
||||||
MAIN.E .EQ *
|
|
||||||
.LIST OFF
|
|
||||||
.EP
|
.EP
|
||||||
MAIN.S .EQ *-MAIN.B
|
MAIN.S .EQ *-MAIN.B
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue