EasyManua.ls Logo

ST ST7 - Page 210

ST ST7
317 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
210/317
7 - Debugger and PROM Programmer Tutorial for ST72251
The next figure shows, in detail, the modifications to the stack when moving from task one to
task two.
07-break
Task1 is running ;Permut=0
17F (sp)
Active
area
of the
stack
17F
"Call Yield" instruction is executed
SP
17F PCL Task1
PCH Task1
PC is pushed onto the
Task1 stack
Yield routine
is executed
Little kernel: Breakin
g
up the Yield routine
PCL Task2
PCH Task2
16F
1°) SP is saved into ImStack1
2°) SP is loaded with ImStack2
3°) Permut is incremented (modulo 4)
SP
"Ret" instruction
of Yield routine is executed
16F (sp)
Active
araa
of the
stack
16F
Task2 is running ; Permut = 1
PC is popped from the
Task2 stack

Table of Contents

Related product manuals