我使用FASM编译小块代码:汇编程序:使用“Flat assembler”如何生成EXE文件(编译,链接..)?
mov ah,4ch
mov al,00
int 21h
我点击运行 - >编译,我得到的是一个.BIN文件。 对于没有问题的问题感到抱歉,但为什么我没有得到OBJ或EXE文件,这个BIN是什么?
我使用FASM编译小块代码:汇编程序:使用“Flat assembler”如何生成EXE文件(编译,链接..)?
mov ah,4ch
mov al,00
int 21h
我点击运行 - >编译,我得到的是一个.BIN文件。 对于没有问题的问题感到抱歉,但为什么我没有得到OBJ或EXE文件,这个BIN是什么?
BIN是一个二进制文件,您需要检查您用来传递给FASM的命令行选项。根据documentation,默认格式是平面二进制文件。从文件引用,第2.4节:
Default output format is a flat binary file, it can also be selected by using format binary directive. This directive can be followed by the as keyword and the quoted string specifying the default file extension for the output file. Unless the output file name was specified from the command line, assembler will use this extension when generating the output file.
所以我觉得你的代码应该是这样的:
.use32 .format pe console mov ah,4ch mov al,00 int 21h
编辑:我才意识到打保存后,这是16个寄存器使用...
.use16 .format MZ mov ah,4ch mov al,00 int 21h
雅知道了,他们有自己的论坛。 http://board.flatassembler.net/