Learn how to use timer interrupts in z80 Assembler.
The timer can be used to trigger a 'heartbeat' as often as required. You can then set your own code routine to run at this time, independent of your main application.
If you like this video, you can buy me a coffee:
https://www.buymeacoffee.com/richardturnnidge
Source files available to download from here:
https://github.com/richardturnnidge/lessons
Latest MOS documentation can be found here:
https://github.com/AgonConsole8/agon-docs/blob/main/MOS-API.md