View Single Post
Old 16 January 2015, 13:36   #17
IFW
Moderator
 
IFW's Avatar
 
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
As far as I can see from some random source is that I used a section where 4 byte alignment was needed, the first data there is certainly starting at a 4 byte alignment. Then ds.b could be added with modulo 4 of the difference between known reference points to make sure that the next label starts at an integral multiple of 4.
Since the expression evaluator is particularly dumb by today's standards, you have to write something like this:

section bss
start ds.b 0
junk ds.b <your data>
pad ds.b ((pad-start+3)/4*4)-(pad-start)
align4 ds.b <your 4 byte aligned data>


You can probably make this a macro with a local label in place of "pad" to make the code actually readable
IFW is offline  
 
Page generated in 0.04379 seconds with 11 queries