Hacker emblem in VGA bios

I wrote a code for VGA 0x13 (256 color) mode which gives us 320x200 64000 bytes at 0xa000:0000 each one of those represent a pixel since this is 256 mode each pixel represent 8bits. Colors are codes from 0-15.

We start by initalizing the video mode

Then we set the back ground to black where dx is the beginning of our vga 0xa000. We set each pixel to black

We can make horizontal lines and vertical lines by moving across x, y axis with [min,max] bounds. The circles is a little more complicated than doing lines or squares. I first tried to do the circles using x87 FPU trigs and such but that was a little confusing so I did it this way.

This divides the circle into 8 parts pi/4's 4 reds and 4 whites. Anyway the last result looks something like this... I really have no artistic talent :<

Code can be found at this gist

images/hackeremblem.png

Proxied content from gemini://0x80.org/gemlog/2014-08-10-hacker-emblem-in-vga-bios.gmi.
Get a proper gemini browser and visit!

Gemini request details:

Original URL
gemini://0x80.org/gemlog/2014-08-10-hacker-emblem-in-vga-bios.gmi
Status code
20
Meta
text/gemini;lang=en-US