Immediate Addressing Mode

Syntax

instruction #value

Description

In immediate addressing mode, the instruction operand is a constant value that is specified directly in the instruction, using the # symbol to indicate an immediate value. The instruction operates directly on this constant value, rather than loading from a memory location or register.

Example

Here’s an example using the LDA instruction in immediate addressing mode:

LDA #10

The instruction will load the value 10 directly into the accumulator.

Use Cases

Immediate addressing mode is useful for performing operations that involve a constant value, such as incrementing or decrementing a counter, setting a flag, or initializing a variable.

Comments