home *** CD-ROM | disk | FTP | other *** search
/ Zodiac Super OZ / MEDIADEPOT.ISO / FILES / 13 / DJCRX201.ZIP / include / go32.h < prev    next >
C/C++ Source or Header  |  1995-05-25  |  2KB  |  72 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_go32_h_
  3. #define __dj_include_go32_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. #include <sys/djtypes.h>
  16.  
  17. __DJ_size_t
  18. #undef __DJ_size_t
  19. #define __DJ_size_t
  20.  
  21. typedef struct {
  22.   unsigned long  size_of_this_structure_in_bytes;
  23.   unsigned long  linear_address_of_primary_screen;
  24.   unsigned long  linear_address_of_secondary_screen;
  25.   unsigned long  linear_address_of_transfer_buffer;
  26.   unsigned long  size_of_transfer_buffer; /* >= 4k */
  27.   unsigned long  pid;
  28.   unsigned char  master_interrupt_controller_base;
  29.   unsigned char  slave_interrupt_controller_base;
  30.   unsigned short selector_for_linear_memory;
  31.   unsigned long  linear_address_of_stub_info_structure;
  32.   unsigned long  linear_address_of_original_psp;
  33.   unsigned short run_mode;
  34.   unsigned short run_mode_info;
  35. } __Go32_Info_Block;
  36.  
  37. extern __Go32_Info_Block _go32_info_block;
  38.  
  39. #define _GO32_RUN_MODE_UNDEF    0
  40. #define _GO32_RUN_MODE_RAW    1
  41. #define _GO32_RUN_MODE_XMS    2
  42. #define _GO32_RUN_MODE_VCPI    3
  43. #define _GO32_RUN_MODE_DPMI    4
  44.  
  45. #include <sys/movedata.h>
  46. #include <sys/segments.h>
  47.  
  48. #define _go32_my_cs _my_cs
  49. #define _go32_my_ds _my_ds
  50. #define _go32_my_ss _my_ss
  51. #define _go32_conventional_mem_selector() _go32_info_block.selector_for_linear_memory
  52. #define _dos_ds _go32_info_block.selector_for_linear_memory
  53.  
  54. #define __tb _go32_info_block.linear_address_of_transfer_buffer
  55.  
  56. /* returns number of times hit since last call. (zero first time) */
  57. unsigned _go32_was_ctrl_break_hit(void);
  58. void     _go32_want_ctrl_break(int yes); /* auto-yes if call above function */
  59.  
  60. #endif /* !_POSIX_SOURCE */
  61. #endif /* !__STRICT_ANSI__ */
  62. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  63.  
  64. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  65. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  66.  
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70.  
  71. #endif /* !__dj_include_go32_h_ */
  72.