kern

diff src/main.c @ 43:5f6c5751ae05

- implemented clone_vmem
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 25 Jul 2011 11:29:02 +0300
parents 928b0ebfff4d
children f65b348780e3
line diff
     1.1 --- a/src/main.c	Sun Jul 24 18:29:24 2011 +0300
     1.2 +++ b/src/main.c	Mon Jul 25 11:29:02 2011 +0300
     1.3 @@ -10,35 +10,6 @@
     1.4  #include "mem.h"
     1.5  #include "vm.h"
     1.6  
     1.7 -static void do_nothing();
     1.8 -
     1.9 -/* special keys */
    1.10 -enum {
    1.11 -	LALT, RALT,
    1.12 -	LCTRL, RCTRL,
    1.13 -	LSHIFT, RSHIFT,
    1.14 -	F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
    1.15 -	CAPSLK, NUMLK, SCRLK, SYSRQ,
    1.16 -	ESC		= 27,
    1.17 -	INSERT, DEL, HOME, END, PGUP, PGDN, LEFT, RIGHT, UP, DOWN,
    1.18 -	NUM_DOT, NUM_ENTER, NUM_PLUS, NUM_MINUS, NUM_MUL, NUM_DIV,
    1.19 -	NUM_0, NUM_1, NUM_2, NUM_3, NUM_4, NUM_5, NUM_6, NUM_7, NUM_8, NUM_9,
    1.20 -	BACKSP	= 127
    1.21 -};
    1.22 -
    1.23 -/* table with rough translations from set 1 scancodes to ASCII-ish */
    1.24 -static int keycodes[] = {
    1.25 -	0, ESC, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '\b',		/* 0 - e */
    1.26 -	'\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n',			/* f - 1c */
    1.27 -	LCTRL, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '`',				/* 1d - 29 */
    1.28 -	LSHIFT, '\\', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', RSHIFT,			/* 2a - 36 */
    1.29 -	NUM_MUL, LALT, ' ', CAPSLK, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10,			/* 37 - 44 */
    1.30 -	NUMLK, SCRLK, NUM_7, NUM_8, NUM_9, NUM_MINUS, NUM_4, NUM_5, NUM_6, NUM_PLUS,	/* 45 - 4e */
    1.31 -	NUM_1, NUM_2, NUM_3, NUM_0, NUM_DOT, SYSRQ, 0, 0, F11, F12,						/* 4d - 58 */
    1.32 -	0, 0, 0, 0, 0, 0, 0,															/* 59 - 5f */
    1.33 -	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,									/* 60 - 6f */
    1.34 -	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0									/* 70 - 7f */
    1.35 -};
    1.36  
    1.37  void kmain(struct mboot_info *mbinf)
    1.38  {
    1.39 @@ -72,13 +43,6 @@
    1.40  
    1.41  
    1.42  	for(;;) {
    1.43 -		char c, keypress;
    1.44 -		do {
    1.45 -			inb(keypress, 0x64);
    1.46 -		} while(!(keypress & 1));
    1.47 -		inb(c, 0x60);
    1.48 -		if(!(c & 0x80)) {
    1.49 -			putchar(keycodes[(int)c]);
    1.50 -		}
    1.51 +		halt_cpu();
    1.52  	}
    1.53  }