home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / djgpp / include / pc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-26  |  1.8 KB  |  56 lines

  1. /*
  2. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  3. **
  4. ** This file is distributed under the terms listed in the document
  5. ** "copying.dj", available from DJ Delorie at the address above.
  6. ** A copy of "copying.dj" should accompany this file; if not, a copy
  7. ** should be available from where this file was obtained.  This file
  8. ** may not be distributed without a verbatim copy of "copying.dj".
  9. **
  10. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  11. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. */
  13.  
  14. #ifndef _PC_H_
  15. #define _PC_H_
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21. unsigned char inportb(unsigned short port);
  22. unsigned short inportw(unsigned short port);
  23. unsigned long inportl(unsigned short port);
  24. unsigned char inportsb(unsigned short port, unsigned char *buf, unsigned len);
  25. unsigned short inportsw(unsigned short port, unsigned short *buf, unsigned len);
  26. unsigned long inportsl(unsigned short port, unsigned long *buf, unsigned len);
  27. void outportb(unsigned short port, unsigned char data);
  28. void outportw(unsigned short port, unsigned short data);
  29. void outportl(unsigned short port, unsigned long data);
  30. void outportsb(unsigned short port, unsigned char *buf, unsigned len);
  31. void outportsw(unsigned short port, unsigned short *buf, unsigned len);
  32. void outportsl(unsigned short port, unsigned long *buf, unsigned len);
  33.  
  34. int kbhit(void);
  35. int getkey(void);
  36.  
  37. void sound(int frequency);
  38.  
  39. extern short ScreenPrimary[];
  40. extern short ScreenSecondary[];
  41.  
  42. /* For the primary screen: */
  43. int ScreenRows();
  44. int ScreenCols();
  45. void ScreenPutChar(int ch, int attr, int x, int y);
  46. void ScreenSetCursor(int row, int col);
  47. void ScreenGetCursor(int *row, int *col);
  48. void ScreenClear();
  49.  
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.  
  55. #endif
  56.