Changeset 573 for libcaca/trunk/kernel
- Timestamp:
- Mar 9, 2006, 4:35:00 PM (16 years ago)
- Location:
- libcaca/trunk/kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/kernel/kernel.c
r568 r573 30 30 void cmain(unsigned long int magic, unsigned long int addr) 31 31 { 32 static char const text[] = "Booting libcaca kernel..."; 33 char const *ptr = text; 34 char *video = (char*)0xB8000; 35 32 36 char *argv[] = { NULL }; 33 37 int argc = 0; 38 39 /* Print a text message to say hello */ 40 while(*ptr) 41 *video = *ptr++; video += 2; 42 43 /* Launch the main program */ 34 44 main(argc, argv); 35 45 } -
libcaca/trunk/kernel/kernel.h
r568 r573 28 28 #define __BIG_ENDIAN 2 29 29 30 /* Assembly code for outb and inb */ 31 extern inline void outb(unsigned char val, unsigned short port); 32 extern inline unsigned char inb(unsigned short port); 33 34 extern inline void outb(unsigned char val, unsigned short port) 35 { 36 __asm__ __volatile__ ("outb %b0,%w1" : : "a" (val), "Nd" (port)); 37 } 38 39 extern inline unsigned char inb(unsigned short port) 40 { 41 unsigned char tmp; 42 __asm__ __volatile__ ("inb %w1,%0" : "=a" (tmp) : "Nd" (port)); 43 return tmp; 44 } 45 30 46 /* Various typedefs -- some are x86-specific */ 31 47 #define CUSTOM_INTTYPES 32 48 typedef unsigned char uint8_t; 33 49 typedef unsigned short uint16_t; 34 typedef unsigned int uint32_t; 35 typedef unsigned int uintptr_t; 50 typedef unsigned long int uint32_t; 51 typedef long int intptr_t; 52 typedef long unsigned int uintptr_t; 36 53 37 54 typedef unsigned int size_t;
Note: See TracChangeset
for help on using the changeset viewer.