
Question:
Using the simulator. executing the instructions:
0x809800
end
ldi @300h,r0 0x809801
br
end Answer: You need to set the data page to 0 by adding this instruction: 0x809800
ldp 0 0x809801 end ldi @300h,r0 ; read from location dictated by data page and address
0x809802 br end location 650300h. Otherwise it will form the address by placing the value
in the data page register (DP) in the top eight bits of the address used by the LDI
instruction. For example if data page register has 65h, the LDI instruction will read from
location 650300h. |