GCC and simple VGA graphics?
Posted: Sat Sep 21, 2013 7:47 pm
Hey folks,
Im working on a kernal that needs some simple VGA routines (setpixel, etc). Are there some examples out there that I can look at? Right now, I have the following. It compiles, but in Qemu, it just reboots back to GRUB:
From what Ive read, I should be seeing a blue line. Do we have any very simple graphics routines out there, or can someone tell me what Im doing wrong? I dont think Im using protected mode. (Im using this tutorial: http://wiki.osdev.org/Bare_bones). Im wanting just a simple 320 x 200 8bit screen.
Im working on a kernal that needs some simple VGA routines (setpixel, etc). Are there some examples out there that I can look at? Right now, I have the following. It compiles, but in Qemu, it just reboots back to GRUB:
Code: Select all
asm("mov %ax, 0x13");
asm("int $0x10");
unsigned char* p = (unsigned char*)0xa0000;
for(zz=0; zz=100; zz++)
p[zz]=1;