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

Re: [MiNT] Shutdown() discussion



V Út, 09. 12. 2003 v 23:11, Lonny Pursell píše:
> >> If the kernel starts taking on code specifically
> >> for emu's and it just sucks up more ram, well I won't be happy.

> > I am glad you enjoy CT60 specific code on your TT.
> 
> I fail to see the connection between ct60 and the comment about aranym.

The kernel already started taking on code specifical for machines other
than your TT. The code just sucks up more ram and does not work for you.

Do you get my comment now?

Anyway.

> clearification of what was meant by your suggestion.  I am not the first
> person with such a question actually.  I was however brave enough to ask.

I will gladly answer this. FreeMiNT can (and should) be extended so that
the halt or shutdown calls really shut the machine down - just like it's
possible with ATX PSU. That has been implemented for CT60 already
(IIRC). ARAnyM (as a virtual machine) can also be shut down and I think
it makes sense if FreeMiNT's halt did shut it down, just like it shuts
down the CT60 now (and possibly Milan, I don't know).

As for the actual implementation, the code would look as follows:
  
if (hasNF) {
    long shutdown_id = NFID("NF_SHUTDOWN");
    if (shutdown_id) {
        NFCall(shutdown_id);
    }
}

The NFID and NFCall are compiled to a single 'jsr' (they are macros).
It would be almost 50 bytes of RAM wasted on this feature.
Of course compile time option would solve that.

Petr