MTASK2015 - A Multi-Task kernel (MT) for the Sharp PC-1500

© Christophe Gottheimer, 1992-1993-2015
Download zipped WAV, documentation, assembly sources and examples: mtask2015.zip.
Download full documentation in PDF: mtask2015.pdf.

Description:

This is my own implementation of a small multi-task kernel (MT). I started to develop it in 1992 when I was working on vxWorks targets. I feel very funny to try to go out of the way in this small computer. This was of course possible because the BASIC ROM was able to divert the interruptions. I read an article in a french computer review speaking about a small example of this diversion. I adapted it and after I developed several MT-kernels, with each time more functionalities.

One of the last I developed, supports an access to the MT-kernel through the BASIC instruction TASK. This was useful to "speak" with a task without calling an assembly routine interface.

I stopped the development to start another, more complex: A small multi- process operating system named MMPS

Several years ago, I recovered the tapes where the MT-kernel was saved, but I was not able to reload it or to extract a binary. I still own my written notes. Some weeks ago, finally, I succeed to extract the binary images with some parts corrupted, but my notes helped me to rebuild a working kernel.

I also use this work to change or correct some kernel requests and add some new ones like the timer.

The MT-kernel alone needs 2Kb, so it is very difficult to use it in PC-1500 without a memory module. A module of at least 4Kb (CE-151) or a PC-1500A is highly recommended. For the images with the TASK instruction and the keyboard driver, 2.8Kb is required. Special images for PC-1500A are provided, because of the different memory scheme; with these images, the task structures are stored into the dedicated ML area (&7F00..&7F82). Note that standard images also work into the PC-1500A.

The keyboard driver needs to run with a ROM A02 or higher. If the function PEEK &E2B9 answers 56, the machine has a good ROM. Else, the driver and the TASK instruction will be not usable. CALLREGS works on all ROMs. The PC-1500A always have to good ROM.

With this software, you will discover, as example, a small scheduler-reminder task working in "background" to "remind" your tasks, rendez-vous, or alarms, even if a BASIC program is running...

With this software, a new BASIC instruction TASK is available to perform the request to the Mult-Task kernel:
TASK CLEAR
TASK ARUN
TASK ?var
TASK RUN entry,stack[,prio[,tid]];var
TASK END tid
TASK STOP tid
TASK CONT tid
TASK NEW prio[,tid]
TASK PAUSE delay
TASK LOCK lockid
TASK LOCK WAIT lockid
TASK UNLOCK lockid
TASK INPUT var$
TASK PRINT tid,var$
TASK PRINT WAIT tid,var$
TASK PRINT INPUT tid,var$
TASK GOTO [handler]
TASK ON eventid
TASK OFF eventid
TASK CALL eventid,tid
TASK TIME [delay]
TASK WAIT
TASK POKE CLS lockid,cntid
TASK POKE lockid,cntid
TASK PEEK lockid,cntid
TASK DIM queue,size
TASK READ WAIT var
TASK READ var
TASK DATA tid,var

If an error occurs will calling the MT-kernel with TASK, the normal error handling is assumed. The BASIC will show "ERROR eee" where eee is the decimal error code.


See more informations into the documentation.


Note: This version is still in pre-alpha release. It is not fully mature and bugs may be present.
Disclaimer: You use this code at your own risk. I am not responsible for any damage or any data lost or corrupted by using this software or by using the binary images created with this software while running them on a Sharp PC-1500/A or TRS-80 PC-2. Be sure to save your important data or programs before loading and running the binary images. C.G.


Return to the main page