T3X is a small, portable, procedural, block-structured, recursive, almost typeless, and to some degree object-oriented programming language. Its syntax is similar to Pascal, its semantics resembles BCPL's.
The T3X compilers are small and fast. Some of them support modules and separate compilation. The original compiler was targetted at the 16-bit Tcode machine, but native code backends for various processors exist.
T3X9 is the smallest, fastest, and most minimalistic one of the T3X compilers. It self-compiles its own code (about 1600 lines of T3X) in about 0.05 seconds. It runs on FreeBSD and targets the 386 CPU. It is a statement rather than a production tool.
T3X9 is also a good language for first course in compilers! The book Write Your Own Compiler discusses the full source code of T3X9 on little more than 100 pages!
Version 7.2.3 of the T3X compiler was the last version targetting the original Tcode machine. It was published in 2003 and never worked on 64-bit platforms except for the DEC Alpha. Version 7.3.x (and later 7.x versions) are a cleaned-up package that should compile on modern systems, like the x86-64 (although in 32-bit mode).
The T3Xr7 compiler is an optimizing compiler that targets the Tcode machine, the 8086 processor under DOS, the 386 processor under various Unix systems, as well as the Alpha AXP 21064 CPU under NetBSD. It is self-hosting under all supported systems. The T3Xr7 language supports modules and separate compilation. The compiler package even contains a tiny text-mode IDE.
OBJECT t[t3x];at the top of the program. There are more examples in the source code archive.
The XT3X compiler is a version of T3X9 that is intended for writing simple, sprite-based video games as they were popular in the 1980's. It targets an extended Tcode9 machine that provides color graphics and sound and runs under X11.
T3X 8.1.7 (zip, ~500KB) was the last version of the T3X compiler back in the days. It provided support for 32-bit Tcode, thereby removing the 64KB code and 64KB data limits. The ports may suffer from bit rot, though, so you might want to try version 7.3.x instead.
T3r3 (zip, 67KB) was the last T3 compiler before the language was renamed T3X. This is really old and hackish code, but shows nicely where T3X has its roots.
contact | privacy