emx.pas 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. Unit emx;
  15. Interface
  16. {$Mode ObjFpc}
  17. {16:16 far pointer}
  18. type
  19. Far16Ptr=record
  20. Segment, Offset: Word;
  21. end;
  22. {! Don't call this one. It is used by the startup code.}
  23. //procedure emxinit; cdecl;
  24. // external 'emx' index 1;
  25. {! Calling this is not recommended. Use ___syscall instead.}
  26. //procedure emx_syscall; cdecl;
  27. // external 'emx' index 2;
  28. {This one converts 16:16 far pointers to 32 bit flat ones.}
  29. function emx_16to32(APtr: Far16Ptr): pointer; cdecl;
  30. external 'emx' index 3;
  31. {This one converts 32 bit flat pointers to 16:16 far ones.}
  32. function emx_32to16(APtr: pointer): Far16Ptr; cdecl;
  33. external 'emx' index 4;
  34. {This one should be called to call 16-bit procedures and functions.}
  35. function emx_thunk1(Args: Pointer; Fun: Pointer): cardinal; cdecl;
  36. external 'emx' index 5;
  37. procedure emx_exception; cdecl;
  38. external 'emx' index 6;
  39. // REXX function
  40. //ULONG emx_revision (PCSZ name, LONG argc, const RXSTRING *argv,
  41. // PCSZ queuename, PRXSTRING retstr)
  42. procedure emx_revision; cdecl;
  43. external 'emx' index 128;
  44. Implementation
  45. End.