flat assembler
Message board for the users of flat assembler.

Index > Main > align in MSCOFF

Author
Thread Post new topic Reply to topic
Defsanguje



Joined: 07 Aug 2006
Posts: 7
Location: Finland
Defsanguje
I'm not sure is it a bug or what, but instruction "align 16" gives error: Section is not aligned enough. Changing the instruction to "align 4" works well though.

Code:
format MS COFF

include 'win32ax.inc'

section '.text' code readable writeable executable

align 16
proc WriteESI
@@:             lodsb
                stosb
                test al, al
                jnz @b
                dec edi
.Exit:          retn
endp     
    
Post 03 Oct 2009, 18:12
View user's profile Send private message MSN Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7725
Location: Kraków, Poland
Tomasz Grysztar
You have to align the whole section first, if you want to have alignment of such size enabled inside it. Default alignment for section is 4, and you change it like:
Code:
section '.text' code readable writeable executable align 16    
Post 03 Oct 2009, 19:23
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.