lc3_ensemble::ast

Module asm

source
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:

  • AsmInstr: An enum of all possible assembly source code instructions
  • Directive: An enum of all possible assembly source code directives
  • Stmt: The format for a single “statement” in assembly source code

Structs§

  • A “statement” in LC-3 assembly.

Enums§

  • An enum representing all of the possible instructions in LC-3 assembly code.
  • An enum representing all the possible directives in LC-3 assembly code.
  • Either an instruction or a directive.

Functions§

  • Attempts to disassemble bytecode back into assembly instructions.
  • Attempts to disassemble a line of bytecode back into an assembly instruction, returning a .fill directive if not possible.
  • Attempts to disassemble a line of bytecode back into an assembly instruction, returning None if it cannot be disassembled.