Shop OBEX P1 Docs P2 Docs Learn Events
PASD problem getting a new source to work. — Parallax Forums

PASD problem getting a new source to work.

HShankoHShanko Posts: 402
edited 2011-02-18 18:54 in Propeller 1
I've used PASD before, but for some reason this one won't bring code into PASD.

The attached archive should provide all the info on what I'm probably missing. The PASM 'Track1' is the one I need to debug.

What ever I do, all I get is the blank screen and NO code of any kind ever loading, but do not get error message of 'no data', which is strange. I tried the PASD demo and that loaded OK. Ignore 'PulseScope'; I could not delete it from the window on uploading TsBasic. Apologies

Comments

  • AribaAriba Posts: 2,690
    edited 2011-02-16 17:43
    I have not tried it with PASD so far, but what I see is:
    You have no ORG at begin of the cog code. Every Assembly code for a cog has to start with an ORG 0, see the example code.

    Andy
  • HShankoHShanko Posts: 402
    edited 2011-02-16 19:00
    Thank you for catching the missing ORG. No wonder things were so weird. I'll correct that, and that should be it. Fresh eyes sure help.
  • HShankoHShanko Posts: 402
    edited 2011-02-16 19:22
    That did it. Now to find all my other 'bugs'.

    Thanks, Andy/Ariba
  • HShankoHShanko Posts: 402
    edited 2011-02-17 09:15
    Can anyone answer t his? (I ommited an ORG 0 following a DAT,)

    Why doesn't the Prop tool flag a section of PASM code following a DAT, but missing an ORG 0 statement?

    And, without an ORG 0, what address would the PASM code be located?
  • SapiehaSapieha Posts: 2,964
    edited 2011-02-17 09:43
    Hi HShanko.


    As DAT section can be.

    Long xx
    Long xx
    Long xx
    Long xx

    ORG 0

    First COG PASM

    ORG 0

    Second COG PASM

    AND so ON.

    Maybe You understand that that need be that way as it is.


    HShanko wrote: »
    Can anyone answer t his? (I ommited an ORG 0 following a DAT,)

    Why doesn't the Prop tool flag a section of PASM code following a DAT, but missing an ORG 0 statement?

    And, without an ORG 0, what address would the PASM code be located?
  • kuronekokuroneko Posts: 3,623
    edited 2011-02-17 16:21
    HShanko wrote: »
    And, without an ORG 0, what address would the PASM code be located?
    It defaults to zero for the first DAT section, subsequent ones simply continue where the previous one finished. OTOH, you could simply have checked by assembling a long $ in an otherwise empty DAT section.
  • HShankoHShanko Posts: 402
    edited 2011-02-17 17:16
    I'll restate one question:

    If one doesn't include an ORG 0, but valid PASM code follows, why doesn't the Prop tool recognize the omission?
  • kuronekokuroneko Posts: 3,623
    edited 2011-02-17 17:25
    HShanko wrote: »
    If one doesn't include an ORG 0, but valid PASM code follows, why doesn't the Prop tool recognize the omission?
    What's valid PASM code, i.e. how would you recognise it? Besides, sometimes you don't want a specific org for a reason.
  • HShankoHShanko Posts: 402
    edited 2011-02-18 09:29
    kuroneko,

    I don't know enough about what all the Prop tool internally on one's program. And I suppose and sort of values can follow a DAT in byte, word, long form. Would there ever be a case where a ORG n, where ne does NOT be zero, would be used? Maybe that doesn't make sense in the real world. I'm just trying to understand how the Prop tool catches some errors but not others, like my questions have been about. OK, maybe the 'horse is beaten enough now'.
  • kuronekokuroneko Posts: 3,623
    edited 2011-02-18 15:11
    It was a valid request but I figured to catch all ways of tieing a DAT label to this is code is a bit over the top and may not work in all cases. That said, maybe covering the common cases would be enough (cognew referencing a DAT label). Anyway, yes there are legitimate uses for org n. Some types of overlay loader have the loader code followed by the actual payload, i.e. the user code starts at offset n.
  • HShankoHShanko Posts: 402
    edited 2011-02-18 18:54
    kuroneko,

    If I weren't occupied with other tasks, and had the time to devote to it, I'd of tried to dig deep into such a subject. In the past I'd written a couple of disassemblers (in Basic; yeah, s l o wwww). And even a crude assembler, which was a nice learning curve.

    Thanks for your comments, not just on this thread, but have enjoyed your comments on many others. Thanks for the deep understanding of the Propeller I.
Sign In or Register to comment.