blob: cb8c5e4a6b143dc89a2ef8dc4ac98596126fd4c1 (
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
42
43
44
45
|
#include "libc/stdio.h"
#include "boot/multiboot.h"
#include "core/mem.h"
#include "core/gdt.h"
#include "core/paging.h"
#include "core/scheduler.h"
extern void interrupt_enable();
void utask(){
char *msg=(char*)4206592+10;
msg[0]='T';
msg[1]='a';
msg[2]='s';
msg[3]='k';
msg[4]='1';
msg[5]='\0';
asm("mov $0x1, %%eax;int $0x30"::"b"(msg));
while(1);
}
void bringelle(){
clear();
printc("Booting Bringelle...\n",GREEN);
// ----- Kernel boot sequence
interrupt_enable();
print("Interrupts enabled\n");
paging_enable();
print("Paging enable\n");
print("Kernel started!\n");
print("-----------------------\n");
show_tics=1;
// Utask
print("Launch user task \n");
int* page_dir=paging_allocate(2);
run_task(page_dir, utask,100);
while(1);
}
|