diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 1519a972..4249487f 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.SRC.po b/.Floppies/A2OSX.SRC.po index 42de2cec..58c1efdb 100644 Binary files a/.Floppies/A2OSX.SRC.po and b/.Floppies/A2OSX.SRC.po differ diff --git a/BIN/ASM.S.DIR.txt b/BIN/ASM.S.DIR.txt index 7fc2b18b..a1abd323 100644 --- a/BIN/ASM.S.DIR.txt +++ b/BIN/ASM.S.DIR.txt @@ -183,10 +183,8 @@ DIR.EQ jsr SRC.GetNextCharNB ldx #3 -.1 lda SRC.ACC,x - sta SRC.GLabel.Value,x - dex - bpl .1 + jsr SYM.UpdateGlobal + bcs .9 clc rts diff --git a/BIN/ASM.S.EXP.txt b/BIN/ASM.S.EXP.txt index fa7c3616..ec0c9f62 100644 --- a/BIN/ASM.S.EXP.txt +++ b/BIN/ASM.S.EXP.txt @@ -163,7 +163,7 @@ EXP.GetLocal jsr SRC.GetDecimal bne EXP.EvalExitSYN Max .255 lda SRC.ACC beq EXP.EvalExitSYN .0 is not allowed - jsr SYM.SearchLocal + jsr SYM.GetLocal bcs EXP.EvalExitUND rts *--------------------------------------- @@ -175,7 +175,7 @@ EXP.SetAccA sta SRC.ACC *--------------------------------------- EXP.GetSymbol >PUSHB.G SYM.hGlobals >PUSHW ZPLinePtr - >PUSHEA.G SYM.Value + >PUSHEA.G SYM.Global >SYSCALL SListLookup bcs .2 @@ -195,13 +195,13 @@ EXP.GetSymbol >PUSHB.G SYM.hGlobals >PUSHB.G SYM.hGlobals >PUSHW ZPLinePtr - >PUSHEA.G SYM.Value + >PUSHEA.G SYM.Global lda #6 - >STA.G SYM.Value+SYM.LEN + >STA.G SYM.Global+SYM.LEN lda #0 - >STA.G SYM.Value+SYM.F + >STA.G SYM.Global+SYM.F >SYSCALL SListAdd bcs .9 diff --git a/BIN/ASM.S.SRC.txt b/BIN/ASM.S.SRC.txt index 1b331693..7d6b0b37 100644 --- a/BIN/ASM.S.SRC.txt +++ b/BIN/ASM.S.SRC.txt @@ -69,21 +69,24 @@ SRC.ParseLine lda (ZPLineBuf) lda (pData),y bne .1 - stz SRC.GLabel.New + lda #0 + >STA.G SYM.bGlobalUpdate cpx #' ' no label...go scan dir/opcode beq .4 cpx #'.' local symbol? bne .2 - jsr SRC.ParseLine.SymL + jsr SYM.AddLocal + bra .3 .1 clc rts -.2 jsr SRC.ParseLine.SymG +.2 jsr SYM.AddGlobalPC + .3 bcs SRC.ParseLine.Err .4 jsr SRC.GetNextCharNB Scan for an Opcode... @@ -108,7 +111,7 @@ SRC.ParseLine lda (ZPLineBuf) .6 jsr SRC.ParseLine.OpCode bcs SRC.ParseLine.Err -SRC.ParseLine.Ok lda SRC.GLabel.New +SRC.ParseLine.Ok >LDA.G SYM.bGlobalUpdate bpl .8 ldy #ASM.PASS @@ -116,28 +119,20 @@ SRC.ParseLine.Ok lda SRC.GLabel.New bne .8 yes, nothing to do * --- Pass #1 - >LDYA L.SRC.GLabel.Flags - jsr SYM.SearchGlobal - bcs .1 if CS, not found, add - - lda SRC.FLabel.Flags - bit #$40 found symbol pending ? - bne .2 yes, update + jsr SYM.UpdateGlobal - bit #$1 found is .SE ? + bcs SRC.ParseLine.Inv if CS, not found ??? + + >LDA.G SYM.Global+SYM.F + bit #SYM.F.RESOLVED found symbol pending ? + bne .2 yes, update + + bit #SYM.F.RW found is .SE ? beq SRC.ParseLine.Redef no, redefine error -.2 ldx #0 update current symbol with -.3 lda SRC.GLabel.Flags flags & value - jsr SYM.AddByteGBlock - inx - cpx #5 - bne .3 +.2 jsr SYM.UpdateGlobal bra .8 -.1 >LDYA L.SRC.GLabel.Flags - jsr SYM.AddGToGBlockYA - bcs SRC.ParseLine.Err .8 clc rts @@ -178,24 +173,6 @@ SRC.ParseLine.SymR lda #ERR.RANGE sec rts *--------------------------------------- -SRC.ParseLine.SymG >PUSHB.G SYM.hGlobals - >PUSHW ZPLinePtr - >PUSHEA.G SYM.Value - - >SYSCALL SListAdd - bcs SRC.ParseLine.SymE - - adc ZPLinePtr - sta ZPLinePtr - bcc .1 - - inc ZPLinePtr+1 - -.1 - - clc - rts -*--------------------------------------- SRC.ParseLine.Dir >LDYA L.T.DIRECTIVES jsr SRC.GetKeyword diff --git a/BIN/ASM.S.SYM.txt b/BIN/ASM.S.SYM.txt index 256e4f12..558b8002 100644 --- a/BIN/ASM.S.SYM.txt +++ b/BIN/ASM.S.SYM.txt @@ -42,7 +42,69 @@ SYM.Dump >LDYA L.MSG.SYMBOLS clc rts *--------------------------------------- -SYM.AddPending +SYM.AddGlobalPC ldx #4 + + ldy #ASM.PC + +.1 lda (pData),y + pha + iny + dex + bne .1 + + ldx #4 + + ldy #SYM.Global+SYM.V+3 + +.2 pla + sta (pData),y + dey + dex + bne .2 + + >DEBUG +*--------------------------------------- +SYM.AddGlobal lda #SYM.F.RESOLVED + >STA.G SYM.Global+SYM.F + + lda #6 LEN+F+DWORD + >STA.G SYM.Global+SYM.LEN + + >PUSHB.G SYM.hGlobals + >PUSHW ZPLinePtr + >PUSHEA.G SYM.Global + + >SYSCALL SListAdd + bcs .9 + + adc ZPLinePtr + sta ZPLinePtr + bcc .1 + + inc ZPLinePtr+1 + clc + +.1 tya + >STA.G ASM.SYM.ID+1 + dey + txa + sta (pData),y +.9 rts +*--------------------------------------- +SYM.UpdateGlobal >PUSHB.G SYM.hGlobals + >PUSHW.G ASM.SYM.ID + >PUSHEA.G SYM.Global + + >SYSCALL SListUpdateByID + rts +*--------------------------------------- +SYM.AddLocal + clc + rts +*--------------------------------------- +SYM.GetLocal + clc + rts *--------------------------------------- SYM.AddPrivate clc @@ -60,17 +122,6 @@ SYM.LookupMacro clc rts *--------------------------------------- -SYM.UpdateGlobal - clc - rts -*--------------------------------------- -SYM.SearchLocal - clc - rts -*--------------------------------------- -SYM.SearchGlobal clc - rts -*--------------------------------------- MAN SAVE /A2OSX.BUILD/BIN/DEV/ASM.S.SYM LOAD /A2OSX.BUILD/BIN/DEV/ASM.S diff --git a/BIN/ASM.S.txt b/BIN/ASM.S.txt index c9e6b591..c26ac356 100644 --- a/BIN/ASM.S.txt +++ b/BIN/ASM.S.txt @@ -444,7 +444,9 @@ ASM.LOCAL.INVALID .BS 1 ASM.SYM.ID .BS 2 SYM.hGlobals .BS 1 -SYM.Value .BS 6 +SYM.bGlobalUpdate .BS 1 +SYM.Global .BS 6 +SYM.ID .BS 1 DS.END .ED *--------------------------------------- .DO DS.END-DS.START>$FF diff --git a/SYS/KERNEL.S.MEM.txt b/SYS/KERNEL.S.MEM.txt index 509debc3..a2aeca2e 100644 --- a/SYS/KERNEL.S.MEM.txt +++ b/SYS/KERNEL.S.MEM.txt @@ -561,6 +561,12 @@ MEM.GetKeyCharY sta CLRREADAUX sta SETREADAUX beq .9 + cmp #'.' + beq .8 + + cmp #'_' + beq .8 + cmp #'0' bcc .9 cmp #'9'+1 @@ -574,13 +580,7 @@ MEM.GetKeyCharY sta CLRREADAUX cmp #'a' bcc .9 cmp #'z'+1 - bcc .8 - - cmp #'.' - bne .9 - - cmp #'_' - bne .9 + bcs .9 .8 clc rts diff --git a/SYS/KERNEL.S.SLIST.txt b/SYS/KERNEL.S.SLIST.txt index 56dda4a6..2a1381c1 100644 --- a/SYS/KERNEL.S.SLIST.txt +++ b/SYS/KERNEL.S.SLIST.txt @@ -2,7 +2,7 @@ NEW PREFIX /A2OSX.BUILD AUTO 4,1 *-------------------------------------- -X.SLIST jmp (.1-SLIST.New,x) +X.SLIST jmp (.1-SYS.SListAdd,x) .1 .DA SLIST.Add .DA SLIST.Lookup .DA SLIST.GetByID @@ -10,22 +10,6 @@ X.SLIST jmp (.1-SLIST.New,x) .DA SLIST.New .DA SLIST.Free.A *-------------------------------------- -SLIST.New >LDYAI 160 40k Max before out of memory!!! - jsr K.GetMem0.YA - bcs .9 - >STYA ZPSListIndex - stx .8+1 - - >LDYAI 256 - jsr K.GetMem0.YA - bcs .9 - txa - sta (ZPSListIndex) - -.8 lda #$ff SELF MODIFIED - -.9 rts -*-------------------------------------- SLIST.Add jsr SLIST.Search bcc .9 Lookup succeeded...DUP @@ -157,7 +141,23 @@ SLIST.UpdateByID clc .9 rts *-------------------------------------- -SLIST.Free.A sta .8 +SLIST.New >LDYAI 160 40k Max before out of memory!!! + jsr K.GetMem0.YA + bcs .9 + >STYA ZPSListIndex + stx .8+1 + + >LDYAI 256 + jsr K.GetMem0.YA + bcs .9 + txa + sta (ZPSListIndex) + +.8 lda #$ff SELF MODIFIED + +.9 rts +*-------------------------------------- +SLIST.Free.A sta .8+1 jsr K.GetMemPtr.A >STYA .1+1