home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gppdem32.zip / gppDemid32 / call32.h < prev    next >
Text File  |  1996-08-05  |  657b  |  28 lines

  1. #if !defined (__CALL32_H__)
  2. #define __CALL32_H__ 1
  3.  
  4.  
  5. static __inline__ unsigned FlatToSel(unsigned p)
  6. {
  7.    register unsigned rc __asm__("%eax");
  8. __asm__ __volatile__( "movl %0,%%eax \n\t"
  9.                       "call DosFlatToSel \n\t"
  10.                       :// "=g"(rc)
  11.                       :"g"(p) : "%eax", "%ebx", "%ecx");
  12. return rc;
  13. }
  14.  
  15. static __inline__ unsigned SelToFlat(unsigned p)
  16. {
  17.    register unsigned rc __asm__("%eax");
  18. __asm__ __volatile__( "movl %0,%%eax \n\t"
  19.                       "call DosSelToFlat \n\t"
  20.                       :// "=g"(rc)
  21.                       :"g"(p) : "%ebx", "%ecx");
  22. return rc;
  23. }
  24.  
  25.  
  26.  
  27. #endif
  28.