Jump to content

C compiler for Ti994/a


Recommended Posts

Clint Pulley made a small c compiler for the 99/4A back in the 1980s and Al Beard made a subset of big C for the Geneve 9640 in the early 1990s. Both of these will run on the appropriate real iron. In addition to those, @insomnia took the time to build a version of GCC targeting the 99/4A operating environment on the PC, so you have several possible directions you can go. With both the TI-99/4A and the Geneve 9640 emulated in MAME, you don't even need the real iron if you don't have specific hardware that you would need for one of the earlier implementations. You also have the option of Classic99 to run the small c compiler.

  • Like 1
Link to comment
Share on other sites

36 minutes ago, Frozone212 said:

I have classic99, does anyone have the compiler?

Just scroll down this linked post until you come to the section on "c" and you will find links to both the small c compiler and to the GCC compiler. The GCC version doesn't fully conform to your requested variants, as it is designed to run on a PC, but it is a somewhat fuller version of the language on the off chance you run head on into one of the limitations of the small c compiler.

  • Like 3
Link to comment
Share on other sites

This is all very good information for the genuinely curious.  This guy is not one of them.  He has an obnoxious habit of bouncing from system to system making vain attempts at producing programs, as he apparently fails to put in any effort to actually learn the environment nor develop tolerance for the quirks of these platforms, irrespective of the advice and counsel provided.  Let alone the tools to make it happen.


I am all for encouraging and welcoming new or returning users to any of my beloved platforms: TI-99/4A, Commodore 64, and Amiga.  However, this guy is not someone I would ever see as an asset, presenting only partial evidence supporting my conclusion below.


Nonetheless, of course anyone is perfectly entitled to dump resources into this bottomless pit.  Though he may be an affable person outside of this context, frankly, I would permanently ban him from our sub-forums if I had the power and authority to do so.




  • Like 2
Link to comment
Share on other sites

6 hours ago, Frozone212 said:

how do I load it?


Your best bet here is twofold: first, read the manual for Classic99, as it will provide a wealth of information on how the program loads, saves, and modifies programs. Second, the learning curve for the small c compiler is a bit steep if you haven't used it before, as it has a number of quirks specific to the TI. None of the quirks are insurmountable, but you have to learn to get comfortable with them--so reading the manual and looking at the wealth of existing program code written using this compiler is a must. As noted, there is lots of program code on WHT in the c99 folder. Take small steps. I'm not much of an emulator user, so I can't help getting things to load appropriately--but I know that the answers to that type of question are in the manual, as I have worked with @Tursi on many documentation projects in the past, and he is thorough. I am also not a c programmer, so the manual is much more your friend here than I can be. I have an extensive software/hardware collection, so I do have a reasonable awareness of what exists, though.

  • Like 2
Link to comment
Share on other sites

31 minutes ago, Ksarul said:

Second, the learning curve for the small c compiler is a bit steep if you haven't used it before, as it has a number of quirks specific to the TI.

To your knowledge, is there any relationship to the Small C compiler for CP/M?

Link to comment
Share on other sites

8 hours ago, Frozone212 said:

how do I load it?


So, it appears that the starter-kit's files are ARKed. Always a fun way to start!


Classic99's manual does show how to de-ARK them. But that requires typing.:P


I got as far as reviewing the C99-README, file:


Dear TI-user.
What you have here is the latest version of my C compiler update, Release #5.
But it can only be used in the FunlWeb environment !
It is set up to be an integral part of that environment (filename import/export
to other FunlWeb utilities, no screen color change within the program, etc.).
It was optimized "by hand" up to a nearly complete re-write of some functions
in pure assembler, in order to make it as fast as possible and to take up as
few sectors on disk as possible.
The time needed to compile itself is around 75% the time needed by the "pure C"
version of the compiler. (using a 16-bit console & RAM-Disk)
The version written in C occupies 89+5 sectors on disk. ("+5": E/A Init utils)
This compiler and its optimizer have been tested ...
To the best of my knowledge there *should* be no bugs in it --
if you come across one, let me know !  (see address below)
But if you can, check against the "pure C" version if it's in there, too ...
Anybody who has not already the corresponding C sources can get them from me
as well. Send me an Internat. Return-Postage and a formatted(!) disk, or try
to send me email.
How to install :
Both executeables, the compiler itself and its optimizer will ONLY function
properly as "Option #1" (TI-Writer-ProgramFile) files in the FunlWeb
environment !!
Just copy the file onto your FunlWeb disk(s) and configure your FunlWeb
system to call them up as Option#1 program files.
( See you FunlWeb documentation how to do this )
How to configure VDP options in the C compiler:
The C compiler will run "as is" only in 80-column mode, so a VDP9938 or higher
 is required to make use of the 80-column display.
How to set up a CC for 40-column mode (TI99 consoles without VDP upgrade) :
The very first sector of the "CC"file starts like this:
 FFFF 1FFA A050 02E0 8300 0208 0000 C2E0    <--- 80 column setup
 FFFF 1FFA A050 02E0 8300 0208 0004 C2E0    <--- 40 column setup
For those interested: how to change the display mode (NTSC/PAL) :
The second sector of the "CC"file starts like this:
 03C0 0080 0089 7081 8089 0480 2883 0382    <--- NTSC setup
           ^^        ^^
 03C0 0080 0289 7081 8289 0480 2883 0382    <--- PAL setup
           ^^        ^^
That's all !
The optimizer will run in 40-column mode only (no need for 80 columns here,
I think ?!).  I guess you'll have to live with it "as is" ...
List of Changes to the compiler, compared to Clint Pulley's latest Release #4
* Better code for the && and || operators.
  (1 Jump and 1 CLR_8 deleted)
* Shorter code for incrementing and decrementing characters
  (SETO_7 instead of LI_7,1 and thus changed arithmetic, saves 2 byte!)
* Better code for do...while loops
  (JEQ jump in use, "jump-around-jump" avoided)
* Removed Error with comma operator in conditionals   ?:,
  Example:  func( a ? b : c , d )  MEANS NOT  func( a ? b : (c,d) )  !!
  I.e. compiler throws away one parameter due to false operator precedence
* Extended support for 'goto' statement
  Now 'goto' is allowed even in "inner loops", as long as no actual conflict
  with block-local variables occurs.
  The stack-pointer is tested at compile-time for the 'goto' and the 'label'.
  If it hasn't the same value, the error "illigal goto" is given.
  In any other case the goto or the label is allowed.
* Full support for the '\' escape character in character/string constants !
  Due to a simple pre-processor, cc#4 would not properly compile '\'' or "\""
  so one had to use the octal notation for ' in chars or " in strings.
* Support for character/string constants longer than one input line added !
  If \ is the last character in a line, the string constant is continued with
  the first non-blank character on following line(s).
  (The way many modern c compiler handle that)
* The 'EVEN' assembler directive is only issued if necessary
* Added option "Assume Long Jump"
  Answering "No" is the same as "Jump-to-Branch-Conversion YES" with the
  release #4 optimizer...
* Changed code generated for the '-' (subtract) operator,
  in order to allow a more simpler optimizer in these cases.
  This is the cause why the optimizer (5.3) coming with this compiler
   does NOT work properly with earlier versions of the compiler ...
This is meant to be an update and by no means a complete new release ...
Release Policy:
These executeables are being released for free distribution to the TI-99/4A
community.  If you feel it is of value and find yourself using it frequently,
please send me a small contribution for my time & efforts, but keep these
two important things in mind :
> Send Clint Pulley, Author of the previous version, his amount, first !
  As this is only a *derivative* work - how *much* work doesn't matter...
> I live in Germany and have to live with *our* banking system !!
  So if you send me money (as unsafe as this might be), send cash ($ or DM),
  or increase any cheques by (estimated) 20 US$ -- as this is the amount of
  money *I* have to pay for handling fees - foreign currencies involved ...
  (Just to have that cheque cashed in, that is !)
A final note from Clint Pulley:
"If you use the information and/or source code contained in this archive to
develop new software offerings, whether fairware or commercial, please provide
me with a complimentary copy of your software. In the past, some c99 developers
(Warren Agee and Pale Coleman, to name only two) have done so. Their gestures of
common courtesy have resulted in my freely giving advice, assistance and source
code to further their endeavours."
...I second that !
How to reach the author(s):
Clint Pulley                            Winfried Winkler
38 Townsend Avenue                      Rathenower Str. 69
Burlington, Ont                         10559 Berlin
CANADA L7T 1Y6                          Germany
(416) 639-0583                          030 - 394 47 49  (late hours only!)
Delphi     CLINTP
Compuserve 73247,3245
email      U001@cs.cciw.ca              willi@wap0109.chem.TU-Berlin.DE
              note: I don't know for how long my email address will remain valid
                    ( HOPE I will finish my work at the university up to 1995 )
Enjoy these programs - and help keep our TI99/4a alive and well !
Winfried Winkler


I'm using ti99dir63a, to view the ARKed files...



...Back to real life for a while...:waving:

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...