Shop OBEX P1 Docs P2 Docs Learn Events
Minor problem with PASD_077: — Parallax Forums

Minor problem with PASD_077:

andrewsiandrewsi Posts: 59
edited 2011-02-16 21:50 in Propeller 1
So recently I've started having this weird problem using PASD. I'm able to work around it, but I'm curious if anyone has seen something similar and knows the cause.

In short, the problem is that PASD is not counting its own initial itty-bitty kernel at the start of the module, and so it thinks the code begins at address 1 rather than address $0C or whatever it is like it should, meaning that all its ideas about offsets are wrong, and it doesn't show the proper line for execution.

The workaround I figured out was to stick dummy labels in front of each line of LONGs in the PASD kernel at the top of the module, and then PASD seems to do the calculation just fine.

Example beginning of a module:
DAT
        org
entry  
'  --------- Debugger Kernel add this at Entry (Addr 0) ---------
long $34FC1202,$6CE81201,$83C120B,$8BC0E0A,$E87C0E03,$8BC0E0A
long $EC7C0E05,$A0BC1207,$5C7C0003,$5C7C0003,$7FFC,$7FF8
'  -------------------------------------------------------------- 
        mov             addr, par
        rdlong          _delay, addr                    ' Get number of clocks to delay between each crossfade step
        add             addr, #4                                                
        rdlong          _steps, addr                    ' Get number of steps in the crossfade
        add             addr, #4

If I don't add some labels in front of each those "long"s, PASD will be very confused. Anyone else seen this?

Comments

  • AribaAriba Posts: 2,690
    edited 2011-02-16 21:26
    PASD expects a certain structure of the Assembly source. One of the rules is that only labels begin at Column 0. So you can add some spaces instead of labels before the long's of the Kernel (like the original Kernel from the example has) .
    So please don't write anything at first column if it is not a label, no IF_XXX no ORG no LONG ... (I have seen all of these before).

    Andy
  • andrewsiandrewsi Posts: 59
    edited 2011-02-16 21:50
    Good to know, I bet that'll fix it. Thanks!
Sign In or Register to comment.