Jump to content
  • Advertisement
Sign in to follow this  

x86 Instruction Notes

This topic is 5066 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been looking at The Art of Assembler Language and found the topic: "Encoding x86 instructions". I found a bit of this information incorrect but cannot find a contact for the author of it so I started writing about it myself. If you find mistakes in it, please contact me: johndisanti[NOSPAMPLEASE]@santiproductions.com Here is what I have written so far: http://www.santiproductions.com/site/x86instruction.txt I have used NASM to assemble simple instructions, I then looked at the final file and wrote down the instruction's hex value. Now I have started converting the hex values to binary and finding patterns in them. Thanks, John DiSanti P.S. I know this may seem pointless but I need something to do this Summer so I decided on this.

Share this post


Link to post
Share on other sites
Advertisement
Hmm, interesting. I haven't read that book (?), so I'm not sure what part they got wrong.

Are you making a list of all the opcodes? For a modern CPU, that list looks to be about maybe quarter of all the available opcodes. Plus, there are FPU instructions and things like MMX, SSE, etc.

As for 32-bit mode, indeed most of the opcodes just need a 0xDD in front of them (when running from 16-bit mode). That's a trick I used to use with Borland Pascal's compiler to get it to generate 32-bit code, since its inline assembler wouldn't recognize the new opcodes. However, there are still 32-bit extensions to the original 16-bit set, like opcodes to load values into the global descriptor table and such. I'm a bit fuzzy on that, as I never got too much into doing protected mode assembly.

Share this post


Link to post
Share on other sites
The Art of Assembler Language can be found here:
http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html

I don't think I would be able to find every opcode! ;) I sure have learned a lot about how a computer works from this though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!