comparison cos/kernel/kernel.h @ 14:a58904747019

Added asm interrupt handler things, not yet working
author windel
date Mon, 14 Nov 2011 22:45:55 +0100
parents d07d4701a103
children f3e3e0e9c4bc
comparison
equal deleted inserted replaced
13:d07d4701a103 14:a58904747019
17 17
18 void printf(const char* fmt, ... ); 18 void printf(const char* fmt, ... );
19 void memset(void* ptr, uint32_t value, uint32_t num); 19 void memset(void* ptr, uint32_t value, uint32_t num);
20 void memcpy(void* dst, void* src, uint32_t num); 20 void memcpy(void* dst, void* src, uint32_t num);
21 21
22 struct IDT_entry {
23 unsigned char b[8];
24 };
25
22 // memory alloc functions: 26 // memory alloc functions:
23 void* malloc(size_t size); 27 void* malloc(size_t size);
24 void free(void* ptr); 28 void free(void* ptr);
25 29
26 void clear_screen(); 30 void clear_screen();
28 void print_string(const char *); 32 void print_string(const char *);
29 33
30 // For IO ports: 34 // For IO ports:
31 unsigned char inb(unsigned short); 35 unsigned char inb(unsigned short);
32 void outb(unsigned short, unsigned char); 36 void outb(unsigned short, unsigned char);
37
38 // ASM helper:
39 int loadIDT(struct IDT_entry *table, unsigned short size);
40 void halt(void);
33 41
34 void setupIDT(void); 42 void setupIDT(void);
35 void PICremap(void); 43 void PICremap(void);
36 // Assembler util functions: 44 // Assembler util functions:
37 void enableinterrupts(void); 45 void enableinterrupts(void);