system_interface
This is an old revision of the document!
System Interface
Emulated hardware is managed by writing to memory-mapped ports beginning at address $ff80.
const SIbaseAddress=0xff80, SIrefreshOff=0, SIrefreshOn=1, SIgraphicsMode=2, SIkeyInterface=3;
SIrefreshOff Write <any> to force OFF register refresh and display animation SIrefreshOn Write <any> to re-enable register refresh and display animation SIgraphicsMode Write <number of colours> to select graphics mode (2, 4, 16 allowed values) SIkeyInterface Write 0 then read an ASCII code (if<128), write 255 to clear the keyboard buffer
Refresh
This is a simple way of switching on or off the “Refresh” checkbox from within a running program. For example, it might be a good idea not to have animation during an intensive routine such as clearing the screen. Simply write any value to SIbaseAddress+SIrefreshOff to turn Refresh off, or to SIbaseAddress+SIrefreshOn to turn ot on again.
init: clr SIbaseAddress+SIrefreshOff jsr ClrScrr clr SIbaseAddress+SIrefreshOn
system_interface.1751554371.txt.gz · Last modified: 2025/07/03 14:52 by reggie