Hacker News new | past | comments | ask | show | jobs | submit login
Oddities in x86 Assembly (code.google.com)
96 points by tristanj on Sept 4, 2013 | hide | past | favorite | 7 comments



I was making a small x86 assembler once and I was frustrated that the encoding seemed almost random and very hard to generate. Until I fell over a comment in some google group stating that the key to understanding it is that all opcodes are coded in octal. It's inherited all the way back from the 8080, but for some reason this information was nowhere to be found, including the official references from Intel that I had.


Here's an analysis of x86 encoding in octal: http://reocities.com/SiliconValley/heights/7052/opcode.txt

The author claims to know most 8086 instructions by memory alone!


Well, that was the exact post I used back in the day :-) It helped me a lot, it's a really good reference.


This is somewhat off topic, but this page has incredible visuals. One of the hardest parts for me of writing technical information online is including the accompanying visuals needed to make it digestible. I think it's hard for me to do that because I'm forced to either context switch between writing and doing screen captures/cropping, or go back after the fact and create visuals which is very time consuming.


I recognize OllyDBG being used, but what is the debugger here? https://corkami.googlecode.com/svn/wiki/pics/x86_15bop_64b.g...


WinDbg


Minor nitpick: I think the equivalent code in https://code.google.com/p/corkami/wiki/x86oddities#future_op... has a copy-paste error. In

    89d8 mov eax, ebx
    f7d0 not eax
    21c8 and eax, ebx
there should be a ecx somewhere.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: