I don't know what means oprx8.
In datasheet,oprx8 is "Any label or expression that evaluates to an unsigned 8-bit value, used for indexed addressing".
Could you please give me an sample.
PTAD, I presume is 0. What's happening here is the assembler is optimising this to the faster IX addressing mode which uses an implied zero base. It shouldn't happen for a non-zero base.
Not clear what you are saying here. There are many addressing modes available with this instruction
The limitation you allude to here occurs with many instructions in this addressing mode.
It means that the base value that you index from must be in the "zero page" or the first 256 bytes of RAM.
Thanks for your help.
Now I know how to use itprx8 is a base address value and X index register is offset.
I meet a new question: the machine code is 60 00,I want to know what the asm sentenct is.
I try to write the code: NEG 0,X or NEG PTAD,X. But the corresponding hex is 70.I can not get 60 00 object binary.
Please help me about it.Thanks.
Okay,I know now.It should be code space.
I assume you are talking about a MC9S08 family MCU. If so, then you need to get the HCS08 Family Reference Manual and read section 6.3 to learn about the addressing modes in the S08.
But to answer your question:
neg n,X ;negate the a value in memory
"n" is an 8 bit offset, contained in the assembled instruction, which is added to the contents of the H:X register to determine the address in memory to be negated.
Retrieving data ...