Jump to content
  • Advertisement
Sign in to follow this  
taco13

machine code

This topic is 4105 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

Advertisement
The processor architecture manuals usually list the bit codes for various instruction combinations, you could refer to them.

However, this fits into the category of things to do that are a monumental waste of time. Why on earth do you want to write in machine code?

[Edited by - jpetrie on September 18, 2007 4:26:18 PM]

Share this post


Link to post
Share on other sites
Well, if you really want to get into this:

Intel Pentium 2 developer manual

It's really as simple as creating the PE header, and then putting in the correct opcodes, then putting in the correct data. Mind you, it's a little more complex than that (such as knowing where to reference the data before you have your actual program written), and as jpetrie stated, a complete waste of time. If you really want to go this low level, just use assembly. That's at least a readable version of this.

Share this post


Link to post
Share on other sites
That one's kind of old.

Current Intel Processor Manuals

The ones you want are Software Developer's Manual Volumes 1 and 2.

Be especially careful reading the section about the Mod/RM and SIB bytes and their special cases.

If you didn't want IA-32/64 architecture, I'm sure there are manuals for the other architectures out there somewhere. I've only done x86 myself.

Share this post


Link to post
Share on other sites
I think it's just more fun than the higher level languages. I also like the
fact that it is harder to read.

Share this post


Link to post
Share on other sites
I don't know if I would call it FUN, but there are some very interesting things you can do if you understand how to write machine code on the fly as a program is already running.

Writing programs from scratch using machine code would be time consuming, but you'd very quickly learn how it works in practice. I find it more effective to look at the emitted disassembly of test programs in a debugger though (that way you can learn how the compiler optimizes the machine code).

Writing your own debugger or making an edit-and-continue system are good examples of actually using this knowledge.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!