Вопрос

I have made a file.asm that has assembly code and would like to get the binary code of that file. I have been using the command line

nasm -f bin file.asm  

When I run this command no files are generated and no binary code is displayed. Where would I find this?

Thanks All!

Это было полезно?

Решение

I think you're asking for an assembly listing, not a binary "output file" which is a raw binary opcode file. That's how you display the binary codes (as opposed to generating a pure binary file).

nasm file.asm -l file.lst

Then just open file.lst and look at it. It will show all the encoding of all the instructions.

Другие советы

The result should by default be written to file, ie. whatever you have given as input minus the .asm extension. You can also direct the output to any file explicitly by using the -o option and you can also ask for listing file. You should have been able to figure this out yourself if you had at least taken a look at the manual.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top