mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-13 15:27:18 +00:00
Make sure .word R0 etc are output as absolute values.
Previously it was generated as relocatable.
This commit is contained in:
parent
855c1ca321
commit
1c37223977
@ -671,6 +671,10 @@ void store_value(
|
||||
} else {
|
||||
if (SYM_IS_IMPORTED(sym)) {
|
||||
store_global_offset_word(stack->top, tr, size, sym->value + offset, sym->label);
|
||||
} else if (sym->section->type == SECTION_REGISTER) {
|
||||
/* Delayed action: evaluate_rec() excludes SECTION_REGISTER when
|
||||
* turning symbols into EX_LIT. Do it here now. */
|
||||
store_word(stack->top, tr, size, sym->value + offset);
|
||||
} else if (sym->section != current_pc->section) {
|
||||
store_psect_offset_word(stack->top, tr, size, sym->value + offset, sym->section->label);
|
||||
} else {
|
||||
|
||||
@ -10,15 +10,17 @@
|
||||
10 000042 000001 000000 000003 .word 1,,3 ; 3 words
|
||||
11 000050 000001 000002 000003 .word 1,2,3 ; 3 words
|
||||
12
|
||||
12
|
||||
13 000056 000000 000001 000002 .word r0,wait,r1+1,wait+2,%4,%4+1 ; 0, 1, 2, 3, 4, 5
|
||||
000064 000003 000004 000005
|
||||
13
|
||||
|
||||
|
||||
Symbol table
|
||||
|
||||
. 000056R 001 START 000000R 001
|
||||
. 000072R 001 START 000000R 001
|
||||
|
||||
|
||||
Program sections:
|
||||
|
||||
. ABS. 000000 000 (RW,I,GBL,ABS,OVR,NOSAV)
|
||||
000056 001 (RW,I,LCL,REL,CON,NOSAV)
|
||||
000072 001 (RW,I,LCL,REL,CON,NOSAV)
|
||||
|
||||
@ -10,3 +10,4 @@ start: .word 123 ; 1 word
|
||||
.word 1,,3 ; 3 words
|
||||
.word 1,2,3 ; 3 words
|
||||
|
||||
.word r0,wait,r1+1,wait+2,%4,%4+1 ; 0, 1, 2, 3, 4, 5
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user