;
                                 PRTASM.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
PRTASM.COM     5k (37)   DAAC  2.1        Gene Pizzetta 3/91       Z3COM16

  1- Usage  2- Datestamps  3- Tabs  4- Errors  5- Configuration  6- Notes     

   PRTASM is  a ZCPR3 utility  that prints  assembly  source  code  and  other
program listings  on the CP/M LST device.  It is also handy for quick printing
of documentation.   It prints the filename and page number in the  upper right
corner of each page.   To the left of the filename is printed the  file's date
stamp, if it's available;  otherwise,  the current date and time are used.  If
no clock is available,  no date and time are printed at all.   As distributed,
PRTASM is configured for Epson  printers,  but the configuration can be easily
changed.  Runs under ZCPR 3.x only.  

   Vs 1.0 (9/17/87) by Gene Pizzetta.
:1
 Syntax   PRTASM {dir:}fn.ft {/options} {{dir:}fn.ft {/options}} {...}

   At least one input filename is required.   Names in the  file  list  may be
separated by any number of spaces  and  commas,  but  no  comma  is  permitted
between a filename and its  following options.   Ambiguous  filenames  are not
accepted, but will not abort the program.  If a DU or DIR specification is not
given, the current drive/user is assumed.   Filenames  beginning  with a slash
must be preceded by a DU spec or just a colon.
 Options - 1/2 

   Options following a slash may be  given  after each filename and only apply
to the filename that immediately  precedes  them.   Commas  cannot  separate a
filename from its options.   Options need not  be in any particular order, but
obviously the starting page number cannot immediately  follow  an  ending page
number.

     n    Starting page.  The number of the page at which 
          printing should begin (from 1 to 65535).  Zero is 
          accepted, but it has the same effect as 1 (which is 
          like not giving a starting page at all.  Printing 
          begins at the top of the given page.

    -n    Ending page.  The number of the page at which printing 
          should stop (from 1 to 65535).  Zero is accepted, but 
          it has the same effect as not giving an ending page at 
          all.  Printing stops at the end of the given page, so 
          if the starting page and ending page are the same, one 
          page will be printed.
 Options - 2/2 

     L    Line mode.  The starting page and ending page numbers 
          are interpreted as starting and ending line numbers 
          instead.  Printing will begin with the given starting 
          line number and stop after the ending line is printed.  
          In this mode page numbering on the output copy will 
          begin at 1.

   Once printing  has  begun,  pressing  any key will  abort  printing  of the 
current file.   If the key is ^C,  PRTASM will return to the operating system; 
otherwise, it will skip to the next file in the list and continue printing.

   The number of lines on  a printed page and  whether the  printer can handle
formfeeds is taken from the ZCPR3 environment descriptor.  Make sure these are
set properly.   It is particularly desirable that PRTASM use formfeeds so that
if a line or two overflows the margin, the header will not get out of sync.
:2
 Datestamping 

   To the left of the filename in the header,  PRTASM  prints a  date and time
from the file's date stamp, if one is available.   The  modification date will
be used, if there is one.   If not,  PRTASM  tries  for  a  creation date.  If
neither date is available, the current date and time are used instead.   If no
system clock is available, no date and time are printed at all.
:3
 Expanding Tabs 

   Tabs are not expanded by PRTASM.   It is  assumed that most modern printers 
are IBM-compatible and thus handle tabs correctly.  If your printer needs tabs
sent as the  corresponding number of spaces,  run your file  through  a filter 
program before printing it with PRTASM.   If you would prefer a future version 
to expand tabs, please let the author know.
:4
 Errors 

   If a file cannot be found,  an ambiguous filename is encountered, an option
is invalid, or an illegal directory is  referenced,  PRTASM  will  display  an
error message and then continue with the next file in the file list.  It will,
however, set the program error flag on exit.

   The error flag value will be set according to the last  error  encountered:
2, invalid directory;  8, ambiguous filename;  10, file not found; 19, invalid
option; 4, printer not ready.
:5
 Configuration 

   The distributed version is configured for Epson  printers and  compatibles,
but is easily configured for other printers.   PRTASM expects,  however,  that
your printer is capable of printing a 96-character line in elite pitch.

   PRTASM  can  be  easily  configured   using   ZCNFG  and  the  accompanying
PRTASMnn.CFG file.   The name of the CFG file should  not be changed,  so that
ZCNFG can always find it,  even if  you  rename  PRTASM.   Most of  the  ZCNFG
configuration menus concern  printer  escape  strings  required by  PRTASM for
putting the printer in elite pitch  (12 characters per inch);  for setting the
printer's left margin to column 8;  for resetting  the  printer to its default
mode; for putting the printer into boldface, emphasized,  or double-strike for
printing the header; and for cancelling the printer's boldface mode.

   In addition to printer configuration,  there are  two  other  configuration
options for selecting whether the date in the header is printed in American or
European format and  whether  the  time  is  printed  in civilian  or military
format.

   For full details of the configuration options see the ZCNFG help screens.
:6
 PRTASM Notes - 1/4 

   a. Vs 2.1 updates (3/29/91, Gene Pizzetta):
      - Added options to begin and/or end printing on a specific page or line.
      - Configurable for American or European date format.  
      - New civilian time format prints "am" and "pm".  
      - Changed parser from ZFNAME to ZPRSFN; now looks for invalid dir specs.

   b. Vs 2.0 updates (11/24/90, Gene Pizzetta):
      - Added a larger file buffer for speedup. 
      - Incorporated several code improvements,  size cut by 3 sectors to less
        that 4K, and speed increased by about 20 percent.
      - No longer supports type-3 assembly.  
      - Added ZCNFG configuration; converted to Zilog mnemonics.

   c. Vs 1.9 updates (7/18/90, Gene Pizzetta):
      - Now prints source  of date and time:  "Modified",  "Created",  or just
        "Printed" if no file stamp is available.  
      - Bugs squashed:  1) failure to set the correct DMA address if the mili-
        ary time flag was false;  2) if a key was pressed while the header was
        being sent to the printer, PRTASM would not detect it.
 PRTASM Notes - 2/4 

   d. Version 1.8 updates (7/11/90, Gene Pizzetta):
      - Modified to accept a list of files.  
      - file date now  used in the header,  if it has  a  modification  (first
        choice) or create stamp; otherwise, the current date is used.
      - Back to Intel mnemonics.  
      - If any files in the file list are not found,  PRTASM skips to the next
        file after printing an error message.  
      - Printing can be aborted at any time with ^C.  Any other key will abort
        the file currently being printed and move to the next in the list.  
      - A two-byte page counter is now used so it will number past 255.  
      - Formfeeds in the file are trapped and  replaced with a single carriage 
        return/linefeed.  
      - A printer capable of 96 columns in elite pitch is assumed.  
      - Page length and formfeed ability are obtained from the environment.  
      - A configuration byte allows selection of civil or military time.  
      - Patching for non-Epson escape codes no longer requires re-assembly.  
      - Added a type-3 header.  
      - Program error flag is set if any file in the file list cannot be found
        or if a file specification is ambiguous.
 PRTASM Notes - 3/4 

   e. Version 1.7 updates (7/16/90, J. Mortensen):
      - Translated to Zilog mnemonics.  
      - Time of day added to header.
      - ZSLIB routines added for printing time and date.  
      - Added LST status check and ZCPR3 check.  
      - Masks high bits for WordStar files.

   f. Version 1.6 updates (8/7/89, Gene Pizzetta):
      - minor change in header format

   g. Version 1.5 updates (7/26/89, Gene Pizzetta):
      - now prints date in header line if a  real-time clock is  working under
        DateStamper or ZDOS (must be linked with version 4 SYSLIB's)

   h. Version 1.4 updates (6/10/89, Gene Pizzetta):
      - slight change in screen display
 PRTASM Notes - 4/4 

   i. Version 1.3 updates (3/11/89, Gene Pizzetta):
      - adds DU filespec and ZCPR3 TCAP support
      - incorporates SYSLIB routines
      - now preserves the CP and no longer warm boots

   j. Version 1.2 updates (10/13/88, Gene Pizzetta):
      - eliminates CP/M Plus dependencies.  
      - adds printer cleanup on user abort.   
      - still sends a failure code to  the BDOS on error, to support CP/M Plus
        conditional submits.   CP/M 2.2  doesn't recognize it,  but it does no 
        harm.

   k. Version 1.1 updates (9/20/87, Gene Pizzetta):
      - added page numbering and boldface filename in header

   l. PRTASM was developed using the SLRMAC assembler and SLRNK+ linker:
 	slrmac prtasm/m
 	slrnkp prtasm/n,/v,/a:100,/j,prtasm,zslib/s,dslibs/s,vlibs/s,
 		z3libs/s,syslibs/s,/e
