machine code
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]
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]
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.
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.
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.
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.
Thanks. I just always searched Intels site for the papers. I was wondering where the newer ones were stored.
I think it's just more fun than the higher level languages. I also like the
fact that it is harder to read.
fact that it is harder to read.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement