summaryrefslogtreecommitdiffstats
path: root/include16/sys16.h
diff options
context:
space:
mode:
Diffstat (limited to 'include16/sys16.h')
-rw-r--r--include16/sys16.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include16/sys16.h b/include16/sys16.h
new file mode 100644
index 0000000..6f5f6c6
--- /dev/null
+++ b/include16/sys16.h
@@ -0,0 +1,25 @@
+#ifndef SYS16_H
+#define SYS16_H
+
+#ifdef __SYS16__
+# define _PTR16(x) x
+#else
+# define _PTR16(x) unsigned int
+#endif
+
+struct system_struct {
+ unsigned int seg_base;
+ int argc;
+ _PTR16(char **)argv;
+};
+
+#undef _PTR16
+
+#define SYS_STRUCT_ADDR 0xf000
+
+#ifdef __SYS16__
+# define SYS ((struct system_struct *)SYS_STRUCT_ADDR)
+# define _KPTR(x) ((unsigned int)(x) + SYS->seg_base)
+#endif
+
+#endif /* SYS16_H */