Shop OBEX P1 Docs P2 Docs Learn Events
Prop assembly — Parallax Forums

Prop assembly

TwimTwim Posts: 10
edited 2008-03-22 03:49 in Propeller 1
·I'm having some difficulty understanding how the REV instruction works.
·What does the s-fields value actually do?
·I would like to reverse the order of all 32 bits of a value but
whenever· I use 0 as the s-field value I get erroneous results. if i use a value of 2, or 4
all but the last 2 bits are reversed as expected. I have tried several values but I cant get all 32 bits reversed
What am·I doing wrong?


·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-22 03:37
    What kind of erroneous results do you get? A source field value of zero should reverse all 32 bits.
  • TwimTwim Posts: 10
    edited 2008-03-22 03:49
    Hello Mike,
    thanks for your speedy reply. I think i've found the problem!
    I was using rev _crdBuff,0
    I tried rev _crdBuff,#0 shorty after posting and that did it . explains the erroneous results. Im guessing I was using the value at
    memory address 0 not the literal 0.

    Thanks.
Sign In or Register to comment.