home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / pcmag / vol4n05.arc / LPTPORT.BAS < prev    next >
Encoding:
BASIC Source File  |  1985-03-05  |  640 b   |  23 lines

  1. 100 ' BASIC program to switch LPT1: with LPT2:
  2. 110 ' (C) 1984, Dickinson Associates Inc.
  3. 120 '
  4. 130 ' Define Data Segment as ROM BIOS DATA AREA
  5. 140 '
  6. 150 DEF SEG=&H40
  7. 160 '
  8. 170 ' Read Printer Port Addresses into PRINTER.BASE Arrays
  9. 180 '
  10. 190 PRINTER.BASE.0(0) = PEEK(8)
  11. 200 PRINTER.BASE.0(1) = PEEK(9)
  12. 210 PRINTER.BASE.2(0) = PEEK(10)
  13. 220 PRINTER.BASE.2(1) = PEEK(11)
  14. 230 '
  15. 240 ' Write Printer Port Addresses in Reverse Order
  16. 250 '
  17. 260 POKE 8, PRINTER.BASE.2(0)
  18. 270 POKE 9, PRINTER.BASE.2(1)
  19. 280 POKE 10, PRINTER.BASE.0(0)
  20. 290 POKE 11, PRINTER.BASE.0(1)
  21. 300 '
  22. 310 SYSTEM      ' Optional for use in:  BASIC LPTPORT
  23.