I'm using FASM to compile a small piece of code:
mov ah,4ch
mov al,00
int 21h
I click Run -> Compile, and what I get is a .BIN file. sorry for the n开发者_运维百科oobish question but why don't I get an OBJ, or an EXE file, and what is this BIN?
The BIN is a binary file, You need to check the command line options that you used to pass to FASM. According to the documentation the default format is a flat binary file. To quote from the documentation, section 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.
So I think your code should look like this:
.use32 .format pe console mov ah,4ch mov al,00 int 21h
Edit: I just realized after hitting Save, that it was 16 bit registers used...
.use16 .format MZ mov ah,4ch mov al,00 int 21h
Ya know, they have their own forum. http://board.flatassembler.net/
精彩评论