HSW:
I don't have a 512X and I haven't read the RM. I am referring to the XGATE Assembler RM (I don't have the RM # in front of me, but you can find it on the Freescale Web). I have lately been programming the 100XEP, XHY and XHZ vesions. I use the XGATE assembler RM when programming in Assembly. The RM's, for the chips that I memtion here, shows only a cusorary introduction into the XGATE assembler.
However the XGATE Assembler (either the Motorola or Freescale versions) does have a LDW instruction that loads a 16 bit address. It explains both a effective address using the # sign and the contents of the address without the # sign. I use the LDW instruction all the time, works fine.
I will download the 512X RM to see what it says,h but I would thing that you should refer to the XGATE assembler RM, just like you would and read the S12X Assembler RM for CPU12 instrustions. The various chip RM's, in my experience, can not be used as an Assembly referenece manual.
The Error, in both manuals, is that LDW always load the 16 bit effective address.
At a friends request I put an example of a XGATE Serial Transponder on the Forum. Download it and you will
see a lot of LDW Rn,#Address and perhaps other Instructions that the 512X RM manual doesn't include.
I would appricaite any further feedback.
Regard
Leonard
UPDATE: I have read the XDP RM and I see where your coming from. In the past the RM's I have read were outdated and did not have the
updated/correct information. The XGATE RM manual that I have been using is 'FREESCALE XGATE ASSEMBLER' Dated Feb 2008. (it's a carbon copy
of the 'MOTOROLA XGATE ASSEMBLER' of the same date. Chapter 6 has several errors: It includes the following CORRECT XGATE examples:
LDW Rn,#address ; Load the effectives 16 bit address
LDW Rn,#$xxxx ; Loads the 16 Bit Immedaite value in Rn
Note: These instruction work fine; the assembler converts them to LDH & LDL
Chapter 6 has the following ERRORS:
LDW Rn,Address ; Loads the contents of 'Address'
LDW Rn,$56 ; Loads the Contents of Address $56
Note: Neither of these instructions are correct. The author of this manual was assuming that the XGATE operates like CPU12.
The XGATE Assembler will accept these and will not flag them...
Conclusion: I learned XGATE Assembly on an OLD RM. (I noticed it had no Ref Number - just name). Obviously Freescale needs to eliminate
this manual and issue an errata or note to cancel same. From now on I will read the latest Updated manuals.
Thanks HSW
Regards
Leonard
Message was edited by: leonard mcreynolds
Message was edited by: leonard mcreynolds