kern

diff src/main.c @ 33:373a9f50b4e6

8254 timer code
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 08 Jun 2011 03:02:42 +0300
parents 3ed041d07ae1
children e70b1ab9613e
line diff
     1.1 --- a/src/main.c	Fri May 27 13:08:23 2011 +0300
     1.2 +++ b/src/main.c	Wed Jun 08 03:02:42 2011 +0300
     1.3 @@ -5,11 +5,10 @@
     1.4  #include "asmops.h"
     1.5  #include "segm.h"
     1.6  #include "intr.h"
     1.7 +#include "timer.h"
     1.8  #include "mem.h"
     1.9  #include "vm.h"
    1.10  
    1.11 -static void do_nothing();
    1.12 -
    1.13  /* special keys */
    1.14  enum {
    1.15  	LALT, RALT,
    1.16 @@ -55,8 +54,7 @@
    1.17  	init_segm();
    1.18  	init_intr();
    1.19  
    1.20 -	/* silence the blasted timer interrupt */
    1.21 -	interrupt(32, do_nothing);
    1.22 +	init_timer();
    1.23  
    1.24  	/* initialize the physical memory manager */
    1.25  	init_mem(mbinf);
    1.26 @@ -66,27 +64,6 @@
    1.27  	/* initialization complete, enable interrupts */
    1.28  	enable_intr();
    1.29  
    1.30 -	dbg_print_vm(MEM_USER);
    1.31 -	dbg_print_vm(MEM_KERNEL);
    1.32 -
    1.33 -	{
    1.34 -		void *foo, *bar, *xyzzy, *koko, *lala;
    1.35 -
    1.36 -		foo = malloc(128);
    1.37 -		bar = malloc(32 * 1024);
    1.38 -		xyzzy = malloc(8000);
    1.39 -
    1.40 -		free(bar);
    1.41 -
    1.42 -		koko = malloc(700);
    1.43 -		lala = malloc(6 * 1024 * 1024);
    1.44 -
    1.45 -		free(xyzzy);
    1.46 -		free(foo);
    1.47 -		free(koko);
    1.48 -		free(lala);
    1.49 -	}
    1.50 -
    1.51  	for(;;) {
    1.52  		char c, keypress;
    1.53  		do {
    1.54 @@ -98,7 +75,3 @@
    1.55  		}
    1.56  	}
    1.57  }
    1.58 -
    1.59 -static void do_nothing()
    1.60 -{
    1.61 -}