kern

diff src/main.c @ 7:611b2d66420b

segment descriptors
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 16 Feb 2011 07:26:03 +0200
parents 86781ef20689
children b11a86695493
line diff
     1.1 --- a/src/main.c	Thu Jan 13 20:24:10 2011 +0200
     1.2 +++ b/src/main.c	Wed Feb 16 07:26:03 2011 +0200
     1.3 @@ -2,6 +2,7 @@
     1.4  #include "vid.h"
     1.5  #include "term.h"
     1.6  #include <asmops.h>
     1.7 +#include "segm.h"
     1.8  
     1.9  /* special keys */
    1.10  enum {
    1.11 @@ -31,12 +32,13 @@
    1.12  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0									/* 70 - 7f */
    1.13  };
    1.14  
    1.15 -
    1.16  void kmain(void)
    1.17  {
    1.18  	clear_scr();
    1.19  	puts("kernel starting up");
    1.20  
    1.21 +	init_segm();
    1.22 +
    1.23  	set_text_color(YELLOW);
    1.24  	puts("<initialization code goes here>");
    1.25  	set_text_color(LTGRAY);
    1.26 @@ -49,7 +51,7 @@
    1.27  		} while(!(keypress & 1));
    1.28  		inb(c, 0x60);
    1.29  		if(!(c & 0x80)) {
    1.30 -			putchar(keycodes[c]);
    1.31 +			putchar(keycodes[(int)c]);
    1.32  		}
    1.33  	}
    1.34  }