Difference between revisions of "Immediate Value"

From CDOT Wiki
Jump to: navigation, search
Line 5: Line 5:
 
  LDA #$80
 
  LDA #$80
  
Will load the literal value 0x80 (128) into the accumulator (A register). This contrasts with loading a value from a memory location or another register.
+
Will load the literal value 0x80 (128) into the accumulator (A register). Note that the value to be loaded comes from an argument within the instruction stream; this contrasts with loading a value from a memory location in a data area, or from another register.

Revision as of 12:59, 8 September 2014


An immediate value in machine code is a constant or literal value argument. For example, the 6502 assembly instruction:

LDA #$80

Will load the literal value 0x80 (128) into the accumulator (A register). Note that the value to be loaded comes from an argument within the instruction stream; this contrasts with loading a value from a memory location in a data area, or from another register.