A hopefully improved version of @Qsmally's QCPU-Assembler. Implemented in Python.
- Label Support: You may now define labels and use them in JMP instructions. Valid label definitions must begin with an identifier and end with a colon(:). An identifier is an sequence of alphanumeric, underscore(_), or dot(.) characters of arbitrary length, although the first character must be a letter, the underscore character(_) or dot(.). Labels are case sensitive.
- Error Reporting: qassembler will now halt and report programmer errors.
- Comment Support (inherited from QCPU-Assembler): All characters following the semicolon(;) or slash(/) characters, inclusive, are excluded from analysis by the assembler.
- Variables remain unsupported as the targetted hardware does not implement the necessary memory protection techniques.
- Due to unclear ISA specification, the current implementation does not allow operands for the MSC opcode.
- Ensure that python3 is installed and on PATH
- Clone the repository.
- Navigate to .../qassembler/qas and execute the following shell command:
chmod +x qas.py
qas.py -f filepath
example:
qas.py -f ~/docs/test.s
qas.py -f test.s
.txt file containing the assembled machine instructions should appear in the current working directory.
- Place the input test files in .../qassembler/tests
- Place the expected output files in .../qassembler/output/expected
qas.py -t
Priority: The author does not have access to the target hardware and thus cannot generate schematics. Please work on this if possible.