NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: nobody on January 04, 2009, 04:28:19 AM

Title: OPCODE hex equivalent
Post by: nobody on January 04, 2009, 04:28:19 AM
Hi can some one help me how to find the hex equivalent of nasm instructions?
Thanks.
Title: Re: OPCODE hex equivalent
Post by: nobody on January 04, 2009, 06:41:24 AM
Quick Way:
write the instruction in a file and compile it using "-f bin". It will spit out raw stuff without headers or anything. Then you can use a hex editor to find it out. Another thing you can do is write the same instruction many many times and you can find it using a hex editor by simply scrolling until you find something that repeats over and over again :).

long way:
Read the intel specs. I don't remember where it is though.


When I was interested I did the "quick way" lol.
Title: Re: OPCODE hex equivalent
Post by: nobody on January 14, 2009, 01:20:39 AM
Right Way:
write the instruction in a file and compile it using "-f bin -l listing.lst". Then you can use your eyes to find it out in the listing.lst file.