Skip to content

allow an immediate of an instruction to reference a symbol that hasn't been seen yet. #11

Description

@donno

At the moment the following code doesn't work:

bar:
   bt r2, done
   ; more code here
   j bar
done:
   jr r1

Moving done section and instructions before the use of done, works.

The problem is only a single pass is done such that the symbol table isn't populated at the time it sees done.

Two solutions:

  • Perform two passes, 1 for just populating symbols and another for generating the machine code
  • Allow references to symbols in the machine code which are substituted with the final values after everything has been read in.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions