|
Re: Help: Indexed addressing mode (MC68HC11A8)
You're making this more difficult than it is. Forget your specific microprocessor. Suppose you want to fetch some value from memory. You have to eventually wind up with the specific address of that value.
You might use a specific address. You might add some base address to some offset. Either or both of those may be located in registers or in memory.
You might fetch some address from memory and then use it directly, or modify it with some offset, or use it to fetch another address, and then modify it, or not.
Two plus two plus one equals five. Four plus one equals five. Five equals five. The number of operations may vary, but the answer is the same.
Some microprocessors will give you fewer options than others. Forget that. Follow the chain that yields the answer. Don't wish you had some way that your microprocessor won't support. Look at the architecture. Read the specifications. Live the code.
|