home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / PASTUT34 / PRINTER.TXT < prev    next >
Text File  |  1993-01-23  |  2KB  |  67 lines

  1.                         OUTPUT TO PRINTERS.
  2.                         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3.  
  4. Printers may be connected to the parallel printer connector (Centronics,
  5. 25-way D-type), if they use the standard parallel interface. Alternatively,
  6. if they use the standard serial interface, they may be connected to the
  7. serial interface connector (RS232 25-way D-type), which also serves as a
  8. communications link.
  9.  
  10. The port connections for any computer can be determined by using the DOS
  11. command DEVICE, which returns a screen message similar to the one below:
  12.  
  13.  
  14.     ╔════════════════════════════════════════════════╗
  15.     ║    Amstrad PC2086 Device Assignments (1.0)     ║
  16.     ║        Copyright (C) Amstrad plc 1988          ║
  17.     ╚════════════════════════════════════════════════╝
  18.  SERIAL/PARALLEL PORTS
  19.  COM1: 03F8 (Internal)
  20.  COM2: Not Assigned
  21.  LPT1: 0378 (Internal)
  22.  LPT2: Not Assigned
  23.  LPT3: Not Assigned
  24.  VIDEO
  25.   Display Adapter ............. Internal PVGA (Colour-80)
  26.   Current Video Mode .......... 03h
  27.   Multi-Frequency Mode ........ Disabled
  28.   Auto Mono/Colour switching .. Enabled
  29.   Display Option Switch 3 ..... Off
  30.   Display Option Switch 4 ..... Off
  31.  
  32.  DISK DRIVES AND ADAPTERS
  33.   Drive A type is 720K Bytes, 3.5 inch, With Changeline
  34.   Drive B type is 720K Bytes, 3.5 inch, With Changeline
  35.   Maths Co-processor (NDP) Not Fitted
  36.   Hard Disk drive C: 768 tracks, 3 heads, 27 sectors/track (31Mb)
  37.   ---------------------------------------------------------------
  38.  
  39. The serial ports are usually called COM1 and COM2, whilst the parallel
  40. printer ports are referred to as LPT1, LPT2 and LPT3. The addresses of
  41. these ports are also given, so that data can be sent to the port instead
  42. of memory.
  43.  
  44. The note COMPORT.TXT describes Direct Memory and Port Access and
  45. Communication and further information can be found in the IBM PC Technical
  46. Reference Manual.
  47.  
  48. Turbo Pascal and DOS describe the display, the keyboard and printers as
  49. Devices. Pages 134-6 of the Programmer's Guide discuss Devices. A unit,
  50. called PRINTER, is available in Turbo Pascal, and a text-file variable Lst
  51. is declared, which enables output to be sent to the printer. A simple
  52. example program is:
  53.  
  54.         Program testPtr;
  55.         Uses Printer;
  56.         Begin
  57.            Writeln(Lst,'Text to printer on parallel port');
  58.         End.
  59.  
  60.  
  61.  
  62. PRINTER.TXT
  63. 16.11.91
  64.  
  65.  
  66.  
  67.