mirror of
https://github.com/byteworksinc/Linker.git
synced 2024-12-26 13:31:28 +00:00
Avoid spurious errors when evaluating EQU/GEQU expressions.
Shifting is now prohibited only for relocatable expressions. It is fine if a shift operator is used with constant operands, simply producing another constant. Also, spurious errors about using multiple load segments in an expression are no longer reported just because of the load segment "containing" the EQU/GEQU record. Since it does not actually translate to anything in the load file, that segment does not matter.
This commit is contained in:
parent
da13b94a43
commit
9f232e883a
10
symbol.asm
10
symbol.asm
@ -859,17 +859,13 @@ sv1 ldy #symExp if the value is an expression then
|
|||||||
jsr Evaluate
|
jsr Evaluate
|
||||||
sta symbolValue save the value
|
sta symbolValue save the value
|
||||||
stx symbolValue+2
|
stx symbolValue+2
|
||||||
|
sv1a lda symbolRelocatable if the symbol is relocatable then
|
||||||
|
beq sv1c
|
||||||
lda shiftFlag if the value is shifted then
|
lda shiftFlag if the value is shifted then
|
||||||
beq sv1a
|
beq sv1c
|
||||||
ph4 name flag the error
|
ph4 name flag the error
|
||||||
ph2 #2
|
ph2 #2
|
||||||
jsr Error
|
jsr Error
|
||||||
sv1a lda symbolRelocatable if the symbol is relocatable then
|
|
||||||
beq sv1c
|
|
||||||
jsr CheckSegment check for errors
|
|
||||||
ldy #symSeg set the expression file
|
|
||||||
lda [sym],Y
|
|
||||||
sta expSegment
|
|
||||||
sv1c pl4 shiftValue restore volatile variables
|
sv1c pl4 shiftValue restore volatile variables
|
||||||
pl2 shiftFlag
|
pl2 shiftFlag
|
||||||
pl4 shiftCount
|
pl4 shiftCount
|
||||||
|
Loading…
Reference in New Issue
Block a user