emx.pas 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {****************************************************************************
  2. EMX - Interface unit for the EMX dynamic runtime library.
  3. Part of Free Pascal runtime library for OS/2
  4. History:
  5. 2 June 1997 : Creation.
  6. This unit is Copyright (c) 1999-2000 by Daniel Mantione.
  7. Free Pascal is Copyright (c) -1999-2000 by Florian Klaempfl.
  8. EMX.DLL is Copyright (c) -1999-2000 by Eberhard Mattes.
  9. Modifying this unit is allowed, under the following conditions:
  10. - You will not make anyone beleive that you or someone else wrote this.
  11. - Unless you are developing on the official version of FPC, you will make a
  12. note in this file that it is not the original one.
  13. ****************************************************************************}
  14. {$IFNDEF FPC_DOTTEDUNITS}
  15. Unit emx;
  16. {$ENDIF FPC_DOTTEDUNITS}
  17. Interface
  18. {$Mode ObjFpc}
  19. {16:16 far pointer}
  20. type
  21. Far16Ptr=record
  22. Segment, Offset: Word;
  23. end;
  24. {! Don't call this one. It is used by the startup code.}
  25. //procedure emxinit; cdecl;
  26. // external 'emx' index 1;
  27. {! Calling this is not recommended. Use ___syscall instead.}
  28. //procedure emx_syscall; cdecl;
  29. // external 'emx' index 2;
  30. {This one converts 16:16 far pointers to 32 bit flat ones.}
  31. function emx_16to32(APtr: Far16Ptr): pointer; cdecl;
  32. external 'emx' index 3;
  33. {This one converts 32 bit flat pointers to 16:16 far ones.}
  34. function emx_32to16(APtr: pointer): Far16Ptr; cdecl;
  35. external 'emx' index 4;
  36. {This one should be called to call 16-bit procedures and functions.}
  37. function emx_thunk1(Args: Pointer; Fun: Pointer): cardinal; cdecl;
  38. external 'emx' index 5;
  39. procedure emx_exception; cdecl;
  40. external 'emx' index 6;
  41. // REXX function
  42. //ULONG emx_revision (PCSZ name, LONG argc, const RXSTRING *argv,
  43. // PCSZ queuename, PRXSTRING retstr)
  44. procedure emx_revision; cdecl;
  45. external 'emx' index 128;
  46. Implementation
  47. End.