summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--com32.h49
2 files changed, 50 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a3cd0839..e0f5de7b 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,7 @@ SOURCES = $(CSRC) $(NASMSRC) *.inc
BTARGET = kwdhash.gen version.gen ldlinux.bss ldlinux.sys ldlinux.bin \
pxelinux.0 mbr.bin isolinux.bin isolinux-debug.bin
ITARGET = syslinux.com syslinux copybs.com gethostip
-DOCS = COPYING NEWS README TODO *.doc sample
+DOCS = COPYING NEWS README TODO *.doc sample com32.h
OTHER = Makefile bin2c.pl now.pl genhash.pl keywords findpatch.pl \
keytab-lilo.pl version version.pl sys2ansi.pl \
ppmtolss16 lss16toppm memdisk
diff --git a/com32.h b/com32.h
new file mode 100644
index 00000000..21415afe
--- /dev/null
+++ b/com32.h
@@ -0,0 +1,49 @@
+/* ----------------------------------------------------------------------- *
+ * Not Copyright 2002 H. Peter Anvin
+ * This file is in the public domain.
+ * ----------------------------------------------------------------------- */
+
+/*
+ * com32.h
+ *
+ * Common declarations for com32 programs.
+ */
+
+#ifndef _COM32_H
+#define _COM32_H
+
+
+/*
+ * This structure defines the register frame used by the
+ * system call interface.
+ *
+ * The syscall interface is:
+ *
+ * __syscall(<interrupt #>, <source regs>, <return regs>)
+ */
+typedef struct {
+ unsigned short gs; /* Offset 0 */
+ unsigned short fs; /* Offset 2 */
+ unsigned short es; /* Offset 4 */
+ unsigned short ds; /* Offset 6 */
+
+ unsigned int edi; /* Offset 8 */
+ unsigned int esi; /* Offset 12 */
+ unsigned int ebp; /* Offset 16 */
+ unsigned int _unused; /* Offset 20 */
+ unsigned int ebx; /* Offset 24 */
+ unsigned int edx; /* Offset 28 */
+ unsigned int ecx; /* Offset 32 */
+ unsigned int eax; /* Offset 36 */
+
+ unsigned int eflags; /* Offset 40 */
+} com32sys_t;
+
+/* The standard prototype for _start() */
+int _start(unsigned int __nargs,
+ char *__cmdline,
+ void (*__syscall)(unsigned char, com32sys_t *, com32sys_t *),
+ void *__bounce_ptr,
+ unsigned int __bounce_len);
+
+#endif /* _COM32_H */