⌨️

LC3 Fundamentals

TypeQuiz 3 Material

Registers

General-purpose register set

Data types

The only data type supported by the ISA of the LC-3: 2's complement integers.

The Instruction Set

An instruction is made up of two things, its opcode (what the instruction is asking the computer to do) and its operands(who the computer is expected to do it to)

Opcode

LC3 has three different types of instructions(three different types of opcode)

Operand can be found in one of three places

LC3 Instruction Overview

Addressing Modes

Specify where the operand is located

Five addressing mods

Executing Instruction

Each instruction execution has three "stages", called macrostates

Each macrostate is made of one or more microstates (1 per clock cycle)

The microstates are the states in the microcontroller's state machine!

Macrostates:

Fetch

Decode

EXECUTE

Control Instructions

Usually, PC is incremented in the FETCH phase of each instruction, and the next instruction would be the instruction located in the next sequential memory location.

Control instructions change the sequence of the instructions that are executed

5 opcodes that enable the sequential flow to be broken:

Memory(LC 3)

Read Memory

Memory is accessed by loading the memory address register (MAR) with the address of the location to be accessed.

Load Memory

control signals read the memory input(MAR), and the result of that read is delivered by the memory to the memory data register (MDR)

Store in Memory

If a store is being performed, the data to be stored is first loaded into the MDR. Then the control signals specify that WE is asserted in order to store into that memory location.