Shop OBEX P1 Docs P2 Docs Learn Events
hex number values — Parallax Forums

hex number values

jdoleckijdolecki Posts: 726
edited 2014-05-19 13:33 in Propeller 1
What do I have to put in front of the hex number so the propeller will reconize it as a hex value?

WAKEUP = 0x02,
STANDBY = 0x04,
RESET = 0x06,
START = 0x08,
STOP = 0x0a,

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2014-05-19 10:07
    Use a dollar sign, and I'm assuming you are doing SPIN or PASM.

    $ff = 255 = 111111

    You can also put a delimiter in there.

    $FF = 255 = 11_1111
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-05-19 10:17
    potatohead wrote: »
    Use a dollar sign, and I'm assuming you are doing SPIN or PASM.

    $ff = 255 = 111111

    You can also put a delimiter in there.

    $FF = 255 = 11_1111

    I'll add my two bits


    11 :lol:

    ($FF = 255 = 11111111 = 1111_1111)
  • potatoheadpotatohead Posts: 10,261
    edited 2014-05-19 10:26
    The forum mangled my post! Weird.
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-05-19 10:43
    potatohead wrote: »
    The forum mangled my post! Weird.


    I think it eats percent signs! I remember others having that problem.....I, of course, forgot to use percent signs in the first place to make my notation correct!
    11_1111
    

    EDIT: CODE wrappers don't even help. What is stranger, when I did the above in advanced edit, it had a percent sign in my preview text but had removed it from the window I was typing my text into.

    Obviously, results including percent signs are no long determinent. :lol:
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-19 12:09
    The forum software does strange things with percent signs unless you use the "Basic Editor". It can be changed under "General Settings" after selecting "Settings" from the top right.

    $FF = 255 = %1111_1111
  • potatoheadpotatohead Posts: 10,261
    edited 2014-05-19 13:11
    Thanks! I'll try that next time.
  • JonnyMacJonnyMac Posts: 9,105
    edited 2014-05-19 13:33
    If you're converting a program for C notation (e.g., 0xFF), simply search and replace the 0x with $ for Spin or PASM.
Sign In or Register to comment.