<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 02 Apr 2016 10:33:47 +0100 (WET-DST)
From   : bbcmicro@... (Peter Coghlan)
Subject: Emulation

>
> I'm not sure what &FE4E is used for.
> I just remember an old trick that ?&FE4E = &7F would lock the keyboard and
> cause a memory reset on pressing break. 
> From your description at &DA82, you describe some parts of &FE4E, but not 
> the clear memory part - maybe that is one of the bits you haven't described?
>

&FE4E is the interrupt enable register of the system VIA.

After a reset, code in the OS checks &FE4E to see if it has already been set up.
If it appears not to have been already set up, the OS decides that this is a
power on reset rather than a reset due to pressing break and it clears (most)
memory so that it doesn't end up containing random garbage.  If &FE4E has
already been set up (the reset pin on the system VIA is only activated at power
on, not when break is pressed), the OS assumes that break has just been pressed
rather than a power on has happened and memory should not be cleared.

?&FE4E = &7F and pressing break fools the OS reset code into thinking the
system VIA has been reset so the OS performs extra initialisation tasks which
would be appropriate immediately after power on.

Regards,
Peter Coghlan.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>