In progress

This commit is contained in:
hyperassembler 2014-09-24 12:23:46 -04:00
parent 355ca2e38e
commit ca8ad1c70d
14 changed files with 56 additions and 21 deletions

View File

@ -1,9 +0,0 @@
#ifndef _IO32_H_
#define _IO32_H_
#include "type32.h"
extern void HkWritePort(uint16 port, uint16 data);
extern void HkReadPort(uint16 port, uint16 data);
#endif

View File

View File

@ -1,11 +0,0 @@
#ifndef _TYPE_H_
#define _TYPE_H_
typedef unsigned int uint32;
typedef unsigned short uint16;
typedef unsigned long long uint64;
typedef unsigned char uint8;
typedef int int32;
typedef short int16;
typedef long long int64;
typedef char int8;
#endif

View File

View File

@ -3,7 +3,7 @@
#include "type.h"
typedef struct
{
UINT32 type;
UINT
UINT32 size;
} MULTIBOOT_TAG, *PMULTIBOOT_TAG;
#endif

10
kclib/x86/hdr/io32.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef _IO32_H_
#define _IO32_H_
#include "type32.h"
extern void HkWritePort(UINT16 port, UINT16 data);
extern void HkReadPort(UINT16 port, UINT16 data);
#endif

20
kclib/x86/hdr/mem32.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef _MEM_32_H_
#define _MEM_32_H_
#include "../hdr/io32.h"
#pragma push()
#pragma pack(1)
typedef struct
{
UINT16 LimitLow;
UINT16 BaseLow;
UINT8 BaseMid;
UINT8 AccessByte;
UINT8 FlagLimitMid;
UINT8 BaseHigh;
} GDT_DESCRIPTOR;
#pragma pop()
#endif

11
kclib/x86/hdr/type32.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef _TYPE_H_
#define _TYPE_H_
typedef unsigned int UINT32;
typedef unsigned short UINT16;
typedef unsigned long long UINT64;
typedef unsigned char UINT8;
typedef int INT32;
typedef short INT16;
typedef long long INT64;
typedef char INT8;
#endif

12
kclib/x86/src/entry.c Normal file
View File

@ -0,0 +1,12 @@
#include "../hdr/type32.h"
#include "../hdr/grub.h"
UINT32 HkKernelEntry()
{
//setup new gdt
//setup paging
//setup interrupt
//setup process
}

2
kclib/x86/src/io32.c Normal file
View File

@ -0,0 +1,2 @@
#include "../hdr/io32.h"
#include "../hdr/type32.h"