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
14
symbol.asm
14
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
|
||||||
lda shiftFlag if the value is shifted then
|
|
||||||
beq sv1a
|
|
||||||
ph4 name flag the error
|
|
||||||
ph2 #2
|
|
||||||
jsr Error
|
|
||||||
sv1a lda symbolRelocatable if the symbol is relocatable then
|
sv1a lda symbolRelocatable if the symbol is relocatable then
|
||||||
beq sv1c
|
beq sv1c
|
||||||
jsr CheckSegment check for errors
|
lda shiftFlag if the value is shifted then
|
||||||
ldy #symSeg set the expression file
|
beq sv1c
|
||||||
lda [sym],Y
|
ph4 name flag the error
|
||||||
sta expSegment
|
ph2 #2
|
||||||
|
jsr Error
|
||||||
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