Shop OBEX P1 Docs P2 Docs Learn Events
PASM - "res" Initializations Go at the End? — Parallax Forums

PASM - "res" Initializations Go at the End?

LombardLombard Posts: 30
edited 2014-06-06 18:59 in Propeller 1
I had a bug in a program I'm writing with PASM, which turned out to be that declarations such as
horses    res   1      'to be initialized later
must be the final statements of the PASM block. Am I right in this observation? If so, out of curiosity, why is that?

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2014-06-06 17:59
    You are correct! They go last.

    My understanding (it's someplace in the manual) is that they just advance the address offset and don't actually allocate space like long/word/byte do.
  • LombardLombard Posts: 30
    edited 2014-06-06 18:03
    Oh, now that you mention it there is a nice explanation in the Res section of the manual (of all places!).
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-06-06 18:37
    Lombard wrote: »
    Oh, now that you mention it there is a nice explanation in the Res section of the manual (of all places!).

    Imagine that!! It's amazing what you can find when you read the manuals!! (don't worry, it's an inside joke) Someone who spent a lot of time writing that just breathed a sigh of relief when you read it! :lol:
  • LombardLombard Posts: 30
    edited 2014-06-06 18:59
    I completely agree, the manual is great, and in fact I'm learning PASM almost 100% from it. But for some reason I auto-tl;dr-ed the end of that section :O my mistake
Sign In or Register to comment.