The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Wally88 on August 04, 2011, 09:45:26 AM

Title: MASM hex equivalents of the opcodes?
Post by: Wally88 on August 04, 2011, 09:45:26 AM
How can I find hex equivalents of opcodes like PUSH, MOV, etc?
Title: Re: MASM hex equivalents of the opcodes?
Post by: qWord on August 04, 2011, 09:51:54 AM
hi,
there are different possibilities:
- take Intel's and AMD's documentation
- create an listing while assembling (/Fl)
- use a debugger or disassembler of you choice
Title: Re: MASM hex equivalents of the opcodes?
Post by: dedndave on August 04, 2011, 10:08:03 AM
there are numerous lists of opcodes
Hutch will be the second person to tell you to refer to the intel and/or amd manuals   :bg

for a quick reference....
\masm32\help\opcodes.chm
Title: Re: MASM hex equivalents of the opcodes?
Post by: Wally88 on August 04, 2011, 12:09:19 PM
Quote from: qWord on August 04, 2011, 09:51:54 AM
- create an listing while assembling (/Fl)

Can you explain this a bit more?  :o
Title: Re: MASM hex equivalents of the opcodes?
Post by: dedndave on August 04, 2011, 12:48:48 PM
/FL is a command line switch for MASM (ML.EXE)
ml /c /Fl /coff MyProg.asm

the listing file will be extremely large, however
it lists all the included files (like windows.inc)
so, in the program, i turn off the listing, then turn it bak on after the includes
also, the default listing includes a cross-reference at the end - also large
you can turn that off, too

start your program like this....
        .XCREF
        .NOLIST
        INCLUDE    \masm32\include\masm32rt.inc
        .LIST


now that you have reduced the size, you can also add another switch for a more detailed listing...
ml /c /Fl /Sa /coff MyProg.asm
Title: Re: MASM hex equivalents of the opcodes?
Post by: hutch-- on August 05, 2011, 01:41:35 PM
Wally,

Tell us why you want opcode recognition, unless you are writing a compiler or a disassembler the capacity is almost no use to you unless you are manually modifying compiled binary code.

Important, don't try and feed us bullsh*t or the topic will be closed like a rocket.
Title: Re: MASM hex equivalents of the opcodes?
Post by: ToutEnMasm on August 05, 2011, 02:56:00 PM

A good start will be to read the source code of various assembler who are on the web.
I have see several of them,jwasm,....
Title: Re: MASM hex equivalents of the opcodes?
Post by: dedndave on August 05, 2011, 03:24:23 PM
i dunno - i think we all wanted to see bits and bytes when we started out   :P
Title: Re: MASM hex equivalents of the opcodes?
Post by: RuiLoureiro on August 05, 2011, 04:15:31 PM
Hutch--:
        >> Tell us why you want opcode recognition

           Who wants opcode recognition ? Is this a case ? Hummmm!
           If we want that we can follow qWord:- take Intel's and AMD's documentation


        >> ... closed like a rocket

            Please, dont close this forum, Hutch  :wink

RuiLoureiro
Title: Re: MASM hex equivalents of the opcodes?
Post by: dedndave on August 05, 2011, 04:29:17 PM
first....
QuoteHow can I find hex equivalents of opcodes like PUSH, MOV, etc?

that is a pretty harmless question
we all want to see code in raw form at one time or another
debugging our own code is a good example
hell, i learned a lot by using DEBUG under DOS when i started out   :P

second....
QuoteWally88

correct me if i'm wrong, but that is not your typical "hacker-wanna-be" moniker   :lol
if he was "DarkWally", i'd be more suspicious   :8)