summaryrefslogtreecommitdiff
path: root/loader.c
diff options
context:
space:
mode:
authorAstrid Smith2010-07-03 21:30:14 -0700
committerAstrid Smith2010-07-03 21:30:14 -0700
commit70d0b5e32c6b9d7685a18e153504cfd88ba0f420 (patch)
treefd90c61dd77026d1c10e0ee1de2c7edc2cb1391e /loader.c
parent3f191892ed3dd8a9f8ad81cb039468d3ef2aa172 (diff)
Now it compiles properly. Still doesn't seem to run without address error, though.
Diffstat (limited to 'loader.c')
-rw-r--r--loader.c8
1 files changed, 5 insertions, 3 deletions
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 <tigcc.h>
+#include <tigcclib.h>
#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];
}