Search code examples
assembly68hc11

Copy memory with 2 instructions?


I am using 68HC11. I need to transfer content of the memory:

  • content of $0098 to $0011
  • content of $0097 to $0010

But there is a limitation so I can not solve this. I have to use at most two instructions for this.


Solution

  • LDD $0097
    STD $0010
    

    or

    LDX $0097
    STX $0010
    

    or

    LDY $0097
    STY $0010
    

    So, just use a 16-bit instruction to do the copy.