PDA

View Full Version : Manual vs. Compiler: A discrepancy regarding WR/NR in hub instructions.



Phil Pilgrim (PhiPi)
01-25-2008, 07:08 AM
Here's an error I got:

http://forums.parallax.com/attachment.php?attachmentid=51688

Here's what the manual says (p. 395):

http://forums.parallax.com/attachment.php?attachmentid=51689

There's nothing about this in the errata, so hopefully the manual is correct, and the superfluous error can be fixed in the compiler.

Thanks,
Phil

Mike Green
01-25-2008, 07:24 AM
Actually, the error message is correct. The difference between the RDLONG and WRLONG instructions is the WR bit. The manual is incorrect. If you were to use the NR effect, you would get a WRLONG instruction.

deSilva
01-25-2008, 07:26 AM
Alas, you are of luck, Phil: The manual is wrong... :-(
This issue comes up from time to time, and I commented on it also some months ago.

When you have a look at the binary representation of the opcodes you will find that NR is used to differenciate between WR and RD http://forums.parallax.com/images/smilies/smile.gif

Edit:
Damn! Mike was faster!

Phil Pilgrim (PhiPi)
01-25-2008, 07:34 AM
Ach, so! I neglected to look at the code bits. Thanks, guys!

-Phil