MSDOS/PC Demos

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.


X86 assembly language demos
Air Traffic Controller game

A small game which allows you to navigate planes around a traffic control grid.

Command line

Shows scanning of environment and command line options.

Hard drive

Some basic hard drive functions, reading the MBR, showing what drives are installed, and showing the dos drive tree

TSR/Time

Shows the time on the screen continuously

TSR/Disk

keeps disk powered up on systems where timeouts would shut it down for power save reasons.

DPMI

Shows how to invoke DPMI.

Hex dump utility

A simple hex dump utility.

TSR/Stop runaway programs

ESC key returns you to DOS when a program goes awry.

Floating point

Print floating point numbers.

Floppy driver

Code for accessing the floppy without the BIOS.

Gravity game

A very simple game, adapted from someone's minimal code size contest.

UART

Test if a UART exists.

Keyboard

Replacement for int 9 keyboard handler.

LEDs

Change the state of the keyboard leds.

COM files

Load an MSDOS .com file without MSDOS.

EXE files

Load an MSDOS .exe file without MSDOS.

CMOS Interrupt

Shows how to use the CMOS interrupt timer.

PIC

Shows how to reprogram the programmable interrupt controller.

PWM

Use the power monitoring API to power down the computer.

Random numbers

shows one way to do random numbers.

File I/O

Read data from a file.

Serial I/O

Shows how to do interrupt-driven serial I/O from a 32-bit program.

Timing programs

Shows how to time the execution of routines.


C language demos
Beep program

Beep the speaker using ports.

Ellipse

Draw an ellipse on the screen.

Floating point math

Simple floating point math without a coprocessor.

64-bit math

64-bit integer math.

TSR

How to do a TSR in C.

VGA

Drawing in mode 12h.

VGA Initialization

Initializing mode 13h without the BIOS.

Bit maps

Bit maps in mode 12h.

VGA Initialization

Initialize mode 12h/mode 13h without the BIOS.

Time delay

Simple delay using ports.


Terse language demos
TSR/Time

TSR which puts time on the screen.


Documents
Floating point

Document about floating point format.