PDA

View Full Version : Possible Bug with RES?



tekochip
02-21-2007, 12:52 AM
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?


·

SSteve
02-21-2007, 12:55 AM
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 (http://www.theuniversalsteve.com)
Our album on the iTunes Music Store (http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=84780626&id=84781354)