3

The op code portion of many important x86 instructions like MOV and ADD has the last two bits standardized as a direction bit and a data size bit:

enter image description here

Is there any pattern to the part of the op code shown in gray here? For example, for ADD some of the instructions use the code 000000 and others have code 100000.

Tyler Durden
  • 11,156
  • 9
  • 64
  • 126
  • Before the opcode space was exhausted IIRC there was some correlation between the octal value of the opcode and the semantic. [More here](http://reocities.com/SiliconValley/heights/7052/opcode.txt) – Margaret Bloom Jan 18 '17 at 13:36
  • 3
    I recommend you to have a look at the 8086 datasheet which contains an opcode map showing all the opcode patterns. For example, segment push/pops are of the form `000ss11p` where `ss` indicates the segment register (00 = es, 01 = cs, 10 = ss, 11 = ds) and `p` indicates if its a push or a pop (0 = push, 1 = pop). – fuz Jan 18 '17 at 13:53
  • 1
    related: http://stackoverflow.com/questions/39187914/are-x86-opcodes-arbitrary – Peter Cordes Feb 14 '17 at 21:02

0 Answers0