Nostagilia: Old Programs From the 1980's and 1990's

Welcome to Mark Rejhon's classic programming section. While I've made the rest of my website easy to read, this section uses very technical language with no holds barred! Read at your own risk ;-)

Many of these programs are 10 year old classics and are provided here for nostagilia and amusement purposes.  Much of the programming in this section was done way back in university and high school years, when I had plenty of time to enjoy programming as a hobby.  These days, I do programming for companies rather than as a spare time hobby.

You have my permission to make modified versions of my programs, as long as the source code is freely distributed with the modified version. My credits must also stay in the code and documentation. And do please email me a copy of your modified version ;-)

- Mini Graphics Demos
- General Utilities
- Bulletin Board System Utilities
- Commodore 64 Video Games
- Advanced Communications Software Programming
- My Participation in Linux DOSEMU Development

Mini Graphics Demos

MARSFACE.ZIP (72k | 1991 | QBasic source included)
[Screenshot of MARSFACE mini-demo by Mark]One of the most interesting graphics-related programs I wrote in the early nineties is a viewer I made to read space probe hexadecimal data containing images of a Mars crater.

The image was very noisy, so I invented a filter that eliminated the noise pixels. Actually, the noise filter is not unlike those in professional image editing software. But I wrote the filter from scratch, without ever having seen or heard of a noise filter at the time, and no prior knowledge of how noise filters worked!

This program was written in QuickBASIC 4.5, but it should also work with MS-DOS QBasic as well. There are detailed README files included with this program.

MOTION.ZIP
(33k | 1993 | QBasic source included)
This is a program that I wrote to prove that the human eye can tell the difference between 30 versus 60 frames per second in videogames! Lots of people were misinformed that the eye can only see up to 30 fps in all conditions, but I did extensive research into the subject, and found a lot of evidence proving otherwise. I also developed this VGA demo that compares multiple objects moving at different framerates side-by-side, as "see-for-yourself" evidence. Download it before you debate the matter with me! <big grin> ;-)

DAZZLE.ZIP (6k | 1992 | ASM source included)
This is a very tiny TSR I wrote which cycles the colors of the text screen while you use the computer. Download it and see your DOS prompt flash in dazzling colors!

TVTOOB.ZIP (1k | 1992 | executable only)
[Screenshot of TVTOOB mini-demo by Mark]This is a super-tiny 48 byte program that simply displays a noisy TV-style picture on the entire computer screen. Shows how much an amazingly tiny program can accomplish! Yes, only 48 bytes! I wrote this program directly in DOS DEBUG and programmed a super-tiny pseudo-random noise generator.

General Utilities

GO125.ZIP (42k | 1992 | QuickBASIC 4.5 compiler source included)
This is a DOS command that was popular among my friends. It is a quick change-directory utility that is used instead of the DOS 'cd' command. It allowed you to specify just part of a directory name of any directory of any drive. You could merely type "go downl" instead of "cd e:\comm\telemate\download", which saves a lot of keypresses! This program works great on systems running up to DOS 6.22, but there appears to be a compatibility problem running under Windows 95. Someday, I might rewrite this old program into C for Windows 95 and add long-filename support!

TYPBENCH.ZIP (25k | 1991 | QBasic source included)
This is a free-form typing speed benchmark program. The timer automatically starts when you start typing, and you can type anything you want. For example, you can type out a paragraph from a newspaper article. When you are finished, it displays detailed typing speed statistics including the number of keypresses per minute, number of words, average word length, frequency of using the backspace key, words per minute, etc.

Bulletin Board System Utilities

[Screenshot of BBS ANSI files menu by Mark]From summer 1991 to winter 1997, I ran a Bulletin Board System (BBS) called ViDDiBBS. It was a small hobby-run modem online service with two phone lines. I programmed several utilities that helped me run my Bulletin Board System. The image shows the animated File Menu that I created for ViDDiBBS.

ATYPE20.ZIP
(45k | 1995 | C source included)
This is an ANSI file viewer that I programmed originally in QuickBASIC as early as 1992, but converted to C. ANSI files are color text files with graphics symbols that are still commonly being used on modem Bulletin Board Systems.

My ATYPE program program is an enhanced version of the DOS 'TYPE' command with built-in support for ANSI-BBS, VT102 and AVATAR/0+ files. It does not require an ANSI.SYS driver, since I programmed complete internal support for the escape sequences. The display speed of text is controllable via a command line switch so that you can simulate the speed of the displaying, as if the file was being transmitted via a 2400bps or 9600bps modem!

PKANSI09.ZIP (67k | 1994 | QuickBASIC 4.5 compiler source included)
This is an ANSI file optimizer to reduce the size of ANSI files. ANSI editing software such as "TheDraw" and other programs I used, generated very inefficient ANSI files with lots of redundant ANSI escape sequence codes. Since I am extremely familiar with these ANSI codes, I made this utility that optimizes these code sequences by replacing them with more compact code sequences. For example, it can replace two cursor movement codes with one cursor location code. It can also compress redundant whitespace in ANSI files with cursor location codes if it saves space. This utility compressed some of my large ANSI files by as much as 50%!

Commodore 64 Video Games

MARK64.ZIP (270k | 1986-1991 | Files are in D64 format)
(Requires C64 emulator to simulate a Commodore 64 on a PC!)

[Screenshot of SPACEZOOM by Mark]Many of my golden years of programming was on a Commodore 64 in the mid 1980's, when I was 11 years old! I made a few dozen programs, which are all included in the same ZIP file.

The videogame shown in the image is a space shoot-em-up game called SPACEZOOM. It is a clone of the 'Uridium' videogame which I really enjoyed playing!

I learned 6502 assembly language when I was 12 years old, and started programming this videogame when I was age 13. I spent occasional programming time on this game over a period of more than 3 years. This game is in 100% assembly language, and uses lots "raster-line interrupts" to achieve desired graphics effects on the Commodore 64. Because of memory limitations, I dreamed up a simple compression technique to store the level graphics data. (Later in my life, I learned that I had simply reinvented RLE compression ;-)

Advanced Communications Software Programming

SUPERCHATTER (1992 | Source code available by email upon request)
SuperChatter is a splitscreen chatting program on steroids for Bulletin Board Systems. If you're familiar with chatting to people using ICQ, then you have an idea of what SuperChatter is. I developed it for my BBS as a convenient way of chatting to users. Since my BBS was one of my main methods of communications partly due to my hearing impairment, I put a lot of work into this program!

It contained a several state-of-art features that were not found in other splitscreen chat programs in its own day:

.... Each user's text zone was completely scrollable and editable. Imagine SuperChatter as being a splitscreen editor, with each user having their own text area to play around with. Users could even backscroll in their chat buffer and modify their old text, even while the other people watched! No other BBS chat programs had this feature at the time.
.... Supports ANSI-BBS, VT102, AVATAR, and AVATAR/0+. I even had automatic detection for this, which was done by playing a short stream of hidden code sequences, and checking the resulting cursor position. (Which determined what terminal standard that the user was using). Unfortunately, this advanced feature revealed some bugs in some communications software programs!
.... Very efficient progressive text display engine, with the ability to prioritize the display of various parts of the screen. At the time SuperChatter was written, 2400 baud modems were common and they often took 10 seconds to transmit a full screen's worth of text. The progressive text display engine recycles as much of the user's existing screen text as possible by eliminating transmission of redundant data. Also, if one user started typing while screen updates were still being transmitted, it would temporarily pause the screen updates (even during the middle of a line) and immediately display the user's typing in his splitscreen, before resuming the low-priority screen update. No other known splitscreen chat programs at the time were as efficient as SuperChatter in displaying text at optimal speeds over a 2400 baud modem. This progressive text display engine is not very unlike certain advanced terminal-display libraries that are now available for Linux (Such as 'Slang' and 'ncurses').

MULTITERM (1991 | Source code available by email upon request)
In 1991, I was lucky enough to get my hands on two 2400 baud modems for my 386SX computer at the time. Back then, I had only 2 megabytes and no multitasking software. I was looking for a way to use both modems simultaneously without having to purchase a multitasker.

So I programmed a solution called MultiTerm. One of the most complex DOS programs I've written, MultiTerm is a multi-modem terminal program that has the ability to operate up to 4 modems simultaneously. It has Xmodem upload/download file transfer support, ANSI-BBS and AVATAR/0+ support, automatic redialer, and a few other features.

It can multitask all these features independently for each modem! I was able to call two different BBS's and make two simultaneous downloads at the same time!

What makes this program very special is that it is written in QuickBASIC 4.5 for DOS! Achieving simulated multitasking in a pure DOS program is no simple feat, especially if you're unable to use interrupts in QuickBASIC. In order to simulate multitasking, I had to use an architecture consisting of polled functions. This meant that no single function was allowed to execute for longer than a tiny fraction of a second. A set of functions were polled in a rotating fashion for each modem, to achieve the simulated multitasking effect. Each function could only do a tiny fraction of its task per call, and resume its own task in the next call to that same function. This includes the Xmodem upload/download file transfer protocol, the ANSI-BBS display engine, all the way down to simple things such as the phone line hang-up operation (I didn't want to risk interrupting a download-in-progress for one of my modems, just to hang up the other modem which sometimes took several seconds).

My Participation in Linux DOSEMU Development

Back in late 1993, at University of Waterloo in my dorm, I ran Linux almost exclusively on my system and used it to access the Internet and also because I enjoyed using a unix style command line. Not long after I started using Linux, I discovered Linux DOSEMU. It is a DOS emulator that makes it possible to run standard DOS applications under Linux and even multitask with them on the same system. I was very fascinated by it.

Since the source code of DOSEMU was freely available, it wasn't long before I was making changes to parts of the Linux DOSEMU source code. Before I knew it, I was a significant part of the DOSEMU development team in 1994! The development team is a loosely formed group of developers scattered throughout the Internet who considered DOSEMU more than a big spare-time hobby. Lots of my first C programming was done on the DOSEMU source code!

Some of the biggest contributions I've made to Linux DOSEMU in 1994 include:

.... Serial port emulation
This was my first real C programming! I rewrote the serial emulation code in DOSEMU, and made an improved software-based 16550 UART emulator. The original emulation could only go up to 2400bps on a 386 system, but my serial emulation code more than tripled that speed! Port accesses to COM ports such as 0x2E8 were trapped and interpreted into Linux system calls to the serial device. I also learned a fair bit of low-level stuff about serial ports, including IRQ's, interrupts, status bits, FIFO's, etc. It was very challenging to fine-tune proper timing of transmit/receive interrupts to an acceptable extent. I spent several hundreds of hours programming in this part of DOSEMU.
.... Color ANSI / VT102 support for remote-control
Originally there was only monochrome "termcap" for remote control of DOSEMU via telnet or a communications terminal. My color ANSI display engine was faster and added support for displaying the IBM PC character set for more accurate remote display of the DOS screen. Today, this part of my code has been since replaced by the color "Slang" universal display library by another member of the development team, but my code has certainly provided the inspiration!
.... Improved timer emulation
One day a while back, a development team member succeeded getting DOSEMU to run DOS4GW dos-extender software. Since many videogames such as DOOM used DOS4GW, it meant DOOM could run under DOSEMU on Linux! Unfortunately, the timer code wasn't high precision enough for DOOM to be playable, since many videogames required a regular diet of timer interrupts to synchronize game speed properly. Back in those days, Linux could not deliver timer interrupts quickly enough for most videogames to run smoothly. I developed "chained timer interrupts" to allow each timer interrupt to spawn a chain of more timer interrupts in rapid succession. This allowed DOSEMU to run many videogames at almost full speed of real DOS!

I am still on the DOSEMU mailing list and answer some questions as they come by, even though I don't have enough spare hobby programming time to contribute much new code to the DOSEMU development team.

Even to this day, you'll find several occurances of my name "Mark Rejhon" throughout the credits and source code of DOSEMU. And to this day, lots of DOSEMU webpages comes up on popular search engines if you do Net Search on my name "Mark Rejhon"!


About Myself | Résumé | Programming | Photo Album | Hearing FAQ | 3D Graphics | Home Page
Enable Frames | Disable Frames | Send email to