/* thunk.c (emx+gcc) */

#include <stdio.h>
#include <os2.h>

USHORT _THUNK_FUNCTION (Dos16Beep) (USHORT usFrequency, USHORT usDuration);

void beep (int frequency, int duration)
{
  _THUNK_PROLOG (2+2);
  _THUNK_SHORT (frequency);
  _THUNK_SHORT (duration);
  _THUNK_CALL (Dos16Beep);
}

int main (void)
{
  beep (440, 200);
  beep (880, 200);
  beep (440, 200);
  return (0);
}
