x86 Assembly
Back in 1997 I used to experiment with assembly language on DOS and Windows. Here are some of my programs from that period of time, available with source code.
3D Functions
3D Functions is a program which lets you plot functions of the form z=f(x,y) and [x,y,z]=f(p,q), which describe two-dimensional surfaces, in three dimensions. The optional time variable can be used to animate the surfaces.
The functions are specified in a language which loosely mimics C. The program has a simple “compiler” which turns the functions into pseudo code, then interprets them at runtime. The program is reported to work reasonably on an 80386 CPU with a 80387 coprocessor.
The program works on Windows 95 and up, also on Wine.
Fractal Clouds
This program generates 2D noise-based fractals, similar to Perlin noise. The height map can be customized to produce unique colors. Generated images can be saved as 24-bit BMPs. An additional option makes the generated bitmaps wrapping-friendly, so they can be used as textures.
This program also works on Windows.
CPUID
The CPUID program uses the cpuid instruction to identify the processor. It extracts information such as processor type, name, cache size and features. It also comes with a Windows-based user interface.
Unfortunately it is outdated today and won’t detect many features and flavors of modern CPUs.
TextView
TextView is a size-optimized text file viewer for DOS. The executable was squeezed into 201 bytes without any compression. Still, it provides basic navigation keys and allows smooth per-pixel scrolling in text mode! On Windows this program must be run in full screen. I have not tested it on Windows editions newer than XP.
3D Julia MMX
This DOS program has been written purely for fun. It uses fixed point arithmetics on MMX to produce animated Julia set fractal. The fractal is generated from a complex sequence Z(n+1)=Z(n)*Z(n)+C by counting iterations needed to reach a certain level of the module of Z. C is a variable that changes in time to produce a different look. The algorithm mimics the way the fractal was drawn in a 64KB DOS intro Drift.
XM Player
The tiny XM player can be used to play XM modules, originally produced by FastTracker 2. The program relies on DirectSound 5, but another sound subsystem could be plugged in. It’s perfect for small applications written in any language which intend to play background music.
I remember the program was not fully stable on some versions of Windows when I wrote it, but I did not spend time on debugging it. Debugging assembly programs of this scale is not easy and this was one of the last programs I ever wrote entirely in assembly language.
PC Speed
This program was originally created to measure and compare speed of different processors, but as they evolved its method became irrelevant. Now it can serve as an example on how to physically initialize the CPU in 32-bit mode.
It is a DOS program which switches into protected mode, collects memory from XMS and sets up all the processor structures, such as GDT, etc. It must be run from real mode (i.e. EMS must not be running).
Win32 Headers
Some of the Windows programs above were written with TASM in ideal mode and require the following set of Win32 headers to compile.