summaryrefslogtreecommitdiff
path: root/loader.c
diff options
context:
space:
mode:
authorDuncan Smith2010-07-03 21:30:14 -0700
committerDuncan Smith2010-07-03 21:30:14 -0700
commit9fd1320c6f4b16d7aba4476f7d6caaf7e8f6bc2c (patch)
treed93667ed6d049a5bc5f90ea422eef32a52bd911b /loader.c
parent83ed624bf8966204768a2766c58744dc06685e02 (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 64910ee..932bc3f 100644
--- a/loader.c
+++ b/loader.c
@@ -5,17 +5,19 @@
* Copyright 2010, Duncan 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];
}