flat assembler
Message board for the users of flat assembler.

Index > Windows > Default Output File Assembled/Compiled

Author
Thread Post new topic Reply to topic
magicyte



Joined: 29 Mar 2009
Posts: 4
Location: n/a
magicyte
Is there any possible way of changing the default output file from .com to .exe in fasm? I program in win32 mostly all of the time, so I don't like going to the command prompt over and over again to make the output file .exe. The FASM IDE is simpler to use, obviously Smile If this isn't possible, let me know. Perhaps someone could, ehm, make a version with the default file as a selection in the IDE... Very Happy

_________________
- Chris
Post 29 Mar 2009, 02:29
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
If you use format PE or format MZ then the output defaults to .exe

It is all in how you set the format.
Post 29 Mar 2009, 02:47
View user's profile Send private message Visit poster's website Reply with quote
magicyte



Joined: 29 Mar 2009
Posts: 4
Location: n/a
magicyte
I don't quite understand your reply... How do I set this 'pe' or 'mz' format for the compiler?
Post 29 Mar 2009, 03:03
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Post 29 Mar 2009, 03:42
View user's profile Send private message Reply with quote
magicyte



Joined: 29 Mar 2009
Posts: 4
Location: n/a
magicyte
Thank you both! However, I noticed it makes the .exe considerably larger for such a small purpose. Is this supposed to happen?
Post 29 Mar 2009, 04:59
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
> Is there any possible way of changing the default output file from .com to .exe in fasm?

Theoretically YES: format binary as "EXE" (but .COM default is only with use16 + org $0100 - so no Win32 anyway).

> I program in win32 mostly all of the time

Then you don't have this problem, you will use format PE only and it does default to EXE. Note that format MZ is not a Win32 executable, and .COM even less.

> make a version with the default file as a selection in the IDE...

NO. SSOO http://flatassembler.net/docs.php?article=design

> noticed it makes the .exe considerably larger

larger than what ?

> Is this supposed to happen?

Again, format PE is obligatory for Win32 programming, except you use format binary to brew your PE manually or use a linker. And NO, there is no way to make a PE Hello World below 1 KiB without very bad hacks. PE in the only executable format natively supported in Win32.


Last edited by DOS386 on 29 Mar 2009, 05:14; edited 5 times in total
Post 29 Mar 2009, 05:03
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Yes, because the COM files only include what your source has whereas the "format MZ" also includes information of the MZ executable format itself.

However, what OS are you targeting? Do you what a DOS executable or a Windows executable? If the latter is the case then your only option is "format PE" (and the extra options, check manual), it makes an EXE but this one needs Windows to run and under DOS it will say "this program requires Windows to run".
Post 29 Mar 2009, 05:08
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

YES: format binary as "EXE"

But take in mind that fasm will format it as plain binary instead the expected MZ format.
Post 29 Mar 2009, 05:12
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
> instead the expected MZ format.

For Win32 programming you need Win32 examples, so things like org 100h or int 21h or pop ds are a strong sign that you picked wrong examples. Wink
Post 29 Mar 2009, 05:23
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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.