Free career advice: C Programming in DOS is fun!
Posted by mbbrutman@reddit | vintagecomputing | View on Reddit | 48 comments

This weekend in Seattle I'll be talking about the joys of C and assembler programming for DOS systems. The beige box 486 is running MS-DOS 6.22 and Turbo C++ 3.0 for DOS, a classic development environment from 1992. The more modern machine is running Windows 10 and features the Open Watcom 1.9 compiler from 2010, which is a much more capable toolchain.
For bonus points the 486 has both VGA and MDA so that I can demonstrate dual-head debugging - one screen will have the debugger on it while the other screen has the running program. The IBM LPFK device is there as part of the demonstration of serial port programming.
For details on all of the exhibits see https://sdf.org/icf.
balki_123@reddit
Actually, C programming in DOS is not fun, if you screw up pointer, it makes your system unusable and you have to hard reboot it. So much time wasted ... UNIX/Windows C programming is more fun.
mbbrutman@reddit (OP)
Clearly you did not get the joke ... it's also not good career advice.
balki_123@reddit
Well, my brother makes some good money as a C/C++ programmer. He particularly started in MS-DOS, so IDK.
Career advice - maybe not so bad :)
paz1200@reddit
Could you post a pic or PDF of the tips sheet?
mbbrutman@reddit (OP)
Late, but upgraded!
https://www.brutman.com/Adventures_In_Code/DOS_Programming_Tips_full_page.pdf
paz1200@reddit
Career tips appreciated. Thank you!
mbbrutman@reddit (OP)
I will do that tomorrow!
It first originally started as a 5x7 index card that I was planning on handing out, but I ran out of time. So the full page version is what I ended up with. And of course, it had a bug so the one missing word is written in on the display stand with a Sharpie. ;-0
paz1200@reddit
No rush, thanks! I’m here for the DOS programming advice.
geon@reddit
What is your free advice?
mbbrutman@reddit (OP)
You can do anything on your last day. ;-0
AmoreLucky@reddit
That's something I've been wanting to try and learn for the past couple years now, programming in C in DOS, but I haven't managed to get the energy to stick to it. It's honestly pretty cool how flexible DOS programs could be, supporting a multitude of graphics and, later, sound cards that were available at the time, meanwhile most other computer architectures only had the specs they came with and you had to work with that, kinda like making programs for game consoles.
SylvainBibeau@reddit
I remember those big white and blue boxes of Borland C++ with a whole bunch of disks to install. Have fun at the convention!
ACM96@reddit
Oh man, I remember those disks! I had that huge Borland C++ book too. My first program was a classic shark game...
geon@reddit
I've been having a blast programming EGA graphics in C. It was super slow though, so I need to brush up on my asm. I experimented with the Commander Keen source, which was super fast, but I couldn't quite figure out why.
I have to try Adlib sound as well.
walmartbonerpills@reddit
I mean, it is!
marhaus1@reddit
Oh the nostalgia...
pinkocatgirl@reddit
C programming in UNIX is more fun though.
guitpick@reddit
I'll take a SEGFAULT over a BSOD any time.
marhaus1@reddit
But not nearly as character-building 😅
redderGlass@reddit
Loved it.
DatuDimatablan@reddit
Back when I was 15, I learned C for the first time while pursuing my diploma in computer studies; I used Turbo C as the IDE.
ZjY5MjFk@reddit
what is weird keyboard infront of terminal ?
mbbrutman@reddit (OP)
It's an IBM "Lighted Program Function Keys" (LPFK), which was used on CAD systems back 30 years ago. It's a fairly simple serial device so one of my demonstration programs was showing how the serial port is used to control a device like that.
ZjY5MjFk@reddit
Neat
TT_207@reddit
Never tried Turbo C++, is the editor more like using QBasic editor, or like using VIM?
mbbrutman@reddit (OP)
Definitely closer to the QBasic editor. I use VI/VIM normally and I can't stand working in the Turbo C++ for DOS IDE because of the editor.
G-I-T-M-E@reddit
An LFPK: Now that’s something I haven’t seen in a long time…
mbbrutman@reddit (OP)
It works out as a nice demonstration device for serial port programming. And people love playing with the lights on it ...
DamienCIsDead@reddit
This is pretty cool. Trying to teach myself C specifically for DOS once again but it's pretty hard at 42 being constantly distracted by my day job and kids. But it's fun to keep trying anyway. I always wanted to write any kind of useful DOS program, whether it's a game or a simple command line tool.
Will the lecture be recorded at all? I'm on the East coast so there's no chance for me seeing this in person.
mbbrutman@reddit (OP)
Hi, there was no formal lecture - I was just manning the table all day answering questions and generally having a good time.
There are a lot of DOS programming resources out so don't despair; just allocate time for it.
hamburgler26@reddit
I've been having a blast going through a C book from the early 90s with Borland C++ 3.1, has brought me a lot of sanity coming from the misery of being in the modern IT and development field.
My plan is to make some basic, easy and fun games for my 4 year old to play.
3Cogs@reddit
I fulfilled a 40 year ambition by writing a machine language game for the ZX81, my first computer. The game is rubbish but that doesn't matter to me, it works as designed and doesn't crash.
Some modern things are nice though, I'm using a free Z80 cross assembler and VM snapshots mean a crash is a 20 second interruption, not a 5 minute one like it would be with tape loading.
Rogerdodger1946@reddit
Had one project in early 90s where I taught myself C++ and never used it again. Lots of 8085 cross assembler stuff, even to this day to update software on some dedicated industrial controllers I designed back then that are still out there used daily now.
Jhon_doe_isnt_here@reddit
I’m writing a text editor for dos in c as my first ever C project right now.
ScudsCorp@reddit
thanks for this post! I didn’t know this fair existed - had a great time!
Capable-Historian392@reddit
I used to use the TurboVision add-on for TUI programs back in the DOS days. Wrote a node monitor for the multi-line Renegade BBS I ran.
Good times, burned a lot of midnight oil coding.
cdheer@reddit
I miss Borland so much. The world needs more Phillipe Kahns and fewer Larry Ellisons.
Educational_Ice3978@reddit
Yeah, Embarcadero just took all the fun out of it.
Ridnerok@reddit
Have fun guys!!!
frobnosticus@reddit
Still true.
edthesmokebeard@reddit
Because when you fuck up a pointer, the box reboots!
Tranka2010@reddit
The only way to learn is through adversity!
ive-got-three-cats@reddit
Ah, good old djgpp and the Allegro game library. Liked it way better than BorlandC 3.1. Although I still used the Borland IDE to code in.
Serattz@reddit
We started in Turbo C++ in college back in 95' here, and switched to linux based C++ a couple of years later. I remember my introduction to C was in operating systems. The instructor told us if we knew C++, then C should come naturally. And we were to reprogram the kernel in the version of linux we were using from static memory allocation to dynamic memory allocation.
Sorry, it's been almost 30 years and I haven't programmed since I graduated years ago so I don't remember all of the particular details. But, that for sure was a long night.
mycall@reddit
I could see Linus Torvalds walk by this booth and get the idea to learn C.
AppleDashPoni@reddit
I've never felt quite as at home as when I've been programming in C on my 486. Quite excellent!
Shocar@reddit
Borland C++ was my first exposure to programming in C++ in the early 90s. I found that running it under OS/2 was the most stable compared to DOS Shell or Windows 3.x. Just DOS was boring.
KingLim88@reddit
This is cool. Wish we used that in the 90’s. I was using this weird precompiler called Glockenspiel C++ with Microsoft C. Debugging was hell as the class functions are mangled with the class names and some random numbers. prinf was the only choice and not a very good option at that.. but the memories!! Thanks!!