Click to See Complete Forum and Search --> : Instruction encoding


akc679
January 11th, 2011, 10:23 AM
Is it necessary that the instruction encoding must take 6 bytes to encode & if no can it take more/less than that?

Eri523
January 12th, 2011, 04:39 PM
Why worry about this at all? :cool: It's (most likely) not your job to design the instruction encoding and you can't change it anyway.

There usually is some reason behind the encoding (of course the opcodes are not picked by throwing darts at a hex table... :D) although it isn't directly visible in an assembly/disassembly listing. The Intel Pentium 4 manual (volume 3, document #24143004) I usually consult for questions like this explains the instruction encoding in Appendix A, for instance. (To give you a figure, this appendix comprises 17 pages.)

Ah, and... Welcome to CodeGuru! :)