[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Wrong basepage pointer?
Hi,
On keskiviikko 02 tammikuu 2013, Miro Kropáček wrote:
> 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.
Does:
Pexec(PE_GO,...)
On that PE_LOAD binary still work correctly?
- Eero
> (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).