Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

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