Hi. I'm trying to figure out the encoding for a 32-bit CALL instruction. From the output of FASM I've found that the first byte is consistently E8. The 3rd, 4th and 5th bytes seem to correspond with the most significant bits of the address. My problem is the 2nd byte, which seems inconsistent.
I need this to write a C function which will generate CALL instructions, something like this:
char* gencallop(void* p);
Any help would be appreciated.