Solved

Whats the HEX value for each opcode? (example: "$A1" = "MOV EAX")

Posted on 2004-09-02
11
1,884 Views
Last Modified: 2009-12-16
Hello!!!
Is there any place where I can see the hex value for each or almost all Opcodes?

For example:

$A1  =  MOV EAX

Please, I need it kinda fast....
Thank you!!!
0
Comment
Question by:teste123
  • 2
  • 2
  • 2
  • +2
11 Comments
 
LVL 7

Expert Comment

by:LRHGuy
ID: 11966997
It has much to do with which processor the opcodes are for...

You could go to www.microchip.com for example, and grab the data and programming sheets for a particular device and you'll be a few steps closer.

The instruction set summary usually shows the mneumonic and the actual bit structure.
0
 

Author Comment

by:teste123
ID: 11967024
What I wanted I've found here:
http://acrigs.com/FRAVIA/zipped/opcodhlp.zip

;-)
0
 
LVL 7

Expert Comment

by:aib_42
ID: 11986306
Intel's official processor guides give you nice opcode maps, too.
0
 

Author Comment

by:teste123
ID: 11988672
What I really want now is something that shows me the size of each Opcode... Do you have any?
If you do, I'll increase to 450 and accept it.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 7

Accepted Solution

by:
aib_42 earned 150 total points
ID: 11993342
Check out the 2nd part of the 2nd volume of the Pentium 4 Software Developer's Manual:
http://www.intel.com/design/pentium4/manuals/index_new.htm#sdm_vol2b (P4 Manuals index)
ftp://download.intel.com/design/Pentium4/manuals/25366714.pdf (Direct link)

The Appendices A and B would give you all the information you would need.
0
 
LVL 8

Assisted Solution

by:adg080898
adg080898 earned 150 total points
ID: 12013380
The size of opcodes can vary depending on prefixes. Intel 32-bit processors really have three operand sizes for data, and two operand sizes for addresses.

For example, if this code runs in 16-bit mode:

mov eax,0x01234567

It will have an "opsize" prefix. This tells the cpu to expect a 32-bit operand. The opposite is true in 32-bit mode:

mov ax,0x1234

...is encoded with a prefix.

The address size can also affect the size of the opcode. If this runs in 16 bit mode:

mov ax,[eax]

...it will have an addrsize prefix.  The opposite is true in 32-bit mode:

mov ax,[bp]

...will have an addrsize prefix.

16-bit addressing modes are [bx], [si], [di], [bp], [bx+si], [bx+di], [bp+si], [bp+di], or any of those with a constant offset.

32-bit addressing modes are [reg], [reg+reg], [reg+reg*2], [reg+reg*4], [reg+reg*8], or any of those with a constant offset (example: [eax+ebx+128])

The x86 instruction format is quite complex.
0
 
LVL 3

Expert Comment

by:Dawaffleman
ID: 12035124
just type in the codes you want, assemble the program and go look at it with turbo debugger. on the left side of each instruction it has the exact opcode that the proccessor runs.
like mov ax,1 would look something like  0B80100 or something like that.
0
 
LVL 8

Expert Comment

by:adg080898
ID: 12035490
See http://www.sandpile.org/ia32/index.htm

It has charts for opcodes.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SwapWord function 11 1,134
explanation required 5 365
z390 Mainframe Assembly Code Programming 21 914
Assembly Code 1 779
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now