Commit Graph

5 Commits

Author SHA1 Message Date
Stephen Heumann
9f232e883a 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.
2022-09-25 21:49:01 -05:00
Stephen Heumann
da13b94a43 Properly evaluate non-constant expressions in EQU/GEQU records.
Previously, the values of such expressions were essentially ignored, resulting in incorrect output.

This affected code like the following example:

test1   start
        lda     >p
        rtl
        end

D1      data
p       gequ    val
        end

val     data
        dc      i'123'
        end

Note that the EQU/GEQU expression is evaluated within the context of the location that references it, not the location where it is defined. This affects the value of the location counter, as well as the symbol search behavior. The references for the OMF format do not clearly define which way this should be done, but the current behavior can cause problems with certain object files produced by ORCA/M.
2022-09-25 21:42:20 -05:00
Stephen Heumann
877e84cdb3 Fix bugs in handling of symbol table entries at the very beginning of a bank.
These bugs could manifest themselves as (at least) bogus "Addressing error" or "expression too complex" messages.
2017-10-08 20:46:55 -05:00
Kelvin Sherlock
c21ae46a4d convert CR files to LF for better git compatibility. 2017-10-02 09:35:05 -04:00
mikew50
748ae356d7 The ORCA Linker 2.0.3 from the Opus ][ CD 2017-10-01 21:26:59 -06:00