Shop OBEX P1 Docs P2 Docs Learn Events
Really?! Did I just waste a day because I actually RTM? (Yes I did) — Parallax Forums

Really?! Did I just waste a day because I actually RTM? (Yes I did)

agsags Posts: 386
edited 2013-10-12 17:30 in Propeller 1
On page 375 of the Propeller Manual (current version for download: "Web-PropellerManual-v1.2.pdf") claims this about the PASM WRLONG instruction:

The Z flag is always cleared (0) since the main memory address (bits 13:2) is always on a long boundary.
Because of that, I used this line to write a long to hub RAM and ensure the z-flag was cleared:
wrlong  myValue, hubAddress  wz

After running out of other ideas debugging a nasty problem, I followed the line above with this additional line (nothing intervening between the two):
test  $, #1  wz

and now the problem is no longer observed. The only conclusion I can come to is that wrlong does not always clear the z-flag.

On the one hand, I hope my theory is correct because it means I've identified (and resolved) this problem. On the other had, I hope I'm incorrect, because that indicates just plain sloppy documentation. The line (quoted above) is so basic and unambiguous that it's hard to image there was any misinterpretation involved. It seems to be just plain wrong, clearly not having passed even minimal checking.

Can someone weigh in on this? Thanks.

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2013-10-12 16:03
    ags wrote: »
    ... because that indicates just plain sloppy documentation. ...
    To answer your question, yes.
    * wrxxxx: Z flag
          Z is set when the intrinsic value (long/word/byte) is 0, i.e. writing a value of $FF000000 with wrlong
          will result in Z = 0 while wrword and wrbyte (using the same value) result in Z = 1.
    
  • agsags Posts: 386
    edited 2013-10-12 16:19
    Thank you for the reply kuroneko. Where was that code snippet from? (actually, the question should be "is more accurate documentation, or errata such as this, publicly available?")

    I've gone to the trouble of sending other less severe documentation flaws to "Parallax" (I could be sending to the wrong place) but have never received any indication that it was used to update the docs. I'm not particularly motivated to compound the time wasted on this with more time spent trying to help with corrections if it is ignored.
  • kuronekokuroneko Posts: 3,623
    edited 2013-10-12 16:43
    ags wrote: »
    Where was that code snippet from? (actually, the question should be "is more accurate documentation, or errata such as this, publicly available?")
    That's from my personal notes. When I had the insn timing info corrected in the documentation I also added some updated flag info to the support ticket. ATM I can't verify whether wrxxxx was included simply because the support portal is not accessible.
  • agsags Posts: 386
    edited 2013-10-12 17:30
    Well, thank you for the answer.
Sign In or Register to comment.