improved "run" code.

This commit is contained in:
Martin Preuss
2025-07-07 21:44:40 +02:00
parent 4f497fc41a
commit 245d44c05d
7 changed files with 126 additions and 72 deletions

View File

@@ -55,10 +55,26 @@ main:
main_loop:
bigcall systemSleep ; system-dependant
bigcall runModules
bigcall runApps
; run loop as long as some run function returns with CFLAG set
main_runLoop:
clr r16
push r16
bigcall runModules
pop r16
sbci r16, 0
push r16
bigcall runApps
pop r16
sbci r16, 0
bigcall onEveryLoop ; call into main app
push r16
bigcall onEveryLoop ; call into main app
pop r16
tst r16
brne main_runLoop
#ifdef MODULES_NETWORK
#ifndef MAIN_WITHOUT_MSG_HANDLING