Multitasking Systems: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
No edit summary |
No edit summary |
||
Line 28: | Line 28: | ||
<pre> |
<pre> |
||
PUSH ;; put the accumulator's content on stack |
PUSH ;; put the accumulator's content on stack |
||
LOAD [current_pid] ;; |
LOAD [current_pid] ;; load the current PID in the accumulator |
||
STORE_SP [context_table+ACC] |
STORE_SP [context_table+ACC] ;; save the stack of the suspended task |
||
;; get somehow the next |
;; get somehow the PID for the next task into ACC, without using the stack |
||
⚫ | |||
LOAD_SP [context_table+ACC] |
LOAD_SP [context_table+ACC] ;; load the stack of the chosen task |
||
⚫ | |||
POP ;; get back the accumulator's content |
POP ;; get back the accumulator's content |
||
IRET ;; end of interrupt |
IRET ;; end of interrupt |