aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/features/load.c3
-rw-r--r--src/inc/load.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/features/load.c b/src/features/load.c
index 37ed6ad..47beb9b 100644
--- a/src/features/load.c
+++ b/src/features/load.c
@@ -1,5 +1,6 @@
#include <def.h>
#include <fs.h>
+#include <load.h>
#include <print.h>
void bin_load(char *path)
@@ -7,7 +8,7 @@ void bin_load(char *path)
char *data = read_file(path);
void (*entry)();
- *(void **)(&entry) = data + 0xfe;
+ *(void **)(&entry) = data + MAIN_OFFSET;
entry();
}
diff --git a/src/inc/load.h b/src/inc/load.h
index afca249..8ba026b 100644
--- a/src/inc/load.h
+++ b/src/inc/load.h
@@ -3,7 +3,7 @@
#ifndef LOAD_H
#define LOAD_H
-#include <def.h>
+#define MAIN_OFFSET 0xfe
void bin_load(char *path);