From 45603a52e25812054bc15644086fe7b8d6ff097f Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 28 Sep 2015 19:03:33 -0700 Subject: fix build bug in mod_mem_map and actually use it --- src/boot/mod_mem_map.c | 4 ++++ src/kernel/main.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/boot/mod_mem_map.c b/src/boot/mod_mem_map.c index 0e89ee7..701a12e 100644 --- a/src/boot/mod_mem_map.c +++ b/src/boot/mod_mem_map.c @@ -2,6 +2,10 @@ #include "../output/vga_character.h" +__asm__(".code16gcc\n"); + void populate_memory_map(void) { vga_graphics_write_str("pretend i populated the memory map, ok?"); + vga_graphics_write_str(" system_memory_map = "); + vga_graphics_byte_hex(0x10); } diff --git a/src/kernel/main.c b/src/kernel/main.c index 4e9a580..a113cbc 100644 --- a/src/kernel/main.c +++ b/src/kernel/main.c @@ -1,6 +1,7 @@ __asm__(".code16gcc\n"); #include "../output/vga_character.h" +#include "../boot/mod_mem_map.h" char foo[] = "hello how are you"; @@ -13,5 +14,7 @@ void _start() { vga_graphics_write(':'); vga_graphics_write(' '); vga_graphics_byte_hex(0x40); + populate_memory_map(); + while(1) { } } -- cgit v1.1