History

Oddly, Windows x86 assembly language was the first programming language I ever learned, or at least found myself productive with.

At a young age, I was curious about computer programming. and especially curious about how everything works “under the hood”. I dabbled in JavaScript, but wasn’t satisfied—I wanted to understand “how a CPU really works”. People pointed me to C++, but I still felt I was missing something. Eventually, I landed upon some x86 assembly language tutorials, and everything started to make sense.

Fast forward 10 years later, and, I had a website filled with various assembly language programs I had written over the years. But all in one terrible moment, due to some neglect on my part (3 months of Rackspace failing to charge my expired credit card), my entire site was deleted. To make matters worse, I later let my domain name expire, which was then taken over by squatters.

Fortunately, I still have copies of many of my old programs. On this page, I’m posting some interesting applications I created in assembly language.

“HelloWorld”

(Image of HelloWorld app)

I’ve already discussed the “HelloWorld” app in my previous post, Win32 x86 Assembly - Hello World. Essentially, when I did assembly programming, I would re-use this as a template for creating new programs.

“Hooker”

(Image of Hooker app)

This is probably the most useful assembly program in my archive. It’s a Windows mouse and keyboard automation program. The way it works is you provide a script (it has its own language, documented inside the program). I used it to automate (i.e., cheat) several games.

For example, here are four Hooker scripts for Warcraft III. When you start a new game, you run one of these scripts, and it will immediately press all the correct buttons/mouse strokes to get you a head-start in the game.

Undead Script (Image of an acolyte from Warcraft III)

Human Script (Image of an peasant from Warcraft III)

Orc Script (Image of an peon from Warcraft III)

Night Elf Script (Image of an wisp from Warcraft III)

“Text Reader Square”

(Image of TextReaderSquare app)

This is a (minimal) drag-and-drop graphical editing tool. You can place and drag shapes and text boxes with customizable fonts and colors.

Binary Search Tree

(Image of BSTVariables app)

This is a simple implementation of a (dynamically-sized) binary search tree.

Jumber: A radix string converter

(Image of Jumber app)

This is essentially number-base converter with support for customizable radix strings. The term “radix string” refers to the digits used to represent a number base—for example: binary is “01”, decimal is “0123456789”, and hexadecimal is “0123456789ABCDEF”.

At the time, my goal was to use this as interesting way to compress strings. For example, if you use “abcdefgh” as the radix for the string “dead”, when converted into hexadecimal results in the value “D4B”. This program allows you to save and load the compressed binary value to/from disk.

“CustomButton”

(Image of CustomButton app)

This was an attempt at registering custom, re-usable native Windows controls; in this case a toggle button.

“TransparentWindow”

(Image of TransparentWindow app)

I wanted to make a window I can see through, and came up with this simple example.

Bitmap Experiments

(Image of GraphDDB app)

(Image of GraphDIB app)

Here, I’m plugging a parametric equation into a grid of pixels to determine their color. The first example uses a Device-Dependent Bitmap and the second uses a Device-Independent Bitmap format. I used to have several interesting color patterns/animations, but these examples have been lost.

OpenGL Experiments

(Image of NewGL app)

(Image of NewGLCrate app)

(Image of TestStars app)

In these examples, I do some fancy stuff with OpenGL. What I did was follow the NeHe OpenGL tutorials, which was originally intended for C++, and implemented it assembly language.

Sound Experiments

(Image of DirectSoundTest app)

(Image of DirectSoundTest2 app)

(Image of Guitar app)

(Image of Guitar16 app)

The above were my attempts at generating sounds using DirectSound. The first two programs are simple waveform generators. The second two not only display the correct frets for several common guitar chords, are capable of generating the waveform for these chords.

Networking

(Image of TCPTest app)

(Image of TCPAsync app)

These programs are functional TCP clients written in assembly language. Interestingly, the program is multi-threaded, which keeps it responsive.

Virtual Memory Tests

(Image of VirtualMemory app)

This program explores the interesting Windows feature known as PAGE_GUARD, which I use here as a “hook” to determine when a given page in RAM has been accessed.