lesson 23, step 3

This commit is contained in:
Carlos
2015-08-18 10:31:28 +02:00
parent 92ff191c3d
commit de3d442569
18 changed files with 124 additions and 127 deletions

View File

@@ -3,6 +3,7 @@
#include "kernel.h"
#include "../libc/string.h"
#include "../libc/mem.h"
#include <stdint.h>
void kernel_main() {
isr_install();
@@ -18,8 +19,8 @@ void user_input(char *input) {
asm volatile("hlt");
} else if (strcmp(input, "PAGE") == 0) {
/* Lesson 22: Code to test kmalloc, the rest is unchanged */
u32 phys_addr;
u32 page = kmalloc(1000, 1, &phys_addr);
uint32_t phys_addr;
uint32_t page = kmalloc(1000, 1, &phys_addr);
char page_str[16] = "";
hex_to_ascii(page, page_str);
char phys_str[16] = "";