Module lc3_ensemble::ast

source ·
Expand description

Components relating to the abstract syntax trees (ASTs) used in representing assembly instructions.

These components together are used to construct…

  • asm::AsmInstr (a data structure holding an assembly source code instruction),
  • asm::Directive (a data structure holding an assembly source code directive),
  • and sim::SimInstr (a data structure holding a bytecode instruction).

Modules§

  • This module holds the AST for statements from assembly source code.
  • Register constants!
  • This module is used for holding simulation instructions (SimInstr), which are instructions that directly map to bytecode.

Structs§

  • A label.
  • A value representing an offset or an immediate value.
  • A register. Must be between 0 and 7.

Enums§

Type Aliases§

  • A condition code (used for BR), must be between 0 and 7.
  • A value representing a signed offset or a signed immediate value.
  • An unsigned 8-bit trap vector (used for TRAP).