initial hasty attempt at porting over my VBE code
[bootcensus] / src / test / vbetest.c
1 #include <string.h>
2 #include "video.h"
3 #include "asmops.h"
4 #include "keyb.h"
5
6 static uint16_t *framebuf;
7
8 int vbetest(void)
9 {
10         if(!(framebuf = set_video_mode(640, 480, 16))) {
11                 return -1;
12         }
13
14         memset(framebuf, 0xff, 640 * 240 * 2);
15
16         while(kb_getkey() == -1) {
17                 halt_cpu();
18         }
19
20         set_vga_mode(3);
21         return 0;
22 }