The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: n00b! on June 16, 2008, 12:20:39 PM

Title: Opcodes in Hex
Post by: n00b! on June 16, 2008, 12:20:39 PM
Hi, how can I look up what Opcode stands for what number?
And how the reverse?

e.g. what is 0xDB as instruction, and what instruction stands for 0x43031488?

Thanks in Advance!
Title: Re: Opcodes in Hex
Post by: hutch-- on June 16, 2008, 12:23:32 PM
noob,

You need the Intel manuals for hex opcodes. Just to make things complicated many mnemonics have multiple opcodes depending on the data size and if its a load or store.


mov eax, mem
is a different opcode to
mov mem, eax
Title: Re: Opcodes in Hex
Post by: n00b! on June 16, 2008, 08:39:24 PM
Hmm :-/
Where do I get these?
Title: Re: Opcodes in Hex
Post by: cman on June 16, 2008, 08:48:58 PM
I was reading a section in a assembly book about instruction encoding and wondered how most assembly language programmers know to calculate by hand instruction lengths when using instructions like "loop" ( where the jmp destination must be within -128 to 127 bytes from the current location of the "loop" instruction. Do most programmers use manuals to look up hex codes and calculate jump length this way or is an estimation used. Something I've wondered! Thanks for any input!
Title: Re: Opcodes in Hex
Post by: hutch-- on June 17, 2008, 03:00:41 AM
cman,

Most people make a good guess and if it falls over they change it.

noob, go to the Intel site and download the manuals there. There is a link at the top of the forum.