[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Wrong basepage pointer?



Hi,

I found an interesting thing which I'm not sure if it's a bug or feature. If I load an executable with:

BASEPAGE* bp = (BASEPAGE*)Pexec( PE_LOAD, filename, cmdline, NULL );

then bp->p_tbase points to the place which is +28 bytes from the beginning of the file. This works well for TOS executables (it points to the first instruction from the code segment). But for MiNT executables, this points in the middle of "nowhere" (since MiNT executables have far more longer file header). To me it seems like a clear bug but maybe I'm doing something wrong.

(Just to be clear: I expect bp->p_tbase to point to the first instruction in my file (plugin in this case), i.e. I need to jump on it via a function call).

--
MiKRO / Mystic Bytes
http://mikro.atari.org