information will be added as the class progresses.
C and C++
Where do I
find the x86 instruction set?
- [magic numbers - 0xABCDEEFF]
- [number of constant pool entries - int]
- [constant pool * size for each entry] - This is not in
the actual .out file. Just a logical order of what needs to happen next.
- [Each constant pool entry - CP_NONE (0) | CP_INT (1) |
CP_METHOD(2)] - | means OR
- [CP_NONE - 1 byte]
- [CP_INT - int]
- [CP_METHOD - int method name
length, then method name length * byte]
- [end constant pool - 0xAAAAAAAA] - int
- [number of methods] - int
- [the method begin to end method * number of methods] //
Not a real part of the .class file either. Just telling you how many times
you need to do this.
- [method begin marker - 0xBBBBBBBB] - int
- [method name length] - int
- [method name string] - char * name length
- [end method marker 0xFFFFFFFF] - int
- [method arg count - int]
- [method local count - int]
- [bytecode length] - int
- [bytecodes] - bytes * bytecode length
- [method end marker - 0xCCCCCCCC] - int
- [... same * number of methods ]
- [0xDEADBEEF] - end file - int