mirror of
https://github.com/byteworksinc/Linker.git
synced 2024-06-12 20:29:42 +00:00
Compare commits
3 Commits
0b275e5b22
...
850952d612
Author | SHA1 | Date | |
---|---|---|---|
|
850952d612 | ||
|
9f232e883a | ||
|
da13b94a43 |
1
exp.asm
1
exp.asm
|
@ -727,6 +727,7 @@ addr dc a'EndExp' $00 End
|
|||
* shiftFlag - 1 if the value is shifted, else 0
|
||||
* shiftValue - expression result before shifting
|
||||
* shiftCount - shift counter
|
||||
* symbolRelocatable - non-zero if sym is relocatable
|
||||
* returns the value of the expression
|
||||
*
|
||||
****************************************************************
|
||||
|
|
12
linker.notes
12
linker.notes
|
@ -10,6 +10,14 @@ Updated 2022
|
|||
2. A load segment is now flagged as position-independent only if
|
||||
all the constituent object segments have that attribute set.
|
||||
|
||||
3. Fixed bug that caused EQU or GEQU expressions with non-constant
|
||||
operands to be evaluated incorrectly.
|
||||
|
||||
4. The numeric value in an ORG record is now treated as a signed
|
||||
offset from the current location, consistent with its
|
||||
definition in the GS/OS Reference. However, negative offset
|
||||
values are not supported and will produce an error.
|
||||
|
||||
2.0.6 1. The linker could give a spurious error about the relative
|
||||
address calculation for a BRL instruction if it branched
|
||||
forward or backward more than 32 KB. Since the address
|
||||
|
@ -66,7 +74,9 @@ Updated 2022
|
|||
|
||||
-- Documentation Update -----------------------------------------------------
|
||||
|
||||
No changes.
|
||||
ORCA/M Manual, p. 492
|
||||
|
||||
The operand in an ORG record is a signed offset from the current location, not an absolute address. (This is consistent with the definition in the GS/OS Reference, and with the behavior of ORCA/M and other assemblers and linkers.)
|
||||
|
||||
-- Changes introduced in ORCA/Linker 2.1.0 ----------------------------------
|
||||
|
||||
|
|
|
@ -137,13 +137,12 @@ DoOrg private
|
|||
sta r0
|
||||
ldy #3
|
||||
lda [sp],Y
|
||||
sta r2+2
|
||||
sta r2
|
||||
add4 sp,#5
|
||||
|
||||
sub4 r0,loadOrg get the disp from the segment start
|
||||
cmpl pc,r0
|
||||
bge lb1 if the disp is greater than the pc then
|
||||
move4 r0,pc update the pc
|
||||
lda r2
|
||||
bmi lb1 if the disp is positive
|
||||
add4 pc,r0 update the pc
|
||||
lb1 anop
|
||||
rts
|
||||
end
|
||||
|
|
|
@ -643,13 +643,12 @@ DoOrg private
|
|||
|
||||
ldy #1 get the value
|
||||
lda [sp],Y
|
||||
sta r4
|
||||
sta r0
|
||||
ldy #3
|
||||
lda [sp],Y
|
||||
sta r6
|
||||
sta r2
|
||||
add4 sp,#5 skip the op code & operand
|
||||
sub4 pc,r4,r0 calculate the space to insert
|
||||
lda r2 if space < 0 then
|
||||
lda r2 if disp < 0 then
|
||||
bpl lb1
|
||||
ph4 #0 Error(NULL,3)
|
||||
ph2 #3
|
||||
|
|
24
symbol.asm
24
symbol.asm
|
@ -845,15 +845,10 @@ gb3 ldy #symPriv if sym^.symPriv then
|
|||
sv1 ldy #symExp if the value is an expression then
|
||||
lda [sym],Y
|
||||
jeq sv2
|
||||
ph2 copiedExpression save volitile variables
|
||||
ph2 copiedExpression save volatile variables
|
||||
ph4 shiftCount
|
||||
ph2 shiftFlag
|
||||
ph4 shiftValue
|
||||
ph2 symbolCount
|
||||
ph2 symbolLength
|
||||
ph2 symbolRelocatable
|
||||
ph2 symbolType
|
||||
ph4 symbolValue
|
||||
ldy #symVal+2 evaluate the expression
|
||||
lda [sym],Y
|
||||
pha
|
||||
|
@ -864,23 +859,14 @@ sv1 ldy #symExp if the value is an expression then
|
|||
jsr Evaluate
|
||||
sta symbolValue save the value
|
||||
stx symbolValue+2
|
||||
sv1a lda symbolRelocatable if the symbol is relocatable then
|
||||
beq sv1c
|
||||
lda shiftFlag if the value is shifted then
|
||||
beq sv1a
|
||||
beq sv1c
|
||||
ph4 name flag the error
|
||||
ph2 #2
|
||||
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 symbolValue restore volitile variables
|
||||
pl2 symbolType
|
||||
pl2 symbolRelocatable
|
||||
pl2 symbolLength
|
||||
pl2 symbolCount
|
||||
pl4 shiftValue
|
||||
sv1c pl4 shiftValue restore volatile variables
|
||||
pl2 shiftFlag
|
||||
pl4 shiftCount
|
||||
pl2 copiedExpression
|
||||
|
|
Loading…
Reference in New Issue
Block a user