Shop OBEX P1 Docs P2 Docs Learn Events
sx/b variable at fixed address possible? — Parallax Forums

sx/b variable at fixed address possible?

Peter VerkaikPeter Verkaik Posts: 3,956
edited 2007-03-07 11:49 in General Discussion
I tried in sx/b

ppp var byte @__RAM($10)


It compiles just fine, but when I look at the listview
ppp is located below the other variables, not at $10.

Is it possible to alias ppp to a specific address?

regards peter

Comments

  • BeanBean Posts: 8,129
    edited 2007-03-07 11:35
    I'll try it later, but I think "ppp VAR __RAM($10)" might work.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Coming soon! Propeller based OSD module www.hittconsulting.com
    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-03-07 11:43
    That works.
    Problem is I cannot use ppp in a for/next then.
    Generates error Byte parameter expected,
    though $10 is a valid byte parameter address.
    Would be nice if we could use
    ppp var byte @__RAM($10)
    ppp var word @__RAM($10)
    and ppp being recognized as byte or word

    regards peter
  • BeanBean Posts: 8,129
    edited 2007-03-07 11:49
    Okay, I see. It is being defined as an array element instead of a "normal" byte variable.

    The beta version should let you use it in a FOR/NEXT.

    I'll look into having it declared as a "normal" byte variable.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Coming soon! Propeller based OSD module www.hittconsulting.com
    ·
Sign In or Register to comment.