Comment by anthk
6 days ago
You would like the T3X language as an exercise to port stuff from Free Pascal too it. In a near future I plan to port two libre text adventures with it, Beyond the Titanic and Supernova. If it fits under T3X, it might run in 'high end' CP/M systems out there.
https://t3x.org/t3x/0/index.html
https://t3x.org/t3x/0/t3xref.html
Beyond these Curses simple games, there's a 6502 assembler and disassembler among a Kim-1 simulator, Micro Common Lisps and whatnot.
Have to look into it, thanks.
Nice. A tip: there are 'modules' where are just helpers (strings, io) over main functions.
Kinda like write vs printf in C, but easier to grasp. The cheatsheet will help you a lot.
Another thing: setting up the compiler might be cumbersome, I might post a guide soon. I am not the author but making it compile well on some arches can be odd (openbsd/amd64) vs native code (fbsd, 32 bit linux)... nothing complex once you set it up once.
My T3XDIR in the makefile and bin/ scripts it's set to $HOME/t3x0/lib and the bn PATH being set to $HOME/T3XDIR/bin in both Unix env vars and the scripts. It's a 10 minute setup, but after than you will just run
(file actually being file.t) and get a binary. Cross compiling for DOS or CP/M involve simlar flags. And it's cool as hell, as I translated Ladder into Spanish for some Spanish OpenBSD pubnix... and the same port will work in DOS too.
On Titanic/Supernova, well, it was a former TP game ported to FPC, is not very complex, and tons of stuff could map 1:1 to t3x. The game might be too big for CP/M but for DOS it would be ideal (even by using the T3X 'big' libraries).
The bundled cheatsheet (make will generate a cheatsheet.pdf file if you have groff) might help you. For instance, gotoxy can be written in T3X as con.move(x,y). You need to import the console library as:
Also, the WYOP book from the samepge comes with a good chunk of examples to play with in a ZIP file.
Have fun.
Eh, I made a typo. The PATH for tcvm and tx0 should be $HOME/t3x0/bin.