summaryrefslogtreecommitdiffhomepage
path: root/src/loader/inc/real.h
diff options
context:
space:
mode:
authorMarvin Borner2021-07-12 18:14:44 +0200
committerMarvin Borner2021-07-12 18:15:29 +0200
commit1b429c0fc28e5cd8b474ad5a1de1fa6f3d7c2e2a (patch)
tree593af3e3ec78795bb47553f492db07fb7e87e373 /src/loader/inc/real.h
parentd414d2f6f46bd425d727af5baae3e2658d6e1384 (diff)
Renamed files to match presentation
Diffstat (limited to 'src/loader/inc/real.h')
-rw-r--r--src/loader/inc/real.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/loader/inc/real.h b/src/loader/inc/real.h
new file mode 100644
index 0000000..a9d36dc
--- /dev/null
+++ b/src/loader/inc/real.h
@@ -0,0 +1,29 @@
+// MIT License, Copyright (c) 2021 Marvin Borner
+// Real mode emulation - Implementation by Napalm (see rem.asm)
+
+#ifndef REAL_H
+#define REAL_H
+
+#include <def.h>
+
+#define EFLAGS_CF (1 << 0) // Carry flag
+#define EFLAGS_ZF (1 << 6) // Zero flag
+
+struct real_regs {
+ u16 gs;
+ u16 fs;
+ u16 es;
+ u16 ds;
+ u32 eflags;
+ u32 ebp;
+ u32 edi;
+ u32 esi;
+ u32 edx;
+ u32 ecx;
+ u32 ebx;
+ u32 eax;
+} PACKED;
+
+void real_int(u8 interrupt_num, struct real_regs *out_regs, struct real_regs *in_regs);
+
+#endif