
/*--------------------------------------------------------------------*/
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*--------------------------------------------------------------------*/

/*--------------------------*/
/*                          */
/*                          */
/*--------------------------*/

typedef struct _VECTORTABLE *PVECTORTABLE;

/* XLATOFF */

typedef struct _VECTORTABLE
{
  /*----------------------------*/
  /* PlatForm Specific Routines */
  /*----------------------------*/

   VOID (*RealMode) ( ULONG );
   VOID (*ProtMode) ( ULONG );
   VOID (*X86_Simulator_Init)( PVOID );
   VOID (*inport)   ( ULONG, PUCHAR );
   VOID (*outport)  ( ULONG, UCHAR );
   VOID (*Disable_Interrupts) ( ULONG * );
   VOID (*Set_Interrupts)  ( ULONG );
   VOID (*cls) ( VOID );

  /*--------------------------*/
  /* Serial Routines          */
  /*--------------------------*/

   INT  (*SetBaudRate) ( INT, USHORT );
   INT  (*SerIn)       ( PUCHAR );
   VOID (*SerOut)      ( UCHAR );

  /*--------------------------*/
  /* C-Runtime Routines       */
  /*--------------------------*/

   PVOID (*memset)  ( PVOID, INT, INT );
   PVOID (*memcpy)  ( PVOID, PVOID, INT );
   PVOID (*memmove) ( PVOID, PVOID, INT );
     INT (*strlen)  ( PSZ );
     PSZ (*strcpy)  ( PSZ, PSZ );
     PSZ (*strncpy) ( PSZ d, PSZ s, INT n );
     PSZ (*strcat)  ( PSZ, PSZ );
     INT (*toupper) ( INT );
     INT (*puts)    ( PSZ );
   PVOID (*malloc)  ( LONG );
    VOID (*free)    ( PVOID );
     INT (*printf)  ( PSZ, ... );
    VOID (*sprintf) ( PSZ, PSZ, ... );

  /*--------------------------*/
  /* FILE I/O Routines        */
  /*--------------------------*/

   ULONG (*MFSOpen)        ( PSZ, PHFILE );
   ULONG (*MFSReadFileAt)  ( HFILE, ULONG, PBYTE, ULONG, PULONG );
   ULONG (*MFSWriteFileAt) ( ULONG, ULONG, PBYTE, ULONG, PULONG );
   ULONG (*MFSFlushIOBuf)  ( PVOL, PFILE );
   ULONG (*MFSGetFileInfo) ( PBYTE, PMFSFILEINFO );
   ULONG (*MFSClose)       ( ULONG );

  /*--------------------------*/
  /* Partition I/O Routines   */
  /*--------------------------*/

   ULONG (*MFSFindVol)    ( PBYTE, PVOL * );
   ULONG (*MFSRead)       ( PVOL, ULONG, PBYTE, ULONG );
   ULONG (*MFSWrite)      ( PVOL, ULONG, PBYTE, ULONG );

  /*--------------------------*/
  /* Raw I/O Routines         */
  /*--------------------------*/

} VECTORTABLE;

#ifndef NO_API

#define printf             (pVectorTable->printf)
#define inport             (pVectorTable->inport)
#define outport            (pVectorTable->outport)
#define Disable_Interrupts (pVectorTable->Disable_Interrupts)
#define Set_Interrupts     (pVectorTable->Set_Interrupts)
#define X86_Simulator_Init (pVectorTable->X86_Simulator_Init)
#define cls                (pVectorTable->cls)
#define SetBaudRate        (pVectorTable->SetBaudRate)
#define SerIn              (pVectorTable->SerIn)
#define SerOut             (pVectorTable->SerOut)
#define memset             (pVectorTable->memset)
#define memcpy             (pVectorTable->memcpy)
#define memmove            (pVectorTable->memmove)
#define strlen             (pVectorTable->strlen)
#define strcpy             (pVectorTable->strcpy)
#define strncpy            (pVectorTable->strncpy)
#define strcat             (pVectorTable->strcat)
#define toupper            (pVectorTable->toupper)
#define puts               (pVectorTable->puts)
#define malloc             (pVectorTable->malloc)
#define free               (pVectorTable->free)
#define printf             (pVectorTable->printf)
#define sprintf            (pVectorTable->sprintf)
#define MFSOpen            (pVectorTable->MFSOpen)
#define MFSReadFileAt      (pVectorTable->MFSReadFileAt)
#define MFSWriteFileAt     (pVectorTable->MFSWriteFileAt)
#define MFSFlushIOBuf      (pVectorTable->MFSFlushIOBuf)
#define MFSGetFileInfo     (pVectorTable->MFSGetFileInfo)
#define MFSClose           (pVectorTable->MFSClose)
#define MFSFindVol         (pVectorTable->MFSFindVol)
#define MFSRead            (pVectorTable->MFSRead)
#define MFSWrite           (pVectorTable->MFSWrite)

#endif

/* XLATON */

/* ASM
VECTORTABLE STRUC
   RealMode        dd  ?
   ProtMode        dd  ?
   inport          dd  ?
   outport         dd  ?
   SetBaudRate     dd  ?
   SerIn           dd  ?
   SerOut          dd  ?
   memset          dd  ?
   memcpy          dd  ?
   strlen          dd  ?
   strcpy          dd  ?
   strncpy         dd  ?
   strcat          dd  ?
   toupper         dd  ?
   malloc          dd  ?
   free            dd  ?
   printf          dd  ?
   sprintf         dd  ?
   MFSOpen         dd  ?
   MFSReadFileAt   dd  ?
   MFSWriteFileAt  dd  ?
   MFSFlushIOBuf   dd  ?
   MFSGetFileInfo  dd  ?
   MFSClose        dd  ?
   MFSFindVol      dd  ?
   MFSRead         dd  ?
   MFSWrite        dd  ?
VECTORTABLE ENDS
*/

