This page has a variety of demo routines I wrote for various people. The source code links on this page are mostly specific to the PC architecture or to MSDOS or both; it will not be portable to other architectures or operating systems.
A small game which allows you to navigate planes around a traffic control grid.
Shows scanning of environment and command line options.
Some basic hard drive functions, reading the MBR, showing what drives are installed, and showing the dos drive tree
Shows the time on the screen continuously
keeps disk powered up on systems where timeouts would shut it down for power save reasons.
Shows how to invoke DPMI.
A simple hex dump utility.
ESC key returns you to DOS when a program goes awry.
Print floating point numbers.
Code for accessing the floppy without the BIOS.
A very simple game, adapted from someone's minimal code size contest.
Test if a UART exists.
Replacement for int 9 keyboard handler.
Change the state of the keyboard leds.
Load an MSDOS .com file without MSDOS.
Load an MSDOS .exe file without MSDOS.
Shows how to use the CMOS interrupt timer.
Shows how to reprogram the programmable interrupt controller.
Use the power monitoring API to power down the computer.
shows one way to do random numbers.
Read data from a file.
Shows how to do interrupt-driven serial I/O from a 32-bit program.
Shows how to time the execution of routines.
Beep the speaker using ports.
Draw an ellipse on the screen.
Simple floating point math without a coprocessor.
64-bit integer math.
How to do a TSR in C.
Drawing in mode 12h.
Initializing mode 13h without the BIOS.
Bit maps in mode 12h.
Initialize mode 12h/mode 13h without the BIOS.
Simple delay using ports.
TSR which puts time on the screen.
Document about floating point format.