How to use the FASM Console for Compiling
-
14-07-2021 - |
سؤال
I am trying to make an assembly IDE that lets the user enter code and compile it with NASM, FASM, YASM, etc. However, since FASM comes with an IDE, I can't find any information on compiling with the console. For example, if I had a program test.asm, would I compile like this:
fasm test.asm
If I did, fasm.exe would have to be in the same directory as command prompt was operating I assume. Thanks for any help.
المحلول
Your building an IDE for use with multiple Assemblers? Create a settings file (maybe a project file) and let the user enter the path for the their Assemblers. You then pass this info onto, in your case FASM. You could look at RadASM and WinASM, both are awesome Assembly IDEs with source.
Something similar to this:
And this:
All this gets saved to a project file When the project is opened, load the paths and pass on to the assembler/linker/res compilers command line.
نصائح أخرى
Set PATH
to wherever fasm.exe is, and set INCLUDE
to wherever the fasm includes are, and everything should work as you expect.
You can decide the output file name and path directly in the command line:
fasm source/path/source.asm destination/path/output.exe
When you omit the last argument, fasm will try to guess the extension based on the format directive inside the source.