parport.h 710 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef vDOS_PARPORT_H
  2. #define vDOS_PARPORT_H
  3. #ifndef VDOS_H
  4. #include "vDos.h"
  5. #endif
  6. #ifndef vDOS_INOUT_H
  7. #include "inout.h"
  8. #endif
  9. #include "devicePRT.h"
  10. class CParallel
  11. {
  12. public:
  13. // Constructor
  14. CParallel(Bitu portnr, device_PRT* dosdevice);
  15. virtual ~CParallel();
  16. void Putchar(Bit8u);
  17. Bitu portnum;
  18. // read data line register
  19. Bitu Read_SR();
  20. void Write_PR(Bitu);
  21. void Write_CON(Bitu);
  22. Bit8u datareg;
  23. Bit8u controlreg;
  24. bool autofeed;
  25. bool ack;
  26. Bit8u getPrinterStatus();
  27. void initialize();
  28. private:
  29. device_PRT* mydosdevice;
  30. };
  31. extern CParallel* parallelPorts[];
  32. const Bit16u parallel_baseaddr[3] = {0x378, 0x278, 0x3bc};
  33. #endif