flat assembler
Message board for the users of flat assembler.

Index > Windows > problem using align with section

Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 21 May 2010, 20:59
I have a small assembly program that was written for an example to interface fasm coff object files with c. Everything works fine until I try to align the procedure See below:
Code:
; This is example of mixing C code and assembly
format MS COFF

include '%fasminc%\win32a.inc'

public fasm_rndintq32 as 'fasm_rndintq32'
;extern "C" unsigned int fasm_rndintq32(unsigned int);

section '.text' code readable executable

;section '.data' data readable writeable

align 64
proc fasm_rndintq32 c rndidum:DWORD
     mov    eax, $12345678
     ret
endp    

The align gives me an error "section is not aligned enough"? I even tried align 16384, but still gives me the error. Does anyone know whats going on here?

_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 21 May 2010, 20:59
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 21 May 2010, 21:59
Post 21 May 2010, 21:59
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 22 May 2010, 00:27
Yeh, that was the problem, thanks!
Post 22 May 2010, 00:27
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.