Shop OBEX P1 Docs P2 Docs Learn Events
asm variable idiosyncrasy — Parallax Forums

asm variable idiosyncrasy

BradCBradC Posts: 2,601
edited 2007-07-16 19:13 in Propeller 1
G'day all

Having just discovered the propeller after years of 6052, 8051 (and derivatives), pic and a couple of others I have to say I'm kind impressed. It's fun.
(the vga output makes debugging a doddle!)

The reason I registered and write this is I spent about 4 hours beating my head against a wall when writing propeller asm code and write this to

A) See if I missed a document somewhere
B) I'm just stupid ... or
C) Warn others (though a quick scan of the forum does not seem to indicate (c), more (b).. <sigh>)

I laid out my program, and defined my variables at the end, however I defined my pre-defined's after my normal "res"erved variables..
like..

t1 res 1
t2 res 1

mask1 long $FF00FF00
delay long $0070000

And what I found (after quite some time) is that the pre-defined variables come up as garbage when I run the code.
Switching the pre-defined's to before the "res"erved worked perfectly.

Hope this might help someone or alternatively help people point me to a document (or part thereof) I may have missed

Brad

Comments

  • CJCJ Posts: 470
    edited 2007-07-16 15:09
    welcome to the propeller

    the propeller tricks and traps thread contains a good document for asm funnybussiness

    http://forums.parallax.com/forums/default.aspx?f=25&m=114128

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax Forums - If you're ready to learn, we're ready to help.
  • BradCBradC Posts: 2,601
    edited 2007-07-16 19:13
    And there we go, right there in lights on Page 7.

    Thanks CJ for the pointer and Phil for the doc [noparse]:)[/noparse]

    Brad
Sign In or Register to comment.