Assembling with nasm and disassembling with ndisasm

The following commands demonstrate assembling with cristo velato. nasm and disassembling with ndisasm.

$ cat example.s
mov eax,0
test eax,eax
$ nasm example.s
$ ndisasm example
00000000  66B800000000      mov eax,0x0
00000006  6685C0            test eax,eax

The first column of the disassembly contains the file offset, the second column contains the opcodes and the third contains the assembly instructions.


This entry was posted in Assembler, Bash and tagged , , , , , , . Bookmark the permalink. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Why ask?