So, last time I was trying to use GNU tools only for the projects in the book. After the break I felt that I was going nowhere with that and decided to go with the tools provided with the book for now. That way I could learn about programming OSses and could learn how to compile it on more general tools later (since compiling is the boring part anyways).
To use the precompiled tools, I only had to do some adjustments to the Makefile of the project, to use wine and replace some copy commands with GNU/Linux alternatives. Then I readily went onwards to do some graphics using the basic VGA, 8-bit 320x200 mode. (the book goes for the graphics first, since, well, it's fun to see the results on the screen and learn the smaller details on the way).
After setting up the palette, I made some simple line and square drawing. One of the interesting things there was how to draw lines, so I headed to wikipedia and found an usable algorithm, called the Bresenham's line algorithm, and it was easy to understand and implement in C by looking at the pseudocode.
Here's a screenshot of the program drawing the Finnish national flag, paying respect to the indepence day on 6th December:
[ add comment ] ( 506 views ) | permalink | print article | ( 3 / 712 )