home *** CD-ROM | disk | FTP | other *** search
/ Zodiac Super OZ / MEDIADEPOT.ISO / FILES / 13 / DJCRX201.ZIP / include / sys / segments.h < prev    next >
C/C++ Source or Header  |  1995-03-24  |  919b  |  51 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_sys_segments_h_
  3. #define __dj_include_sys_segments_h_
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  10.  
  11. #ifndef __STRICT_ANSI__
  12.  
  13. #ifndef _POSIX_SOURCE
  14.  
  15. static __inline__ int
  16. _my_cs(void)
  17. {
  18.   short result;
  19.   __asm__("movw %%cs,%0" : "=r" (result));
  20.   return result;
  21. }
  22.  
  23. static __inline__ int
  24. _my_ds(void)
  25. {
  26.   short result;
  27.   __asm__("movw %%ds,%0" : "=r" (result));
  28.   return result;
  29. }
  30.  
  31. static __inline__ int
  32. _my_ss(void)
  33. {
  34.   short result;
  35.   __asm__("movw %%ss,%0" : "=r" (result));
  36.   return result;
  37. }
  38.  
  39. #endif /* !_POSIX_SOURCE */
  40. #endif /* !__STRICT_ANSI__ */
  41. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  42.  
  43. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  44. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  45.  
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49.  
  50. #endif /* !__dj_include_sys_segment_h_ */
  51.