aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarvin Borner2020-08-01 16:01:29 +0200
committerMarvin Borner2020-08-01 16:01:29 +0200
commitaf80895e50ddacbbe68b47650f29d0f8edbc82d7 (patch)
tree83da98cd808df0e615ad93713a09f077a2d4c0d8 /src
parent115f4ff541839f7a97f9413e1ac3ff7695c24c9e (diff)
Switched to main
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);