Import backup from 2003-08-26

This commit is contained in:
Josh Holtrop 2003-08-26 22:00:00 -04:00
parent 449917d434
commit c968aa28ac
6 changed files with 51 additions and 1 deletions

View File

@ -17,7 +17,7 @@
%define BOOT_VESA_VBE 0x0106 ;512 - copy of VESA VBEInfoBlock
%define BOOT_VESA_INFO 0x0306 ;256 - copy of VESA ModeInfoBlock for selected mode
%define BOOT_MEMENTRIES 0x040A ;4 - dword = number of memmap entries
%define BOOT_MEMMAP 0x040E ;? - memory map information
%define BOOT_MEMMAP 0x2000 ;? - memory map information

12
io.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef __HIO_H__
#define __HIO_H__ __HIO_H__
void writeCursorPosition(dword pos);
dword getCursorPosition();
void putc(byte chr);
int printf(char *fmt, ...);
#endif

View File

@ -36,5 +36,12 @@ typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned int dword;
typedef struct {
dword lowdword;
dword highdword;
} __attribute__((packed)) qword;

View File

@ -5,10 +5,12 @@
#include "k_defines.h"
#include "functions.h"
#include "video.h"
#include "mm.h"
void isr(dword num);
void k_init();
#include "mm.c"
#include "functions.c"
#include "video.c"

12
mm.c Normal file
View File

@ -0,0 +1,12 @@
void mm_init()
{
dword *memmap_entries = 0x9040A;
memmap_entry *maps = 0x92000;
}

17
mm.h Normal file
View File

@ -0,0 +1,17 @@
void mm_init();
typedef struct {
qword base;
qword length;
dword attributes;
} __attribute__((packed)) memmap_entry;