|Feb 3, 2013, 12:18 PM||#1|
Intel x86 Programmer's Reference Manual? (HW)
I need to pick out 4 x86 instructions and explain the encoding that is used with each one. It's suggested that I find "Intel's Programmer's Reference Manual" to do this with.
I had another similar problem for Sun SPARC where I found this was helpful:
Pages 90 and 91 gave a very concise explanation of various commands like ldsb, ld, ldd, and so on.
I found this for Intel,
I'm not sure if it's for the correct chip, and it seems to be anything but concise... I can't find anything in that manual that explains the encoding used for any instructions. Does anyone have a more helpful manual to look at (something that resembles the Sun SPARC manual I found, but for X86?)
Edit: Volume 1, Chapter 5 gives a list of instructions and brief explanations of what the instructions do, but then fails to explain the syntax that the person writing assembly code should use or the binary encoding that'll be used.
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
Last edited by ArtOfWarfare; Feb 3, 2013 at 12:24 PM.
|Feb 3, 2013, 12:51 PM||#2|
In that Intel doc, see Vol. 2, Ch. 2, Heading 2.1. The instruction-set encoding is insanely complex, with various prefixes and such, because it was gradually extended over a long period of time, from the original 8086. If you want something easier to decode, find a manual for the 8086.
I don't see a typical encoding table in the doc, probably because the instruction-set is too complex for that to be effective. Instead, I think you'll have to reverse-engineer a few instructions. The above Vol. 2, Sec 2.1 may be of use for understanding where things like addressing-mode field, operation field, operand size, etc. are placed. And some things are modal (an opcode may have different results in different modes).
Start by picking some of the basic operations, like ADC, ADD, AND. Look at the opcode byte. Figure out which bits change for each different operation, each addressing mode, etc. Once you have a basic pattern, look at other basic opcodes, like OR, SBB, SUB, XOR.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|New Mac Programmer||CEBison||Mac Programming||4||Jan 31, 2013 10:31 PM|
|How much should a programmer charge?||rw2nascar||App Store Business, Legal and Marketıng||10||Jan 28, 2013 11:28 AM|
|October 1st reference in media event reference to next media event for iPad?||knemonic||iPad||7||Sep 13, 2012 02:42 PM|
|Intel on x86 vs ARM - Power consumption vs Performance||KnightWRX||Apple, Industry and Internet Discussion||9||Jun 15, 2012 01:26 PM|
All times are GMT -5. The time now is 06:32 AM.