Needs repair -- absolute addressing used on numerous links.

Work on this project will continue, and material will be added as developed.  If you want to join the project team, click here.
 The C MOOS The C++ MOOS How the Team Meets Joining the Team
Site Map View theGuest Book Sign theGuest Book Send Your Email
C/C++ for a Tiny, Embedded Multitasker
-Eric D. Tarkington

Introduction

Do you find that studying text books is not enough, and you need some kind of project to teach you a new technology?  I do.  And, I'm studying C++.

I've written C++, and run project teams using C++, but the truth is, we had a large "installed base" of C, and there just wasn't project funding to upgrade.  In effect, we avoided C++ language where possible, and just wrote in C, which made me melancholy.
 

 
Status Task
.5 Announce it.
Do it.
Submit it to peer review.
Do it better.
Give to public domain.
           [the plan]

 best viewed maximized, 800x600
 

So, here is one of two projects that I'm doing to learn more about the object-oriented features in C++. It starts with an exposition of an old C program.  It middles and ends with an implementation of the same tool in C++.  The idea is to announce it, do it, submit it to peer review, do it better, and then make it available in the public domain.

It was more than 10 years ago that I ported a tiny, embedded multitasker from its Motorola 68000 version to a version for the IBM PC.  If you think about it, there is some question why we would want to do this, and my comments are:

  1. It seemed like a good idea at the time.
  2. Don't think about it.
Oh, alright, the idea was to do a lot of testing on the PC, since we only had one 68000 emulator station (and one lab, for that matter).  It was intended as a one-shot deal, so the embedded documentation was allowed to be below production code standards (excuses, excuses).

Since you probably have an irresistable urge to look at some code, here is what we will be using as a starting point:

Download the source files?  WARNING: At this date (April 11, 1999) there is no particular reason to suppose that this code is fully functional.  It should be recompiled and tested again.

C Files:
 

moos86.c This file contains source for the Message Oriented Operating System (MOOS), which allows one process to communicate with another by passing messages between them.
proc1.c Example process.
proc2.c Example process.
sysgen.c This part of the program performs a series of operations needed to start the MOOS.
syslib.c This part of the program supplies functions equivalent to selected parts of the C standard library.
tables.c Initializes the Process ID (PID) and "Soft Interrupt" ID (SID) tables.
timhan.c This function is called by the timer service entry point routine.

H Files:
 

chipsel.h Chip Select Equates.
failure.h This file contains failure numbers for the diagnostic code byte.
ostools.h Function prototypes for MOOS functions.
osvars.h Extern declarations for MOOS variables.
struct.h MOOS structure definitions.
sys.h MOOS constant definitions.
syslib.h Function prototypes for syslib.c functions.