You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
1.2 KiB

  1. /*
  2. * libcaca
  3. * libcaca Colour ASCII-Art library
  4. * Copyright (c) 2006 Sam Hocevar <sam@hocevar.net>
  5. * 2009 Jean-Yves Lamoureux <jylam@lnxscene.org>
  6. * All Rights Reserved
  7. *
  8. * $Id: kernel.h 4154 2009-12-20 13:33:11Z jylam $
  9. *
  10. * This library is free software. It comes without any warranty, to
  11. * the extent permitted by applicable law. You can redistribute it
  12. * and/or modify it under the terms of the Do What The Fuck You Want
  13. * To Public License, Version 2, as published by Sam Hocevar. See
  14. * http://sam.zoy.org/wtfpl/COPYING for more details.
  15. */
  16. #include "kernel.h"
  17. #include "klibc.h"
  18. extern int kmain(void);
  19. /* Entry point bootsect.asm loaded this file at 0x0100:0x0, which is mapped
  20. at 0x8:0x1000 (selector+8bytes, offset 1000 (0x100 + 0x0) */
  21. /* 0x1000 */
  22. void _start(void)
  23. {
  24. clearscreen();
  25. init_gdt();
  26. print("Loading IDT\n");
  27. init_idt();
  28. print("Loading PIC\n");
  29. init_pic();
  30. print("Running kmain()\n");
  31. sti;
  32. kmain(); /* Call kernel's kmain() */
  33. while (1)
  34. { /* Never return */
  35. print("hlt;\n");
  36. }
  37. }