简体   繁体   English

如何使用FASM控制台进行编译

[英]How to use the FASM Console for Compiling

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. 我正在尝试制作一个汇编IDE,使用户可以输入代码并使用NASM,FASM,YASM等对其进行编译。但是,由于FASM附带了IDE,因此找不到有关使用控制台进行编译的任何信息。 For example, if I had a program test.asm, would I compile like this: 例如,如果我有一个程序test.asm,我会这样编译吗:

fasm test.asm

If I did, fasm.exe would have to be in the same directory as command prompt was operating I assume. 如果这样做,fasm.exe必须与命令提示符正在运行的目录位于同一目录中。 Thanks for any help. 谢谢你的帮助。

PATH设置为fasm.exe所在的位置,并将INCLUDE设置为fasm所包含的位置,一切将按预期工作。

Your building an IDE for use with multiple Assemblers? 您要构建一个可与多个汇编器一起使用的IDE吗? 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. 然后,您将此信息传递给FASM。 You could look at RadASM and WinASM, both are awesome Assembly IDEs with source. 您可以看一下RadASM和WinASM,它们都是很棒的Assembly IDE,带有源代码。

Something similar to this: 类似于以下内容: RadASM路径

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. 所有这些都保存到项目文件中。打开项目时,加载路径并传递到汇编器/链接器/ res编译器命令行。

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. 当省略最后一个参数时,fasm将尝试根据源中的format指令猜测扩展名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM