Shop OBEX P1 Docs P2 Docs Learn Events
Possible Bug with RES? — Parallax Forums

Possible Bug with RES?

tekochiptekochip Posts: 56
edited 2007-02-20 16:55 in Propeller 1
I'm having some problems with assembly.· I noticed that the wrong address is being used for opcodes if I have initialized data after uninitialized data.· As an example:


······· mov ThrowAway, ConstMask

······· ThrowAway······ res···· 1
······· ConstMask······ long··· $88888888······································ 'Color for clock pulses

The assembled code has both labels pointing one Long too far so that garbage overwrites ConstMask.

Now if I rearrange the data labels with long appearing first:

······· mov ThrowAway, ConstMask

······· ConstMask······ long··· $88888888······································ 'Color for clock pulses
······· ThrowAway······ res···· 1
Everything works properly.· Any ideas?


·

Comments

  • SSteveSSteve Posts: 808
    edited 2007-02-20 16:55
    Initialized data has to come before uninitialized data. Check the Tricks & Traps document in the sticky at the top of the Propeller forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows

    links:
    My band's website
    Our album on the iTunes Music Store
Sign In or Register to comment.