Posted on
In October 1995, I was learning to program in Borland Turbo Pascal 7, and everything I had written so far lived in the 80x25 text mode of DOS. Two things made me curious: the mouse and graphics.
Turbo Pascal's Graph unit, the Borland Graphics Interface (BGI), could switch the screen to 640x480 VGA with 16 colors and let me draw on it pixel by pixel. The mouse driver could tell me where the pointer was and which buttons were down. Put the two together in a loop, and you have a paint program.
From 2:48 in the morning to noon
I kept development snapshots as I worked, and their times tell the story of October 20, 1995.
At 2:48 in the morning, I was reading Borland's sample code for the graphics mode. At 3:57, I had a first test that put one green pixel wherever the mouse was while a button was held. By half past six, it had a control bar with a strip of colors, and by a quarter past nine, it could save a picture. By eleven, it was the editor it still is today, and at 11:51, I wrote a viewer for its pictures.
I called it Free Paint 1.0. You paint by holding down a mouse button, pick one of the 16 colors and one of nine brush sizes, from a single pixel to a 9x9 square, and use the buttons to clear the picture, save it or quit.
Dabs, not lines
Free Paint doesn't draw lines. Each time it reads the mouse, it stamps a square of the brush size where the pointer is, with nothing in between. A slow stroke overlaps its squares into a solid line, and a fast one leaves them apart as a trail of separate dabs.
That is the program's character. The fireworks in the sample picture are made of exactly such quick flicks.
Thirty-one years later
In October 2026, I brought Free Paint back to life in DOSBox Staging on Windows. It still works, saved pictures included.
It still compiles, too. A small build script compiles the editor and the viewer with Turbo Pascal 7, without opening the IDE, and checks that each one comes out byte-identical to the EXE in the release.
Free Paint has a sibling from the same month. Toggtime is a text-mode demo that writes random characters and colors straight into video memory, and the two programs share some of their small Pascal units.
Paint over the fireworks
The easiest way to try it is to run it in your browser. The browser version runs the original DOS programs in js-dos, a DOSBox port for the web, and opens the editor on the fireworks, so you can paint over them right away. Chrome and Edge can also install it as an app.
To run it on your own computer, download the ZIP from GitHub. It has the editor, the viewer, Borland's graphics driver and the fireworks picture. Unzip it into one folder, and run FREEPNT FIREWORK from there in DOSBox Staging.
Free Paint is free and open source under the MIT License, and the code is on GitHub. If it reminds you of your own first programs, feel free to drop a star there.