Re: [hatari-devel] TOS use of PRG_ssize vs Hatari's

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Tue, 7 Nov 2023 00:28:27 +0200
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> Thomas, are you looking into this?

Sorry, no, I only lightly followed the discussion and thought that someone
else might come up with a patch? Would you like to have a look?

 Thomas


> 
> On 23.10.2023 11.55, Troed Sångberg wrote:
> > Hi,
> > 
> > Thanks! Nothing beats looking at actual code :) Then I think it's clear what changes need to be made to Hatari (and EmuTOS) Pexec to mimic the TOS behavior.
> > 
> > regards,
> > Troed
> > 
> > ------- Original Message -------
> > On Sunday, October 22nd, 2023 at 8:59 PM, Thorsten Otto <admin@xxxxxxxxxxxx> wrote:
> >   
> >> On Sonntag, 22. Oktober 2023 18:54:01 CEST Troed Sångberg wrote:
> >>  
> >>> I haven't verified if lseek throws an error or whether it just seeks to EOF  
> >>
> >> It will immediately return with an error code if you try to seek beyond the file size: https://github.com/th-otto/tos1x/blob/43ad10e2fee7fe5c974b46a715934e4de3210ae1/bdos/fsopnclo.c#L850-L854
> >>
> >> EmuTOS behaves the same:
> >>
> >> https://github.com/emutos/emutos/blob/967649a5d81275f600e162e91739a0b423671343/bdos/fsio.c#L360-L361
> >>
> >> (don't get confused by the different error code names, they have the same value)
> >>
> >> Since the program loader has just read the text & data segments, the fileptr will therefor just don't move, and the code will behave as if the symbol table was empty. However emutos behaves differently here, and checks the return code of the seek, and will return it to the application.  
> 
> 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/