Building a Simple Scheduler in Assembler

Thread Starter

qrb14143

Joined Mar 6, 2017
112
Hi all,
I am looking for an example of a simple scheduler that has been implemented in assembler, preferably for an MSP430. I have a few examples in C code but I would like to implement mine in assembler. I simply want to service each task in a round robin fashion, switching context every time a timer interrupt fires.

Any links to example projects or documentation would be very useful. Also any links to assembler projects beyond those offered by TI would really help my studies. I find that the TI examples are good for learning the peripherals but I am struggling a bit to build more complex programs without any examples to peruse.

Thanks
 

Papabravo

Joined Feb 24, 2006
12,702
Hi all,
I am looking for an example of a simple scheduler that has been implemented in assembler, preferably for an MSP430. I have a few examples in C code but I would like to implement mine in assembler. I simply want to service each task in a round robin fashion, switching context every time a timer interrupt fires.

Any links to example projects or documentation would be very useful. Also any links to assembler projects beyond those offered by TI would really help my studies. I find that the TI examples are good for learning the peripherals but I am struggling a bit to build more complex programs without any examples to peruse.

Thanks
Jack Ganssle wrote a book on the subject with code for a Z80. I think I can round up the Amazon link.
https://www.amazon.com/Art-Programming-Embedded-Systems/dp/0122748808/ref=sr_1_6?ie=UTF8&qid=1511569537&sr=8-6&keywords=Ganssle,+Jack

You might also try
Loeliger, R.G., Threaded Interpretive Languages
https://www.amazon.com/Threaded-Interpretive-Languages-Design-Implementation/dp/007038360X/ref=sr_1_1?ie=UTF8&qid=1511569705&sr=8-1&keywords=Threaded+Interpretive+Languages
 
Hi all,
I am looking for an example of a simple scheduler that has been implemented in assembler, preferably for an MSP430. I have a few examples in C code but I would like to implement mine in assembler. I simply want to service each task in a round robin fashion, switching context every time a timer interrupt fires.

Any links to example projects or documentation would be very useful. Also any links to assembler projects beyond those offered by TI would really help my studies. I find that the TI examples are good for learning the peripherals but I am struggling a bit to build more complex programs without any examples to peruse.

Thanks
Your program description sounds familiar. Here is one example- see page 279

It is a tad old :)
 

Thread Starter

qrb14143

Joined Mar 6, 2017
112
Thanks for the links everyone. I'll have a look through those. I am working from the books:
MSP430 Microcontroller Basics by John H Davies and Embedded Microprocessor Systems by Stuart R Ball. Both of these texts have been quite useful in terms of understanding concepts but I find it difficult to find examples of actual assembler implementations. I am having difficulty even finding examples of how to set up and use variables in assembler.
 
Top