Multitasking Systems: Difference between revisions

no edit summary
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 28:
<pre>
PUSH ;; put the accumulator's content on stack
LOAD [current_pid] ;; putload itthe current PID in the accumulator
STORE_SP [context_table+ACC] ;; save the stack of the suspended task
 
;; get somehow the PID for the next pidtask into ACC, without using the stack
STORE [current_pid] ;; we'll need it here for the next run
 
LOAD_SP [context_table+ACC] ;; load the stack of the chosen task
STORE [current_pid] ;; we'll needstore it's here for the next runPID
POP ;; get back the accumulator's content
IRET ;; end of interrupt
Anonymous user