I am having trouble figuring out weather to load a regisiter with the contents of the data in the regisiter or indirectly load the register with the address of the value when we execute LDI.
Example:
x3000 LDI R6, far
x3001 ...(some command)
x3002 ...(some command)
x3003 far x6000
...
x6000 xf000
what is the data in R6 after excecuting x3000?
well take this for example
assemble and dump
and hand disassemble
The LDI instruction does this:
the lower 9 bits of the instruction are 0x002 which sign extends to be 0x0002. the pc is the modified pc so when executing the instruction at address 0x3000 the pc is actually 0x3001 so