2010-02-20 53 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 
相關問題