Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-03-22 07:41:35 +00:00
parent 8314b5b9cc
commit bec9c084a4
5 changed files with 42 additions and 66 deletions

Binary file not shown.

View File

@ -215,36 +215,28 @@ EXP.GetSymL jsr SRC.GetNextChar
sec
.8 rts
*---------------------------------------
EXP.GetSymG jsr SYM.LookupGlobal
bcs .2
* jsr SYM.Lookup2Acc
clc
rts
.2 >LDA.G ASM.PASS pass#2?
EXP.GetSymG >DEBUG
jsr SYM.LookupGlobal
bcc .8
>LDA.G ASM.PASS pass#2?
bne EXP.EvalExitUND yes, undefined symbol
lda #0 Mark ACC as pending
sta SRC.ACC.SIZE
lda #SYMG.F.FWREF
tsb SRC.ACC.F Mark ACC as pending
stz SRC.ACC.SIZE
.3 jsr SRC.GetNextChar
.1 jsr SRC.GetNextChar
bcs .8
jsr SRC.IsLetterOrDigit
bcc .3
bcc .1
cmp #'.'
beq .3
beq .1
cmp #'_'
beq .3
beq .1
.8 clc
rts
.99 lda #ERR.UNDEF.SYMBOL
sec
.9 rts
*---------------------------------------
EXP.MOD.8.3 lda SRC.ACC+2
bra EXP.MOD.8

View File

@ -359,12 +359,13 @@ SRC.ParseLine.AM
.75 ldx #2
.74 lda SRC.ACC.SIZE
beq .72 Pending...assume 2 bytes...
lda SRC.ACC.F
bit #SYMG.F.FWREF
bne .72 FWREF ...assume 2 bytes...
tax
ldx SRC.ACC.SIZE
.73 lda SRC.ACC-1,x
.73 lda SRC.ACC-1,x
bne .72
dex
@ -391,9 +392,9 @@ SRC.ParseLine.AM
*---------------------------------------
SRC.ParseLine.AMCheck
* jsr OUT.PrintLine.1
* >LDYA L.SRC.AM.StrBuf
* >SYSCALL puts
* >DEBUG
>LDYA L.SRC.AM.StrBuf
>SYSCALL puts
>DEBUG
lda SRC.AM.StrBuf
beq SRC.ParseLine.OPAMCheckFF

View File

@ -36,25 +36,12 @@ SYM.Init >SYSCALL SListNew
txa
>STA.G SYM.hGlobalBuf
>LDYAI 256
>SYSCALL getmem
bcs .9
>STYA ZPLookupBuf
txa
>STA.G SYM.hLookupBuf
.9 rts
*---------------------------------------
SYM.Reset >STZ.G SYM.bNewGlobal
rts
*---------------------------------------
SYM.Quit >LDA.G SYM.hLookupBuf
beq .1
>SYSCALL FreeMem
.1 >LDA.G SYM.hNameBuf
SYM.Quit >LDA.G SYM.hNameBuf
beq .2
>SYSCALL FreeMem
@ -235,8 +222,7 @@ SYM.LookupGlobal
>SYSCALL SListLookup
bcs .9
phy
pha
>STYA ZPPtr1
txa
adc ZPLinePtr
@ -245,12 +231,27 @@ SYM.LookupGlobal
inc ZPLinePtr+1
.1 >PUSHWI 0 Start
>PUSHWI SYMG
.1 >LDA.G SYM.GlobalID
cmp ZPPtr1
bne .3
iny
lda (pData),y
cmp ZPPtr1+1
bne .3
ldy #SYMG-1
.2 lda (ZPGlobalBuf),y
sta SRC.ACC.F,y
dey
bpl .2
clc
rts
.3 >PUSHWI 0 Start
>PUSHWI SYMG Get only Global value
>PUSHW L.SRC.ACC.F
pla
ply
>PUSHYA
>PUSHW ZPPtr1
>LDA.G SYM.hGlobalList
>SYSCALL SListGetData
rts
@ -319,22 +320,6 @@ SYM.Acc2Global ldy #SYMG-1
bpl .2
rts
*---------------------------------------
SYM.Lookup2Acc ldy #SYMG.F+4
ldx #4
.1 lda (ZPLookupBuf),y
sta SRC.ACC.SIZE,x
dey
dex
bne .1
lda (ZPLookupBuf),y
* and #SYMG.F.SIZE
sta SRC.ACC.SIZE
clc
rts
*---------------------------------------
* Local Symbol Record: (5 bytes)
* 0 : Local ID (1->255)
* 1-4 : 32 bits Value (PC)

View File

@ -20,8 +20,6 @@ ZPLinePtr .BS 2
ZPNameBuf .BS 2
ZPGlobalBuf .BS 2
ZPLookupBuf .BS 2
ZPMacroBuf .BS 2
ZPCtxBuf .BS 2
@ -542,7 +540,7 @@ SYM.GlobalPtr .BS 1
SYM.hNameBuf .BS 1
SYM.hLookupBuf .BS 1
SYM.LookupID .BS 2
MAC.hMacroList .BS 1
MAC.hMacroBuf .BS 1