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

Re: MacMiNT/VTOS: system variables



Julian Reschke (reschke@math.uni-muenster.de) wrote:

> Understood. However, there are some more: hz_200 to calculate things for
> sleep () and so on. That's why it would be nice to have an absolutely easy
> way to support the fact that those things are in a different place. I'm
> not asking everybody to change their code to use that feature, but *if*
> someone is willing to do the change, it shouldn't depend for *which*
> MiNT the change is being done.

A nice MiNT system call to return the base address would be one possible
way to do it. However, there would be problems for the 'Setexc()' system
call with such an arrangement, as there is currently with VTOS. See
_Setexc() in the VTOS source file bios.c for a hack^H^H^H^Hsolution that
gets around the problem.

> By the way: why does 'df' look into _drvbits? That's a bug. It should
> use Dsetdrv (Dgetdrv ()). I'll try to remove all sysvar accesses from
> my tools (ftp.uni-muenster.de/pub/atari/Gemini). How is VTOS handling
> p_cookies?

'df' peeks directly at _drvbits to find out what drives to check. It
should use the Bios call Drvmap().

VTOS sets p_cookies (at address 0x45A0) to point to a built-in cookie
jar with 3 cookies plus some spare slots. If I recall (without looking
at the source) they are _CPU, _FPU and _MCH.

Cheers, Steve