I'm still trying to grasp what I'm doing, but I think this does help. I'm trying to create a teleport code for botw, so I need to be able to store an address with one button combination, then have it recall the coordinate values with a different button combination, which is what I need 0xA for.
So the first 4 lines of your code load the pointer to the HP value into register D. Line 5 I know is an arithmetic codetype, but it doesn't appear to have an operation, so I don't understand what it's for? Line 6 copies register D into register A. Line 7 is changing register A's value to zero(? So register A retains the memory address, but the value associated with that address becomes zero?) Line 8 adds 10 to the address of register D, as you said (this I don't understand because it's about to be overwritten by the value in register A anyway, right?) And finally, line 9 overwrites the value (and memory address?) of register D with register A(? My understanding is that this would simply overwrite the register without pushing values back to the actual memory address. Is this not the case?)
At this point, I'm wondering if using the SMM2 cheat as a base might be overcomplicating what I need. For that code, it appears the coordinate address(es) are being loaded into a register, then written to a blank area in memory. Then recalling them later loads the previously blank memory address into a register and writes that value into the coordinate address(es). Since the coordinate values are being stored into a register anyway, I should just be able to just recall that information without the need of writing it into memory somewhere for later, right?
This is my first time trying to write a code, and I've really thrown myself into the deep end here, so I apologize for all the questions and misunderstandings.