Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

64 Zeilen
1.7 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$
  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 "config.h"
  17. #include "caca_types.h"
  18. #ifdef __KERNEL__
  19. #include "klibc.h"
  20. #include "boot/stage2.h"
  21. #include "kernel.h"
  22. #include "drivers/processor.h"
  23. #include "drivers/floppy.h"
  24. #include "drivers/timer.h"
  25. extern char const * const * caca_get_display_driver_list(void);
  26. /* C entry point, called from stage2 */
  27. int kmain(void)
  28. {
  29. struct processor_info processor_info;
  30. struct floppy_info floppy_info;
  31. printf("_start at 0x%x\n", _start);
  32. printf("kmain() at 0x%x\n", kmain);
  33. printf("Types : char[%d] int[%d] long[%d] unsigned long long[%d]\n", sizeof(char), sizeof(int), sizeof(long), sizeof(unsigned long long));
  34. enable_interrupt(1); // Enable Keyboard Interrupt (IRQ1)
  35. enable_interrupt(0); // Enable IRQ0 (timer)
  36. enable_interrupt(13);
  37. timer_phase(100); // Fire IRQ0 each 1/100s
  38. processor_get_info(&processor_info);
  39. processor_print_info(&processor_info);
  40. floppy_get_info(&floppy_info);
  41. floppy_print_info(&floppy_info);
  42. //caca_get_display_driver_list();
  43. printf("Entering kernel infinite loop.\n");
  44. while (1)
  45. {
  46. }
  47. }
  48. #endif /* __KERNEL__ */