/*
 *  DLL16.C
 */
#include <stddef.h>
#include <windows.h>

extern void BreakPoint( void );
#pragma aux BreakPoint = 0xcc;

extern short GetSS( void );
#pragma aux GetSS = 0x8C 0xD0 value[ax];

int PASCAL LibMain( HANDLE hmod, WORD dataseg, WORD heap, LPSTR cmdline )
{
  short i;
  char buf[128];

//BreakPoint();
  i = GetSS();
  sprintf( buf, "DLL16 Started, SS=%hx", i );
  MessageBox( NULL, buf, "DLL16", MB_OK | MB_TASKMODAL );
  return( 1 );
}

long cdecl FAR Lib1( WORD a, LONG b, WORD c, WORD d, LONG e )
{
  char buf[128];

  sprintf( buf, "Lib1: a=%hx, b=%lx, c=%hx, d=%hx, e=%lx",
		a, b, c, d, e );
  MessageBox( NULL, buf, "DLL16", MB_OK | MB_TASKMODAL );
  return( a + b + c + d + e );
}
