Initial commit
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#ifndef __GDT_H
|
||||
#define __GDT_H
|
||||
|
||||
void gdt_set_gate(int num, unsigned long base, unsigned long limit, unsigned char access, unsigned char gran);
|
||||
void gdt_install();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef __IDT_H
|
||||
#define __IDT_H
|
||||
|
||||
void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags);
|
||||
void idt_install();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef __SCRN_H
|
||||
#define __SCRN_H
|
||||
|
||||
extern void cls();
|
||||
extern void putch(unsigned char c);
|
||||
extern void puts(unsigned char *str);
|
||||
extern void settextcolor(unsigned char forecolor, unsigned char backcolor);
|
||||
extern void init_video();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef __SYSTEM_H
|
||||
#define __SYSTEM_H
|
||||
|
||||
/* MAIN.C */
|
||||
extern unsigned char *memcpy(unsigned char *dest, const unsigned char *src, int count);
|
||||
extern unsigned char *memset(unsigned char *dest, unsigned char val, int count);
|
||||
extern unsigned short *memsetw(unsigned short *dest, unsigned short val, int count);
|
||||
extern int strlen(const char *str);
|
||||
extern unsigned char inportb (unsigned short _port);
|
||||
extern void outportb (unsigned short _port, unsigned char _data);
|
||||
/* ISRS.C */
|
||||
void isrs_install();
|
||||
/* This defines what the stack looks like after an ISR was running */
|
||||
struct regs
|
||||
{
|
||||
unsigned int gs, fs, es, ds; /* pushed the segs last */
|
||||
unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax; /* pushed by 'pusha' */
|
||||
unsigned int int_no, err_code; /* our 'push byte #' and ecodes do this */
|
||||
unsigned int eip, cs, eflags, useresp, ss; /* pushed by the processor automatically */
|
||||
};
|
||||
/* IRQ.C */
|
||||
void irq_install_handler(int irq, void (*handler)(struct regs *r));
|
||||
void irq_uninstall_handler(int irq);
|
||||
void irq_install();
|
||||
/* TIMER.C */
|
||||
void timer_handler(struct regs *r);
|
||||
void timer_install();
|
||||
/* KB.C */
|
||||
void kb_install();
|
||||
#endif
|
||||
Reference in New Issue
Block a user