home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJDEV201.ZIP / include / pc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-25  |  2.4 KB  |  73 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_pc_h_
  3. #define __dj_include_pc_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. unsigned char    inportb  (unsigned short _port);
  16. unsigned short    inportw  (unsigned short _port);
  17. unsigned long    inportl  (unsigned short _port);
  18. void        inportsb (unsigned short _port, unsigned char  *_buf, unsigned _len);
  19. void        inportsw (unsigned short _port, unsigned short *_buf, unsigned _len);
  20. void        inportsl (unsigned short _port, unsigned long  *_buf, unsigned _len);
  21. void        outportb (unsigned short _port, unsigned char  _data);
  22. void        outportw (unsigned short _port, unsigned short _data);
  23. void        outportl (unsigned short _port, unsigned long  _data);
  24. void        outportsb(unsigned short _port, unsigned char  *_buf, unsigned _len);
  25. void        outportsw(unsigned short _port, unsigned short *_buf, unsigned _len);
  26. void        outportsl(unsigned short _port, unsigned long  *_buf, unsigned _len);
  27.  
  28. unsigned char    inp(unsigned short _port);
  29. unsigned short    inpw(unsigned short _port);
  30. void        outp(unsigned short _port, unsigned char _data);
  31. void        outpw(unsigned short _port, unsigned short _data);
  32. int        kbhit(void);
  33. int        getkey(void);    /* ALT's have 0x100 set */
  34. int        getxkey(void);    /* ALT's have 0x100 set, 0xe0 sets 0x200 */
  35.  
  36. void        sound(int _frequency);
  37. #define        nosound() sound(0)
  38.  
  39. extern unsigned char ScreenAttrib;
  40.  
  41. #define ScreenPrimary _go32_info_block.linear_address_of_primary_screen
  42. #define ScreenSecondary _go32_info_block.linear_address_of_secondary_screen
  43.  
  44. int    ScreenMode(void);
  45. int    ScreenRows(void);
  46. int    ScreenCols(void);
  47. void    ScreenPutChar(int _ch, int _attr, int _x, int _y);
  48. void    ScreenGetChar(int *_ch, int *_attr, int _x, int _y);
  49. void    ScreenPutString(const char *_ch, int _attr, int _x, int _y);
  50. void    ScreenSetCursor(int  _row, int  _col);
  51. void    ScreenGetCursor(int *_row, int *_col);
  52. void    ScreenClear(void);
  53. void    ScreenUpdate(const void *_virtual_screen);
  54. void    ScreenUpdateLine(const void *_virtual_screen_line, int _row);
  55. void    ScreenRetrieve(void *_virtual_screen);
  56. void    ScreenVisualBell(void);
  57.  
  58. #endif /* !_POSIX_SOURCE */
  59. #endif /* !__STRICT_ANSI__ */
  60. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  61.  
  62. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  63.  
  64. #include <inlines/pc.h>
  65.  
  66. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  67.  
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71.  
  72. #endif /* !__dj_include_pc_h_ */
  73.