Guest User

Untitled

a guest
Jun 22nd, 2012
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include "scheduler.h"
  2. #include "kernel.h"
  3. #include "ports.h"
  4. #include "console.h"
  5. #include "multiboot.h"
  6. #include "pmm.h"
  7. #include "string.h"
  8.  
  9. void kernel_main(struct multiboot_info* mb_info) {
  10.     struct multiboot_module* modules = mb_info->mi_mods_addr;
  11.     size_t length = modules[0].end - modules[0].start;
  12.     void* load_addr = (void*) 0x200000;
  13.  
  14.     memcpy(load_addr, (void*) modules[0].start, length);
  15.     init_task(load_addr);
  16.  
  17.     while(1) { }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment