Expand description
This module holds the AST for statements from assembly source code.
For instructions that map to bytecode instructions
(i.e., the hex representation of assembly instructions), see sim::SimInstr.
Useful structs in this module include:
Structs§
- Stmt
- A “statement” in LC-3 assembly.
Enums§
- AsmInstr
- An enum representing all of the possible instructions in LC-3 assembly code.
- Directive
- An enum representing all the possible directives in LC-3 assembly code.
- Stmt
Kind - Either an instruction or a directive.
Functions§
- disassemble
- Attempts to disassemble bytecode back into assembly instructions.
- disassemble_
line - Attempts to disassemble a line of bytecode back into an assembly instruction,
returning a
.filldirective if not possible. - try_
disassemble_ line - Attempts to disassemble a line of bytecode back into an assembly instruction,
returning
Noneif it cannot be disassembled.