Monthly Archives: March 2011

Representing Rotations as Quaternions

Quaternions are mathematical constructs that can be used to rotate a geometrical point through a particular angle around a particular axis. They avoid many of the problems associated with performing rotations using Euler angles (yaw, pitch, roll), notably the phenomenon … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Entering Protected Mode from x86 Assembly

Intel’s 8086 chip was in no small part responsible for launching the personal computer revolution, but its 20-bit address bus could only access one megabyte of memory, and only half of that was available to user programs. As programs got … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Displaying Text in Assembly without Interrupts

The BIOS provides a lot of standard interrupt routines for writing text to the display, which is useful. But unfortunately, you can’t really call any of them from protected mode. Since most modern programs spend most of their time in … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment

VGA Mode 13h in Assembly with Direct Memory Writes

Pushing pixels. Bit blitting. It’s way faster and way funner than using BIOS interrupt routines. If there is a finer way to spend a Sunday afternoon, I do not wish to hear about it. 1. Follow the steps in the … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Using VGA Graphics in Assembly Language

Nowadays, most every computer’s BIOS implements a bunch of legacy VGA modes, which, if called from any modern operating system, will only cause a rude message to be displayed. Makes you think. 1. If necessary, download and install FASM and … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments

Creating a Bootable Program in x86 Assembly Language

Booting the machine is the first step towards writing your own operating system. You’re the wind, baby. 1. Download and install the latest version of FASM (Flat Assembler), if you have not already done so. Details are given in a … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments

HelloWorld in Assembly Language

If computers were mammals, assembly language would be the limbic system. Wait, that’s a terrible analogy. Never mind. 1. Download the latest version of FASM (“Flat Assembler”), by Tomasz Grysztar. As of this writing, FASM is available at http://flatassembler.net/. 2. … Continue reading

Posted in Uncategorized | Tagged , , | 5 Comments