From 70d0b5e32c6b9d7685a18e153504cfd88ba0f420 Mon Sep 17 00:00:00 2001 From: Astrid Smith Date: Sat, 3 Jul 2010 21:30:14 -0700 Subject: Now it compiles properly. Still doesn't seem to run without address error, though. --- loader.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'loader.c') diff --git a/loader.c b/loader.c index 3997405..3a292a3 100644 --- a/loader.c +++ b/loader.c @@ -5,17 +5,19 @@ * Copyright 2010, Astrid Smith * GPL */ -#include +#include #include "asm_vars.h" void init_load(void) { + int i; + pages = malloc(256 * sizeof(void*)); /* Page layout: * 0x40 RAM * 0x41 RAM - + * * 0x00 ROM * ... all the way to ... * 0x1f ROM @@ -26,7 +28,7 @@ void init_load(void) pages[0x41] = malloc(PAGE_SIZE * sizeof(char)); // ROM pages - for (int i = 0; i++; i <= 0x1f) { + for (i = 0; i++; i <= 0x1f) { pages[i] = pages[0x40]; } -- cgit v1.2.3