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

/*----------------*/
/* MSW.ASM        */
/*----------------*/
VOID RealMode (ULONG FuncAddr);
VOID ProtMode (ULONG FuncAddr);

/*------------------*/
/* DRIVER.C         */
/*------------------*/
VOID  inport(  ULONG Port, PUCHAR pData );
VOID  outport( ULONG Port, UCHAR Data );
VOID  Disable_Interrupts ( ULONG *pCurrIntState );
VOID  Set_Interrupts ( ULONG IntState );
#ifndef puts
INT puts( PSZ s );
#endif
VOID  cls( VOID );
#ifdef _PPC
VOID  X86_Simulator_Init( PVOID X86State );
#endif

/*----------------*/
/* SERIAL.C       */
/*----------------*/
int  SetBaudRate(int port, unsigned short baud);
int  SerIn(PUCHAR pc);
void SerOut(UCHAR c);

/*----------------*/
/* LIB.C          */
/*----------------*/
#ifndef memset
PVOID memset(PVOID d, INT v, INT c);
PVOID memcpy(PVOID d, PVOID s, INT c);
PVOID memmove(PVOID d, PVOID s, INT c);
#endif
#ifndef strlen
INT strlen( PSZ s );
PSZ strcpy( PSZ d, PSZ s );
PSZ strncpy( PSZ d, PSZ s, INT n );
PSZ strcat( PSZ d, PSZ s );
#endif
#ifndef toupper
INT toupper( INT c );
#endif
#ifdef _PPC
  INT NonAlignedRef( PUCHAR p, INT len );
  #define NONALIGNED(p,m) NonAlignedRef( (PUCHAR)&(p->m), sizeof(p->m) )
#else
  #define NONALIGNED(p,m) p->m
#endif

/*------------------*/
/* HEAP.C           */
/*------------------*/
#ifndef malloc
PVOID malloc( LONG cBytes );
VOID  free( PVOID p );
#endif

/*------------------*/
/* PRTF.C           */
/*------------------*/
#ifndef printf
INT printf( PSZ fmt, ... );
VOID sprintf ( PSZ buf, PSZ fmt, ... );
#endif

/*------------------*/
/* MFSAPI.C         */
/*------------------*/
ULONG MFSOpen( PSZ pFileName, PHFILE hFile );
ULONG MFSReadFileAt( HFILE hFile, ULONG FilePos, PBYTE IOBuf, ULONG IOBytes,
                     PULONG pBytesRead );
ULONG MFSWriteFileAt( ULONG hFile, ULONG FilePos, PBYTE IOBuf, ULONG IOBytes,
                      PULONG pBytesWritten );
ULONG MFSGetFileInfo( PBYTE pFileName, PMFSFILEINFO pFileInfo );
ULONG MFSClose( ULONG hFile );

/*------------------*/
/* MFSSERV.C        */
/*------------------*/
ULONG MFSFindVol( PBYTE pFileName, PVOL *ppVol );
ULONG MFSRead( PVOL pVol, ULONG IOPos, PBYTE IOBuf, ULONG IOSize );
ULONG MFSWrite( PVOL pVol, ULONG IOPos, PBYTE IOBuf, ULONG IOSize );
ULONG MFSFlushIOBuf( PVOL pVol, PFILE pFile );
