Practical Statecharts in C/C++: Quantum Programming for Embedded Systems

There is no trick in building large systems quickly; the quicker you build them, the larger they get!
David Parnas
In this chapter, I present concrete implementations of the QF design described in the previous chapter. The primary goal is to fill in the missing platform-dependent pieces of the framework so that you have the complete code ready to use in your applications. This chapter approaches the dilemma which platform to choose by describing not one but three implementations of the QF on different platforms. I have chosen diverse platforms to demonstrate how to adapt the QF to a wide range of applications because my secondary goal in this chapter is to show you how to port the QF to the environment of your choice.
I cover the following three concrete implementations of the QF in this chapter.
DOS I demonstrate the use of the QF in a foreground/background environment without any underlying multitasking kernel. This implementation could be applicable to simpler embedded systems.
Windows (32-bit) I demonstrate the use of the QF in the multithreading environment of a desktop computer, which could be interesting for cross-development, testing, and debugging embedded applications.
RTKernel-32 [1] This real-time kernel for Intel x86 processors runs in 32-bit protected mode and demonstrates the use of the QF in a true, real-time, multithreading environment with full RTOS support.
As you can see, the implementations span quite a wide range, and most of the systems should fall into...