Skip to content

Commit

Permalink
schduler_switch: Save EX before ADD
Browse files Browse the repository at this point in the history
Fixes #33
  • Loading branch information
azertyfun committed Oct 16, 2016
1 parent d4db1d7 commit 987aebb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/kernel/scheduler/scheduler_switch.dasm
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -15,7 +17,6 @@
set PUSH, Z
set PUSH, I
set PUSH, J
set PUSH, EX
set [A], SP

:scheduler_abort
Expand All @@ -30,7 +31,6 @@
set A, [A]

set SP, [A]
set EX, POP
set J, POP
set I, POP
set Z, POP
Expand All @@ -39,5 +39,7 @@
set C, POP
set B, POP

set EX, POP

:scheduler_switch_end
rfi 0

0 comments on commit 987aebb

Please sign in to comment.