Software and Software Tools

On this page I will place more detailed descriptions of the software. This will cover the Monitor programme which is essentially a BIOS that supports the higher level programmes such as the Basic Disc Operating System (BDOS), Shell etc. It contains the basic routines needed to interface to the console and Floppy Disc Controller (FDC). Descriptions of the Assembler, and C Compiler are also included.

FDC Monitor

The FDC Monitor source code and HEX files are available for download on the downloads page. Once the FDC Monitor is assembled using the A99.EXE assembler the hex file MONITOR.H99 can be loaded into the SBC's memory. This is done by using the HEX loader in the TIMON PROM by typing the U command at the prompt. This command puts the TIMON into a wait loop looking for the ':' character that signals the begining of the INTEL format hexfile. It is now that you use your terminal programme to select the HEX file you want to download and begin the transfer. Once loaded into memory and checksum proven the TIMON will prompt with the normal '>' character. To test the FDC Monitor you can load the READSEC routine again using the HEX loader command. The READSEC programme is a small test programme that will read a sector from the floppy disc. An example of a session is shown in the screen capture on the left.

Terminal Session

The READSEC programme is loaded at 0100H but before running the programme you first need to load the TRACK and SECTOR which you want to read into memory location 0102H using the TIMON input command, i.e '>0102[space bar]. Once you are ready just type 0100G and the sector will be read into memory location 0500H. To view the buffer just type 0500O at the TIMON prompt. I found this programme very useful in debugger many of the larger programmes and the FDC Monitor.

A zip file containing the FDC Monitor and the READSEC programme can be found on the downloads page.

TMS9900 Cross Assembler

The A99 Cross Assembler is based on a port of an old M6800 cross assembler written by William Colley III in the 1980's and available through the C User's Group archive. The port produces absolute TMS9900 code and has been thorougly tested over the years and has been built using the MinGW GCC C compiler. The assembler is invoked on the PC using the command prompt and uses the following syntax: A99 FileName SourceLocation HexFileLocation ListFileLocation The location is the drive and the directory is where the assembler is invokded either through the command line or batch file. For example the following would assemble the Monitor from the source (MONITOR.A99) location C, and produce an Intel Hex File (MONITOR.H99)at location C and a lising file (MONITOR.L99) at location C also: A99 MONITOR SCHCLC Once HEX file produced by the cross assembler can be downloaded to the SBC using the TIMON upload command 'U'. The assembler and its source can be downloaded from the downloads page.

TMS9900 Relocatable Cross Assembler

The R99 relocatable assembler is based on the TMS9900 Cross Assembler above, with the code just emitting Microsoft Link-80 relocatabe format rather than Intel Hex 16 format. A reference for the Link-80 format can also be found on the downloads page. The Relocatable Assembler is built using the MinGW GCC C compiler and runs under Windows XP, 7 and 8. The file produced by the Relocatable Cross Assembler is identified as relocatable by using the .R99 extension. The files produced by the assembler are loaded and linked using the Linker Link99. A tool (drel.exe) to inspect the R99 file is included in the zip file. This tool will read the .R99 file and output the link file as text to the console.

Small Linker Loader for the TMS 9900

This Linker Loader (Link99) is based on the linker loader that was initially developed as part of the Small-C Assembler and Linker package that was written by James Hendricks. It will take any number of object modules assembled using the R99 Relocatable Assembler and product a target based executable that can be either downloaded into the TMS99105 SBC or loaded as part of the Disk Operating System. The linker is envoked using the following syntax:

Usage: Link99 [-B] [-G#] [-M] [-D#] program [module/library]. where

An example output is provided in the screen capture. The three modules that have been linked and loaded are Sieve.R99 which is a programme based on the Sieve of Eratosthenes benchmark from BYTE, Sep. '81, pg. 186 that calculates the first 1000 primes, a dummy printf libary and the C arithmetic and logic library (CALL.R99).

Link99 Terminal Session
Link99 - Example output of linking three R99 object modules to produce the executable sieve.exe.

The full source code and executables can be found on the downloads page.

C Compiler

The original C compiler was based on Ron Cain and Jim Hendrix's Small C however I found that the available features were somewhat limiting, especially the lack of structures, floating point arithmetic. I found these features and others were available in Small C plus, which as the name suggests is a port of the original Small C. Small C plus is the work of R M Yorston in 1985. As I had already performed the code generation and had written the C Arithmetic runtime Logical Library (CALL.A99) for the Small C compiler it was a straightforward process in port it to the TMS99105.

The attractive feature of this compiler is that it can compile itself to produce and object file that can be loaded and link to execute directly on the TMS99105A SBC.

Small C Plus example
Small C Plus - Truncated example output of compiling the programme Sieve.C.

The full source code and executables can be found on the downloads page. The example that is included is once again the Sieve of Erathosenes which calculates the first 100 prime numbers and was often used as a benchmark for earlier computers.