DivinusVox
DivinusVox

Reputation: 1191

lc3 - Loading Multiple Source Files to be Run

So working with LC3, and I've been given an assignment to build a library functions to run a given driver. I've written the library at this point, but I cannot figure out how to load the library and the driver in the the Simulator memory simultaneously to run them together, in spite of perusing the McGraw book and the dreadfully-lacking-in-this-subject Google.

Anybody have the know-how on how to accomplish this?

Upvotes: 1

Views: 1123

Answers (1)

DivinusVox
DivinusVox

Reputation: 1191

For anyone else that runs into this, by loading in multiple source files, the old memory is not erased. Meaning you can sequentially open files and they will both be in memory, provided they do not overlap in locations.

Of note is that the IDE only shows the labels from the most recently loaded file, so choose wisely.

If you do opt to load the library second, you must manually set the program counter to the beginning of your driver to execute it successfully.

Upvotes: 1

Related Questions