Possible Bug with RES?
tekochip
Posts: 56
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?
·
······· 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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store