LDM
Name |
Branch Back and Load |
Function |
The 4 bits of immediate data encoded in the instruction are loaded
into the accumuator, then execution continues with the most recent address
on the stack.
contents of the accumulator. The carry bit is not affected. |
Syntax |
LDM(D) |
Assembled |
|
Binary |
1100 DDDD |
Decimal |
208, then incrementing by 1 until 223 (1st word). |
Hexadecimal |
0xD0, then incrementing by 1 until 0xDF (1st word). |
Symbolic |
|
Execution |
1 word, 8-bit code and an execution time of 10.3 \({\mu}\) sec |
Side-effects |
Not Applicable |
Implemented |
ldm |
Detailed Description
The 4 bits of immediate data are loaded into the accumulator.
The carry bit is not affected.
Example Program
/ Example program
ldm 0
ldm 9
ldm 15
end
The above program will first clear the accumulator (setting all 4 bits to 0), then load the value 9 into the accumulator, then finally, set all the accumulator’s 4 bits by loading the value 15.