Memory Reference Instructions Computer Architecture
What are Memory Reference Instructions? • - Instructions that access main memory (RAM) • - Operands may be in memory, not just registers • - Used for data transfer, arithmetic, logic, and control
General Instruction Format • [ Opcode | Address ] • - Opcode: Specifies the operation (e.g., LDA, STA, ADD) • - Address: Memory location of operand
Examples of Memory Reference Instructions • 1. LDA → Load Accumulator from memory • 2. STA → Store Accumulator into memory • 3. ADD → Add memory content to Accumulator • 4. SUB → Subtract memory content from Accumulator • 5. AND / OR → Logical operations with memory • 6. BUN → Branch Unconditionally
BUN (Branch Unconditionally) • - Control transfer instruction • - Operation: PC ← Address • - Always branches (no condition) • - Skips sequential execution • - Example: • 101: BUN 300 → PC jumps to 300 • 102 is skipped
Uses of BUN • - Change program flow • - Create loops or infinite jumps • - Jump to subroutines (with BSA) • - Useful in control and decision-making

Memory_Reference_Instructions. Computer architecture

  • 1.
  • 2.
    What are MemoryReference Instructions? • - Instructions that access main memory (RAM) • - Operands may be in memory, not just registers • - Used for data transfer, arithmetic, logic, and control
  • 3.
    General Instruction Format •[ Opcode | Address ] • - Opcode: Specifies the operation (e.g., LDA, STA, ADD) • - Address: Memory location of operand
  • 4.
    Examples of MemoryReference Instructions • 1. LDA → Load Accumulator from memory • 2. STA → Store Accumulator into memory • 3. ADD → Add memory content to Accumulator • 4. SUB → Subtract memory content from Accumulator • 5. AND / OR → Logical operations with memory • 6. BUN → Branch Unconditionally
  • 5.
    BUN (Branch Unconditionally) •- Control transfer instruction • - Operation: PC ← Address • - Always branches (no condition) • - Skips sequential execution • - Example: • 101: BUN 300 → PC jumps to 300 • 102 is skipped
  • 6.
    Uses of BUN •- Change program flow • - Create loops or infinite jumps • - Jump to subroutines (with BSA) • - Useful in control and decision-making