Learning Materials for getting into C programming for MS-DOS/PC-DOS/DR-DOS/FreeDOS

For a while now, I’ve been wanting to get into some DOS hobby programming using Open Watcom C/C++ (or maybe gcc-ia16), but, given that DOS programming was on the wane before the Internet came around, and my childhood programming stuff is either for BASIC or a copy of Microsoft C/C++ 7.0 with reference manuals but no tutorials, that was proving kind of difficult.

However, recently, I was clued into the fact that there are actually some pretty good books I could borrow for free on the Internet Archive as a way to either determine that I wanted to buy them, or just read those crucial few pages that would make other resources make sense in the mind of a more modern programmer… so here’s what I’ve found so far:

C Programming itself
Literally any decent learning materials will do, so I don’t want to recommend the books I just happened to use.
Segmented memory models in C, linked lists, hash tables, and the trade-offs therein
Borrow Microsoft C: Secrets, Shortcuts, and Solutions by Kris Jamsa from the Internet Archive’s book library and read chapters 25 (Dynamic Memory Allocation) and 28 (Understanding Memory Models) and borrow Advanced Turbo C by Herbert Schildt and read Chapter 3 (Dynamic Allocation).
See also the Special Pointer Types for Open Watcom C/16 section of the Open Watcom 2.0 C Language Reference once you’ve had things start to click.
Using VGA’s 640x480x16color Planar Graphics Mode
Borrow The Waite Group’s Microsoft C programming For The PC, Second Edition by Robert Lafore from the Internet Archive’s book library and read chapter 11 (Direct-Access Graphics).
See also chapter 2 (Icon-Based Interfaces) of The Craft of C by Herbert Schildt.
Using 256-color linear graphics modes on VGA and reading the mouse
Read David Brackeen’s 256-Color VGA Programming in C. (It’s a free series of online tutorials with source downloads for DJGPP and “Borland C, Turbo C, etc.”)
Playing music on an Adlib-compatible sound card
Download Programming the AdLib/Sound Blaster v2.0 (A.K.A. adlf.zip) from the Internet Archive. (local copy)
Playing digital audio on a SoundBlaster-compatible sound card
Download SoundBlaster Programming Information v0.90 (local copy), Soundblaster programming routines (C++ src) (utility code under MIT-like license terms) (local copy), and Programming the SoundBlaster 16 DSP (local copy).
Reading from the PC Gameport
Read ePanorama.net – PC analogue joystick interface.
DOS/BIOS interrupt API reference
See Ralf Brown’s Interrupt List (alt, download).
Turbo Vision API documentation
When Borland released the source code for the C++ version of their Turbo Vision TUI library and the Free Pascal people ported it back to Pascal as Free Vision, neither released API documentation.
The recommended Borland Turbo Vision Version 2.0 Programming Guide is in the Internet Archive’s collection.
Everything else I’ve been interested in about DOS programming so far
Start by borrowing The Craft of C by Herbert Schildt and The C Toolbox, Second Edition by William James Hunt from the Internet Archive’s library. (Among other things, the former covers TSRs in C, writing a rudimentary C interpreter, basic EGA graphics, interacting with the DOS mouse drivers, implementing a screen editor, and building an icon-based interface and icon and bitmap font editors while the latter covers other useful things like TUI popup windows and using the serial port.)
If you want another book that I found useful, Find a brick-and-mortar library with or buy a used copy of “The Art of C: Elegant Programming Solutions” by Herbert Schildt. (There’s a fair bit of overlap with the prior two, but also some useful non-overlap. Its chapters cover TUI pop-up and pull-down menus and pop-up windows, writing TSRs in C, Mode 4 (CGA) graphics including 2D rotation, basic DOS game development, using the serial port, writing a rudimentary BASIC interpreter, miscellaneous text-mode stuff like using color and changing the text cursor size, controlling the PC speaker, interacting with DOS mouse drivers, and drawing bar graphs.

Beyond that, you’re into more advanced stuff like Michael Abrash’s Graphics Programming Black Book (HTML, Markdown sources for making ePub/Mobi files), Undocumented DOS, or the references for things like VESA and software 3D scattered around places like the Wayback Machine archive of STEEL’s Programming Resources.

I hope this helps you and you may also want to check out my Useful Info On Win16-Targeting Compilers… And a List of DOS/Win16 Resources post.

CC BY-SA 4.0 Learning Materials for getting into C programming for MS-DOS/PC-DOS/DR-DOS/FreeDOS by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Retrocomputing. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.

All comments are moderated. If your comment is generic enough to apply to any post, it will be assumed to be spam. Borderline comments will have their URL field erased before being approved.