asm variable idiosyncrasy
BradC
Posts: 2,601
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
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
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
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
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.
Thanks CJ for the pointer and Phil for the doc [noparse]:)[/noparse]
Brad