2010-02-20 88 views

回答

4

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 
相关问题