diff --git a/src/kernel/scheduler/scheduler_switch.dasm b/src/kernel/scheduler/scheduler_switch.dasm index 5e805cb..e9bc7fe 100644 --- a/src/kernel/scheduler/scheduler_switch.dasm +++ b/src/kernel/scheduler/scheduler_switch.dasm @@ -4,6 +4,8 @@ ife [n_processes], 1 set PC, scheduler_switch_end + set PUSH, EX + set A, [processes] add A, [running_process] set A, [A] @@ -15,7 +17,6 @@ set PUSH, Z set PUSH, I set PUSH, J - set PUSH, EX set [A], SP :scheduler_abort @@ -30,7 +31,6 @@ set A, [A] set SP, [A] - set EX, POP set J, POP set I, POP set Z, POP @@ -39,5 +39,7 @@ set C, POP set B, POP + set EX, POP + :scheduler_switch_end rfi 0