[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Correct way to detect MiNT kernal?
> Quite a while back I asked Frank how to detect the MiNT kernal
> whilst on IRC. When I say detect I mean positively detect it
> even if some other OS fakes the cookie entry. At the time
> I think Frank suggested making a call to Sconfig(opcode 290)
> and if it fails (-32) then the MiNT kernal is not present.
>
> Is this proper way? I've been over all the docs in the
> lastest kernal archive and didn't find mention of this call.
> Unless I missed it can someone point me in the correct doc?
>
> Reason I ask this:
> I was talking with someone else today on IRC about the same thing
> and they raised the question that if Sconfig() is a rather old
> call wouldn't another OS also have this call? They thought
> maybe Ssystem() would be the call to use instead?
Sconfig() is MagiC specific call and will never be supported on
MiNT. I guess Frank had something like that in mind.
Alternatively you can call Ssystem(S_OSNAME) and if this returns
"MiNT" in d0 (I mean a long number that can be interpreted as string
"MiNT"), then it is MiNT for sure. Valid for kernels 1.15.0 and up,
practically since 1.14.7.
Gtx,
--
Konrad M.Kokoszkiewicz
|mail: draco@atari.org | Atari Falcon030 user |
|http://www.obta.uw.edu.pl/~draco/ | Moderator gregis LATINE |
|http://draco.atari.org | (loquentium) |
** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** U pospolstwa normalne jest, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.