Punix
This is a Unix-like operating system for the TI-89 and TI-92+ graphing calculators.
The name "Punix" is a combination of the words "puny" and "Unix". The other explanation for the name is that the "p" stands for "pico", meaning extremely small. Either way, "Punix" is a nicer, more politically-correct name than my other ideas for a name for my system: "Anux" and "Penix". :D
Features
Here are some of the current features in Punix:
- True preemptive multi-tasking
- Partial VT100 terminal emulation (difficult with only a 60×20-character screen!)
- Most of the simple system calls
And here are some planned and in-development features:
- Filesystem in FlashROM
- Networking
- Floating-point emulation
- Emulation of TI-OS, so it can run programs written for TI-OS (this will probably be an application similar to Wine)
- Linking to any other type of TI graphing calculator via a user-land utility that simply has to read from and write to the /dev/link character device file. (This tool will have to translate file names because the Punix File System will allow file names (as well as nested directories) which the other calculators cannot handle.)
- And more!
Progress
2006-11-13
- I changed the width of
size_tfrom 16 bits to 32 bits. I discovered that thesizeofoperator always returns a 32-bit number in TIGCC, and POSIX states that thesize_tis an "unsigned integer type of the result of thesizeofoperator" (stddef.h). The same applies tossize_t, except it is signed. This required me to change several pieces of 68k assembly code, since the exact size of a number needs to be in the code. I also had to change sysent.c, which lists every system call and the number of words of arguments each one takes. I also fixed the sizes for some other syscalls that were wrong already (such assetuid, which had a "0" where it should've been "1").This change is very good news, because I thought that
malloctook anintargument, so I was debating whether to makeint16 bits or 32. Sincemallocactually takes asize_targument, I will makeint16 bits. - I implemented screen scrolling for text. Prior to this the function responsible for this (
scrollcellup) was a stub, so the screen did not scroll up when text went past the end of the bottom line or there was a new-line on the bottom line. Now the it scrolls as you would expect. - I also changed the text that shows on start-up of the system. Now it displays one of a few different texts (depending on which is uncommented in the source), two of which are ASCII art. :) The ASCII art makes the screen scroll (they are taller than the screen), so I used them to test the scrolling feature.
- I've written some more of the standard header files (those that go in /usr/include/ and /usr/include/sys/) to make them more compliant with POSIX. Boy, there are a lot of standard headers in POSIX! Not only that, but some of them cross-reference types in each other, so I had to write quite a few to make the others work right.
- I added a little counter to the bottom-right corner of the screen to show the number of times the
nextprocfunction is called. The number is written directly to video memory, so it's read as a binary number (black pixel=1, white pixel=0). It's just a debugging tool anyway, and it won't be in a release version.
Here's a screenshot of this version so far. Notice that I used the "Achtung!" joke warning message. :) The pixels in the bottom-right corner are the counter I mentioned above.

2006-11-15
- I've improved the
kputcharfunction, so now it interprets carriage return, horizontal tab, vertical tab, formfeed, and backspace characters correctly. I also improved how it wraps at the end of the line: now it wraps to the next line only before a printable character or a tab. This means the screen can display a whole line of characters (60 characters wide), and a newline at the end will not add an extraneous blank line. - I also added a horizontal line to show the bottom of the text screen.
Here's a new screenshot. This has text I used for testing the new features of the text screen. Some of the lines have tabs and backspaces in different combinations:
