Shop OBEX P1 Docs P2 Docs Learn Events
Using ctra_ syntax — Parallax Forums

Using ctra_ syntax

royaltyroyalty Posts: 3
edited 2012-03-29 14:26 in Propeller 1
Using the following:
ctra_ long %01010 << 26 + 7
I understand the mode assignment but do not understand the shift right 26 + 7 part. If it is the apin assignment what does the 26 signify.
Thanks

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-28 14:18
    The shift has higher precedence than addition, so %01010 get shifted left by 26 bits into position for the mode. After that, the 7 is added to the APIN field.

    -Phil
  • royaltyroyalty Posts: 3
    edited 2012-03-29 14:26
    Thanks for the speedy reply.
Sign In or Register to comment.