Adjust assembler to allow compiling our VM output #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried to run a jack file through our vm translator as we did when we finished it at the end of a meetup:
vm-translator --init file1.vm file2.vm .... filen.vm > square.asm
to generate asmassembler square.asm
, which then failed due to overflowing the ROMBefore adding the abort, the assembler would generate instructions with a length of 17bits (leading zero for an address instruction and then 16bits of address). This was probably what was causing the really funky behaviour in Leo's simulator.
Also, to get the above working, I had to also allow some non-standard mnemonics that our vm-translator generates as mentioned before by @tomstuart in the meetings.
For reference, the Square example in project 9, with the OS code, comes to around 50000 instructions (according to the address after the abort due to overflowing the 32k limit). Are we generating too much assembly from our vm-translator or am I running things wrong?