– Virtual Media

Listing of file='MANUAL.TXT;02' on disk='vmedia/printer_pkg-sector.ccvf'


   This package provides two programs which can be configured
by the user for his particular printer. Almost  any  type  of
printer can be accomodated. Configuration is accomplished via
a simple question/answer process using programs provided with
the package, and may be done each time a file is printed,  or
the configured print program may be saved for later use.

   There is sufficient space remaining  on  the  distribution
disk to save configured versions of both programs.

                  THEY WILL NOT RUN.

   The programs are not intended for use in  word  processing
applications, but rather for  program  maintenance.  Listings
can be produced which have page headings with the file  name,
time and date, and page number. Features such as  replacement
of control characters are designed  to  provide  an  accurate
copy of the file for documentation purposes. They can also be
used simply to review a file, because output is sent  to  the
screen as well as the printer, even if the  printer  is  off.

   The assembly language print programs provided are:
	PRINT.PRG  - Prints source files (ASCII text files)
	LISTER.PRG - Prints BASIC  files.
These are in addition to two BASIC files with the same  names
which are used for configuration. A MENU program allows  easy
loading, and the user need only hit <AUTO> to run a  program.
The final program, TIME.BAS, is intended for setting the time
and date for use in listing headers.

   For your convenience, a copy of this manual is distributed
on the disk with the programs. It may be used to testing  the
programs, or simply deleted if not needed. In particular, you
may wish to reclaim the space to save  additional  configured
copies of the programs.


   As distrubuted, the programs are set up for a Paper  Tiger
(IDS 440) using 8-1/2 by 11 inch fan-fold paper,  80  columns
by 60 lines (10 cpi and 6 lpi) running at 1200 baud with  the
Auto-perforation skip enabled and Auto-line-feed disabled.


   There are two ways to customise the programs for  a  given
printer. The first simply involves a question and answer pro-
cess, and is the simplest. It produces a PRG file that can be
run from FCS, and for which the user selects the  name ( .PRG
need not be specified in the file name, since it is assumed).
   As  an alternative, there are default values in the  BASIC
programs which drive the assembly  language  routines.  These
programs, named LISTER.BAS and PRINT.BAS, contain REMarks  to
help in setting the default parameters. The default parameter
is used if <RETURN> is hit in  response  to  a  configuration
question. With appropriate defaults, it is  possible  to  run
the programs simply by repeatedly   hitting  <RETURN>  during
the question/answer part of the following:

A. First time use, or for Configuration

   1. Insert the Printer disk in drive 0 and hit <AUTO>.
   2. Set the time and date if you have  not  previously
      done so.
   3. Select either Lister or Print.
   4. The appropriate BASIC program will be loaded,  and
      will display its name.
   5. Answer the configuration questions.
   6. Save this configuration if you anticipate using it
      a lot. Most people only use one configuration.
      NOTE: Do not save the programs on other disks.
   7. The assembly language program will now  take  over,
      print its ID message, and prompt for a  file  name.
   8. If necessary, insert the required disk in drive  0.
      You may, of course, use drive 1.
   9. Enter the file name (default file type may be  left
  10. The program will start printing. (See  notes  under
      Characteristics of the Programs on how to abort the
      program, or suspend printing.)

                   *** IMPORTANT ***

B. Using a configured program

   1. Get into BASIC (<ESC> W or <ESC> E) and LOAD "TIME".
   2. RUN this program to set the time and date.
   3. Get into FCS (<ESC> D) and RUN the configured  copy
      of the program that you want. Note: You choose  the
      file name for the configured copy, so it may be
      anything you want.

In both cases, once the time and date are set,  there  is  no
need to do this again so long as the  machine remains on. The
only exception is at midnight, because the date will  not  be


   The following parameters are specified by the user:

      * Baud Rate
      * Line Length
      * Page Length
      * Whether the printer can do Form-Feeds
      * Whether the printer skips page perforations
           and if not, the number of lines to skip
      * Type of forms used (single sheet or continuous)
      * Whether a Header is to be printed on each page
      * The default file type
      * Mechanical Delay Factor


   All standard Compucolor baud rates are supported, however,
it is essential that the  printer handshake  modification  be
installed if the printer cannot keep pace at the desired baud
rate. The modification is as follows:

	1. Tie Pin 9 of J2 edge connector to UD1 Pin 4
	2. Tie UD1 Pin 6 to UC1 Pin 3
	3. Tie UC1 Pin 4 to UE1 Pin 10
	4. Add a 10K 1/4W resistor between UD1 Pin 4 and
	      +12V (R10 and R11 on logic board go to +12)

   Pin 9 on J2 must be connected to the handshake line on the
printer. Refer to the printer  Owner's  Manual  to  determine
which pin on the  DB-25 (25-pin)  RS-232C connector  to  use.
This modification assumes that the printer  pulls  this  line
low when it cannot receive characters. If  the  printer  does
the reverse, i.e. raises this line, then omit steps 2 and  3,
and tie UD1 pin 6 directly to UE1 pin 10.

NOTE:   This modification works well on Centronics, Heath H14
and Paper Tiger (IDS) printers, but not so well on the  BASE2
and MPI printers. The latter printers do not  pull  down  the
handshake line properly, resulting in intermittent  problems.
To try to overcome this problem,  time  delays  are  inserted
in the programs whenever a mechanical motion occurs. See  the
description of Mechanical Delay Factor.


   Line length is the number of characters printed across the
page. Some printers, e.g. H14, will start a new line  if  the
print head reaches the right margin. In this case, it will be
necessary to specify a line length one less than  the  actual
width of the paper. Most printers print 80 character lines at
10 cpi (characters per inch), so if the printer starts a  new
line automatically at column 80, the line length must be  set
to 79.


   The page length is the number of lines actually printed on
a page - not the number of physical  lines  on  a  page.  For
example, a normal 8-1/2 by 11 inch page has 66 lines at 6 lpi
(lines per inch). However, only 60 of  these  are  used,  the
other 6 being top and bottom margins (3 lines each).
   NOTE: For the programs to work correctly,  printers  which
have an automatic line-feed on receipt  of a  carriage return
must have this feature disabled.


   If the printer cannot do form feeds i.e. feed the paper to
the top of a new page, this option will simulate a form  feed
by issuing line feeds. For ASCII  files,  form-feeds  may  be
inserted anywhere in the file to cause a page eject.  If  the
printer cannot form-feed, it is assumed that it does not skip
page perforations either, and so the number of lines for  the
perforation skip must be specified, as in the next paragraph.


   Some printers can be set to automatically  skip  the  page
perforations when continuous (fan-feed) forms are used.  This
requires special treatment by the programs, and so  it  is  a
parameter. If the printer cannot skip, it can be simulated by
line feeds. The number of lines to skip  must  be  specified,
and the sum of this number plus the page length  given  above
must be the physical page length. In the previous example, 60
would be given as the page length and 6  as  the  perforation


   When single pages are to be printed i.e. fan-fold paper is
not used, this option can be selected. At  the  end  of  each
page, a form-feed is issued to eject the page and the program
will halt until the user hits <RETURN>.  This  allows  a  new
sheet of paper to be inserted in the printer and aligned.  In
this case, only half the usual page perforation  skip  length
should be specified, since it includes the top margin on  the
next page as well as the bottom margin on the  current  page.


   At the user's option, a header may be printed at  the  top
of each page consisting of:

      VOLUME>FILE   TIME  DATE             PAGE XXX

      <--------------- Line Length --------------->

where VOLUME = Disk name
      FILE   = File name (full name including version number)
      TIME   = Time at beginning of printing
      DATE   = Current date
      XXX    = Page number

   Headers can be suppressed if not desired, for example, for
printing correspondence. Note that this also eliminates  page
numbering. Header information is very useful in program main-
tenance for keeping listings up to date.

(A program is supplied which can be used to set the time  and
date. The real-time clock in the  Compucolor  will  then keep
the correct time, however, it will not  increment the  date.)


   This simplifies the entry of file names if a certain  type
of file is printed frequently. Of course, it does  not  apply
to BASIC files, which must have a type of BAS.


   Because mechanical motions (carriage return, line feed and
form feed) take much longer than printing characters, a  time
delay occurs after each of these operations. The user adjusts
the delay to suit his particular printer using  this  option.
When the delay is set at its minimum value (1), it is  barely
noticeable, but at its maximum (12), it is almost  sufficient
to allow the average printer to run without handshaking. Note
however, that this is not a complete replacement for hardware


   The programs have a number of features  designed  to  make
them as generally applicable and easy to use as possible:

      * Tab expansion
      * Line continuation
      * Control character replacement
      * Escape sequences for invalid ASCII codes
      * DELETE substitution
      * Program Abort
      * Printout suspension

Note that the programs assume that the printer is capable  of
printing the full ASCII character set, upper and lower  case.
Also, they assume that the paper begins at top of form.  They
always end by issuing a form-feed to make sure that the paper
is at top of form for the next run.


   Tabs are automatically expanded into the correct number of
spaces to be consistent with the  Compucolor  so  that  ASCII
files will appear the same on the screen as on  the  printer.


   Lines which are too long to fit on the page are split. Not
all printers do this automatically,  e.g. teletypes.  In  the
case of BASIC files, keywords are never split  across  lines.
Similarly, escape sequences and control  character  sequences
are not split up either (see below).  Continuation  lines  in
BASIC files are indented so that they leave the  line  number
area empty. This makes the listing easier to read.


   Because certain printers,  e.g.  Paper Tiger,  respond  to
control characters, they are replaced by a sequence ^X, where
X is the key to depress in  conjunction  with  the  <CONTROL>
key to generate the character. This notation is  designed  to
simplify entering programs via the  keyboard  from  listings.
The only exceptions  are  tab,  line-feed,  carriage  return,
and form-feed. Control character replacement may  be  a  dis-
advantage in some circumstances where it is  desired  to  use
control characters to change printer characteristics. However
the programs are not intended for this type of use.


   Standard ASCII is a 7-bit code, so characters with the MSB
(Most Significant Bit) set are considered illegal. Instead of
totally ignoring them, an escape sequence is  issued  as [X],
where X is the character with the MSB turned off. If the res-
ulting character is a control character, it is printed as per
the previous paragraph. This includes line-feed, tab, etc. In
general, a character with the MSB set is a PLOT character, so
it is not likely that replacing it will cause  any  problems.


   The ASCII code for DEL (delete  character) is  substituted
with a pound sign (#) rather than sent to the  printer.  This
is included specifically for  the  Texas  Instruments  TI-810
because DEL causes it to clear its input buffer, resulting in
the loss of data.


   The programs may be aborted at any time by  hitting  <ESC>
or line-feed (down-arrow).  Occasionally,  e.g.  during  disk
accesses, it may be necessary to hit the key twice  in  order
to terminate a run. A form-feed is issued before the  program


   If printing is to be suspended for any reason, the <BREAK>
key can be used. Pressing any other key after <BREAK>  causes
printing to resume, except, of course, <ESC> and line-feed. A
<BREAK> has no effect while the disk drive is in motion. This
facility provides an easy means of skimming through  a  file.
With the printer turned off, the programs simply display  the
file on the screen, and it is possible  to  page  through the
file using <BREAK> and <RETURN>. Note: Some printers pull the
handshake line down when the power is off and interfere  with
the normal operation of the Compucolor. Either disconnect the
printer when not in use, or leave it turned on  but  deselect
it (turn it off-line).