Close

An Operating System for the TTA16

A project log for 8 Bit TTA Interpreter

TTA (Transport Triggered Architecture) is very simple CPU type.

agpcooperagp.cooper 05/24/2018 at 14:100 Comments

An Operating System for the TTA16

It sounds big but really its just a "shell".

Forth

I first looked at Forth. I wrote a Forth interpreter in the early nineties (based on eForth I think) and compiled to 3.8kb (DOS com file) for the core (1974 lines). The forth library was a further 11.4kb (426 lines).

I wrote a second version for the 8031/51 CPU as I had an emulator to test the code. The 8031/51 is more primative than the 8086 so would make a better starting point. But still the assembler source code is 1735 lines long, so not small.

I found the beautified Buzzard Forth code (by Sean Barrett) which is very minimum bootstrap forth with its library. Its about 160 lines (excluding comments) and the library is about 6.6k (367 lines). No point taking about the gcc compiled file at 93.3kb!

Mouse

I came across Peter Grogono's mouse-79. A very small language, about 200 lines of pascal or C code. It superficially looks like Forth as a uses RPN logic, but it does not have a work dictionary and words cannot be defined. It uses subroutines (macros) that have local variables (i.e it is recursive).

O/S Purpose

The shell need not be a full language like Forth but something more like a unix shell. So if I strip out the macros, the shell has many language like features but no subroutines. Here is an example of "100 beer bottles on the wall":

X 100 =
(
	X. ! " Bottle(s) of beer on the wall,!"
	X. ! " bottle(s) of beer!"
	"Take one down and pass it around,!"
	X 1 X . - =	
	X. ! " bottle(s) of beer on the wall.!"
	X . ^		
)
$$

 And here is the mouse language without macros:

The code is still being reduced to suit its new application.

AlanX

Discussions