|
|||||||||||
|
Technical Support On-Line Manuals Ax51 User's Guide |
Ax51 User's GuideImmediate DataAn immediate data operand is a numeric expression that is encoded as a part of the machine language instruction. Immediate data values are used literally in an instruction to change the contents of a register or memory location. The pound (or number) sign (#) must precede any expression that is to be used as an immediate data operand. The following shows some examples of how the immediate data is typically used:
MY_VAL EQU 50H ; an equate symbol
MOV A,IO_PORT2 ; direct memory access to DATA
MOV A,#0E0h ; load 0xE0 into the accumulator
MOV DPTR,#0x8000 ; load 0x8000 into the data pointer
ANL A,#128 ; AND the accumulator with 128
XRL A,#0FFh ; XOR A with 0ffh
MOV R5,#MY_VAL ; load R5 with the value of MY_VAL
| ||||||||||
|
|||||||||||