aboutsummaryrefslogtreecommitdiff
path: root/src/bringelle.c
blob: 5fd315b5d6897cdad870bc37fa299e7b5b21213e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "libc/stdio.h"
#include "utils/pic.h"
#include "boot/multiboot.h"
#include "utils/mem.h"

char show_tics=0;

void utask(){
  while(1);
}

void bringelle(){
  clear();
  printc("Booting Bringelle...\n",GREEN);

  // Kernel boot sequence
  pic_enable_interrupt();
  print("Interrupts enabled!\n");


  // Utask
  memcpy((void*)utask,(void*)0x300000, 100); // 100 bytes seems reasonable to load utask

  print("Kernel started ");
  show_tics=1;
  while(1);
}

void clock(){
  static int tic=0;
  static int sec=0;
  tic++;
  if(tic>=20){
    tic=0;
    sec++;
    if(show_tics)
      putchar('.');
  }
}