flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Macroinstructions > Where would i put "align 4" in the ends macro? | 
  
| Author | 
  | 
              
| 
                  
                   madmatt 03 May 2006, 01:45 
                  I'm having trouble finding a place to put an "align 4" in the ends macro.  Where, in the ends macro I would put this? 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   madmatt 27 Aug 2006, 20:04 
                  Just wanted to know where in the struct macro itself to put an "align 4" so I wouldn't have to do it after every struct define, that's all.  For some reason It didn't work for me. 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   daluca 28 Aug 2006, 04:09 
                  in the include/macro/struct.inc file:
 
                  
                just at the begining of the macro : Code: macro struct name { align 4 ;<--here fields@struct equ name match child parent, name... ... ... ... ... I think that will align all the structures you create with the struct macro to a dword boundary.  | 
              |||
                  
  | 
              
| 
                  
                   UCM 28 Aug 2006, 13:44 
                  No, it will only align where you originally defined the struct and not where you use it  
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   daluca 29 Aug 2006, 06:21 
                  yes! my mistake:
 
                  
                I tried a quick solution assembling a file with just three structures, but I declare the structure and then use it. That's why I got an alignment. but if I declare the structures somewhere else: no alignment. Well then,I join in to the question: what can we do to get automatic alignment everytime we use a structure defined with the struct macro?  | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.