My Project
Data Fields
LC3_inst Struct Reference

#include <lc3.h>

Data Fields

int formBit
 
inst_format_t forms [2]
 

Detailed Description

This structure stores the information about a single instruction. See the usage in lc3.c where the information for each LC3 instruction is defined. The name of the second form will be NULL unless the instruction actually has two forms.

Field Documentation

int LC3_inst::formBit

-1 if instruction has only one format, else bit that differentiates format. This field is only used in the simulator, where it is used to differentiate the two ADD/AND formats and the JSR/JSRR

inst_format_t LC3_inst::forms[2]

syntax for both possible forms. It is possible to have two forms even when the form bit has a value of -1. For example JMP/RET are really the same instruction. RET is simply a shorthand for JMP R7


The documentation for this struct was generated from the following file: