flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 24 Apr 2012, 07:02
You should read the section 1.1.2 of the FASM manual.
Note, you can't affect the output of FASM from the command line. From the same source file, FASM will always generate the same output. |
|||
![]() |
|
HD Blood 24 Apr 2012, 08:25
JohnFound wrote: You should read the section 1.1.2 of the FASM manual. I have read the manual, but I don't get what I'm doing wrong? Manual wrote: If no second parameter is given, the name for output file will be guessed automatically. So far, I have tried: - Drag and drop the source to the compiler - Pass 1 argument to the compiler: "sourcepath\source.asm" - Pass 1 argument to the compiler, which contains both source and destination path: "sourcepath\source.asm destinationpath\compiled.exe" - Pass 2 arguments to the compiler with an shortcut (Don't know if I'm doing it right?): "pathtocompiler\FASM.exe -sourcepath\source.asm -destinationpath\compiled.exe" My source file looks like: Code: include 'win32ax.inc' .code start: invoke MessageBox,HWND_DESKTOP,"Start",invoke GetCommandLine,MB_OK repeat 10000000 add ecx,1 end repeat invoke MessageBox,HWND_DESKTOP,"Stop",invoke GetCommandLine,MB_OK invoke ExitProcess,0 .end start JohnFound wrote: Note, you can't affect the output of FASM from the command line. From the same source file, FASM will always generate the same output. What do you mean? So I can't determine where my exe will be placed? Then why do you have to pass the second argument? Can you explain a little more? I don't exactly get it? Dyon. |
|||
![]() |
|
revolution 24 Apr 2012, 08:34
At the command prompt type:
Code: c:\>fasm MyUberSource.asm MyUberProgram.exe |
|||
![]() |
|
JohnFound 24 Apr 2012, 08:42
Your example compiles OK for me.
You probably didn't set the path to the include files properly. Use "INCLUDE" environment variable, or simply explicitly set the full path in the include clause in your source file. About the second note: You can, of course, set the target name in the command line. But you can't change the type or content of the binary file from the command line. For example - the source from your example will always compile to 32bit windows PE file. You can change the file name, but the content of the file will always be the same. |
|||
![]() |
|
HD Blood 24 Apr 2012, 08:58
JohnFound wrote: environment variable, or simply explicitly set the full path in the include clause in your source file. Aah, you are right. He didn't find the include file. Now it works fine! Thank you ^^ JohnFound wrote:
Oh ok. I didn't know that. Thanks. ![]() Dyon. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.