News for hackers. Stuff that matters.
Re:x86 Disassembly by userbinator on Saturday April 04, 2015 @08:53PM (#9322723)
It's also much easier to decode x86 instructions when you look at them in octal instead of the hexadecimal that most tables use, since both the main opcode map and ModRM/SIB are organised in a 2-3-3 layout:

http://reocities.com/SiliconValley/heights/7052/opcode.txt

The 8080/8085/Z80 instruction sets also look much better in octal:

http://www.z80.info/decoding.htm

Re:x86 Disassembly by 101914 on Saturday April 04, 2015 @10:18PM (#9322909)
This comment validates all the time I have "wasted" reading HN over the years.

It does not suprise me that something so simple would be so well overlooked (or, at least, "forgotten"). I wonder if I ever would have figured this out from my own readings and experiments. Doubtful.

Great tip!

Re:x86 Disassembly by userbinator on Sunday April 05, 2015 @01:54AM (#9323255)
I figured it out before/without exposure to that document, but I attribute it to the fact that I started teaching myself at a time when octal was more common amongst mini and micro-computers; most programmers these days barely know any number base other than decimal, and of those who do, binary and hexadecimal are likely far more familiar to them than octal. The official Intel/AMD manuals make no reference to octal either, using only binary and hex.

As an aside, ARM opcodes are (mostly) hex-structured with 4-bit fields, while MIPS, POWER, and SPARC are not amenable to any standard number base except binary (5- and 6-bit fields.)

Re:x86 Disassembly by tptacek on Saturday April 04, 2015 @09:47PM (#9322836)
I had no idea! This is very cool.
Re:x86 Disassembly by tptacek on Saturday April 04, 2015 @10:58PM (#9322988)
This is seriously exploding my brain. Thank you for posting it.
Re:x86 Disassembly by peterfirefly on Sunday April 05, 2015 @05:26AM (#9323578)
And that's really interesting (and puzzling).

You are clearly intelligent, well educated, etc. and blah blah blah.

Yet, you somehow missed that.

If you can explain why, it would probably be something we could all learn from. At the very least, it would be interesting.

Is it because you learned x86 before you learned octal and never really reexamined the encoding?

(The PDP-11 machine code also looks best in octal, btw.)