Document the new structure definitions.
authorhpa <hpa>
Wed, 12 Jun 2002 23:20:52 +0000 (23:20 +0000)
committerhpa <hpa>
Wed, 12 Jun 2002 23:20:52 +0000 (23:20 +0000)
comboot.doc

index 9985b90..c5e76ad 100644 (file)
@@ -82,12 +82,13 @@ The following arguments are passed to the program on the stack:
  [ESP+16] dword Pointer to low memory bounce buffer
  [ESP+20] dword Size of low memory bounce buffer
 
-This corresponds to the following C prototype, available in the file com32.h:
+This corresponds to the following C prototype, available in the file
+com32/include/com32.h:
 
 /* The standard prototype for _start() */
 int _start(unsigned int __nargs,
           char *__cmdline,
-          void (*__syscall)(unsigned char, com32sys_t *, com32sys_t *),
+          void (*__syscall)(uint8_t, com32sys_t *, com32sys_t *),
           void *__bounce_ptr,
           unsigned int __bounce_len);
 
@@ -96,22 +97,28 @@ API calls, and takes the interrupt number as first argument.  The
 second argument is a pointer to the input register definition, an
 instance of the following structure (also available in com32.h):
 
+typedef union {
+  uint32_t l;
+  uint16_t w[2];
+  uint8_t  b[4];
+} reg32_t;
+
 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 */
+  uint16_t gs;                 /* Offset  0 */
+  uint16_t fs;                 /* Offset  2 */
+  uint16_t es;                 /* Offset  4 */
+  uint16_t ds;                 /* Offset  6 */
+
+  reg32_t edi;                 /* Offset  8 */
+  reg32_t esi;                 /* Offset 12 */
+  reg32_t ebp;                 /* Offset 16 */
+  reg32_t _unused;             /* Offset 20 */
+  reg32_t ebx;                 /* Offset 24 */
+  reg32_t edx;                 /* Offset 28 */
+  reg32_t ecx;                 /* Offset 32 */
+  reg32_t eax;                 /* Offset 36 */
+
+  reg32_t eflags;              /* Offset 40 */
 } com32sys_t;
 
 The third argument is a pointer to the output register definition, an