Series: C Programming on System 6
In October 2020, I started recording videos of my development of an IMAP client
written on my Mac 512Ke (later upgraded to a Mac Plus logic board with 4 MB of
RAM) running System 6, using the THINK C 5 IDE.
These days I'm developing other software, but with the same setup:
an 8Mhz system with a 1-bit, 512x342 screen, a one-button mouse, a keyboard
with no arrow keys, and an editor with one level of undo and no syntax
highlighting. Let's see what we can build with it!
I've released some software that I've developed on my Macintosh Plus.
All of it is freely released under the terms of the ISC license and includes
This list of videos is in reverse chronological order.
To be notified of new videos as I publish them, you can
subscribe to my RSS feed.
There is also a
IRC channel on
where I and some other interested parties are discussing development on old
IRC client, then returning to work on the BBS adding a serial module to join the
console and telnet inputs to allow calls through a modem.
I got stuck for a while trying to figure out why writes to the serial port would
hang the machine.
asking if anyone would be interested in a Q&A, and to my surprise, I got many
Qs to A.
It's a new year and my old computer is still old.
Let's have a chat.
Continuing feature development of my BBS software.
I review some recent commits covering user authentication and telnet
negotiation, then write some ANSI output code and a broken function for
returning a number's ordinal suffix.
I'm starting on a new project and I needed a cooperative threading mechanism
which didn't exist in System 6, so I created one.
It's been almost a year since my last
A few weeks ago I started working on a small revision control system to handle
my C projects developed on my Mac and it's now at the point where I can at least
manage commits to the tool itself.
Returning to the development of my IMAP client, I add SOCKS5 support to be able
to connect through a network proxy, particularly the one I made that is able to
convert TLS-encrypted data from my real mailserver into plaintext that the
Mac's slow CPU can support.
I quickly ported OpenBSD's
but there wasn't any interface to select
files or scroll through the output.
I've since added a proper GUI with the ability to select files or folders, and
in this episode I walk through the GUI and filesystem code and then add a
proper Edit menu.
I also make a formal release of the code and binary available for download.
I've wanted a simple revision control system on my Mac since starting
development of my IMAP client.
Porting a large system like Git or even CVS would be overkill (and very slow),
but maybe something small like OpenBSD's
implementation would suffice.
For now, just having a
utility would be helpful so in this video I port
the guts of
and show it generating a unified diff between revisions of a C file.
In this episode, I fetch the flags of each message and for unseen messages,
make them appear in the list in bold.
That introduces an off-by-one which I run out of time to fix while recording.
Today, I implement plaintext message viewing and hook it up to the message list.
I also review a cleanup of
variables to make them either
throughout the project.
I wrote a utility function to parse RFC822 dates/times sent by the IMAP server,
which then converts them to a UTC time.
In this video, I hook it into the IMAP parser and add a resource string for the
local timezone offset setting, so these UTC times can then be converted to a
local time and displayed in the message list.
I recently read about using a jump instruction as an
resource to allow
keeping the list definition function in the main program executable/project, so
in this video I implement the technique for the message list.
In this video, I get the list of messages displaying again and fix a bug that
occurred when closing a mailbox.
I provide a quick summary of creating
procedures in THINK C for drawing
custom list cells, which I will expand upon on in a future video.
In this episode, I fix the off-by-one error in the IMAP envelope parser noted
in the previous episode, then improve the tracking of a
ed buffer that
gets shifted around during parsing.
Returning to the development of my IMAP client, in this video I add
functionality to fetch the default mailbox name from the resource file (later to
be moved to a preferences window) and then eventually locate a crash in the IMAP
protocol parser from a bogus
In this video, I create a new GUI application from scratch, create a resource
file and add an image to it, and then display that image in a window.
I also cover using THINK C's debugger to inspect a struct.
Then, my Mac dies.
I've been writing an IMAP client for and on my
over the past many weeks.
Taking inspiration from
excellent YouTube videos documenting his development of the Serenity operating
system, I thought I'd start screencasting some of my work.