mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-09 16:40:38 +00:00
Set fixup address as code offset
This commit is contained in:
parent
37ec26c450
commit
e335b22445
@ -219,13 +219,14 @@ def emit_enter(cparms)#0
|
||||
fin
|
||||
end
|
||||
def emit_tag(tag)#0
|
||||
word fixups, updtptr, nextptr
|
||||
word codeofst, fixups, updtptr, nextptr
|
||||
|
||||
emit_pending_seq
|
||||
if tag_type->[tag] & RESOLVED_FIXUP; exit_err(ERR_DUP|ERR_ID); fin // DEBUG
|
||||
//
|
||||
// Update list of addresses needing resolution
|
||||
//
|
||||
codeofst = codeptr - codebuff
|
||||
if tag_type->[tag] & RELATIVE_FIXUP
|
||||
updtptr = tag_addr=>[tag]
|
||||
while updtptr
|
||||
@ -236,12 +237,12 @@ def emit_tag(tag)#0
|
||||
else
|
||||
for fixups = fixup_cnt-1 downto 0
|
||||
if fixup_tag->[fixups] == tag
|
||||
updtptr = fixup_addr=>[fixups]
|
||||
*updtptr = *updtptr + codeptr
|
||||
updtptr = fixup_addr=>[fixups]
|
||||
*updtptr = *updtptr + codeofst
|
||||
fin
|
||||
next
|
||||
fin
|
||||
tag_addr=>[tag] = codeptr
|
||||
tag_addr=>[tag] = codeofst
|
||||
tag_type->[tag] = tag_type->[tag] | RESOLVED_FIXUP
|
||||
end
|
||||
//
|
||||
|
@ -1200,6 +1200,7 @@ int parse_struc(void)
|
||||
if (scantoken != END_TOKEN)
|
||||
parse_error("Missing STRUC/END");
|
||||
scan();
|
||||
return (1);
|
||||
}
|
||||
int parse_vars(int type)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user