home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
- Pascal Source Processor
-
- PSP.EXE
-
-
-
-
-
- A Shareware Programmer's Utility for
- Turbo Pascal 4.0
-
- by
-
-
- Lee Lorentz
- 3205 Harbor Lane North
- Plymouth, MN 55447
- (612) 557-1308
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (C) 1988 as an Unpublished Work by Lee Lorentz.
-
-
-
-
-
-
-
-
- Pascal Source Processor Documentation
-
-
-
-
-
- -------
- SUMMARY
- -------
-
- PSP produces a formatted listing of a Turbo Pascal source file,
- including a banner page, a table of contents, the source code
- listing, and a cross-reference of the symbols found in the
- source. Output can be directed to any one of the printer, the
- screen, or a text file on disk.
-
- The files included on the distribution disk include:
- PSP.EXE - The executable program
- PSP.DOC - This documentation file
- SAMPLE.PAS - A sample source code file
-
-
-
-
- --------------------
- INPUT CONSIDERATIONS
- --------------------
-
- PSP was designed to function with Turbo Pascal source code files
- written to a specific set of programming standards. It will pro-
- cess files that vary from these standards, but with varying de-
- grees of disappointing results.
-
- First, PSP expects to work with source code files that are lim-
- ited to eighty (80) characters or less per line. This has a two-
- fold purpose. An 80-character limit makes the source files eas-
- ier to manipulate on screen while editing. Also, the limit makes
- the listing fit on a narrow carriage printer.
-
- Next, PSP executes a page break immediately before the reserved
- words (among others) 'FUNCTION' and 'PROCEDURE' (case sensitive),
- if they occur beginning in column one. This means that comments
- regarding a procedure or function should follow the block they
- describe, if they are to be printed on the same page with the
- related code.
-
- Either comment delimiter pair ('(*', '*)' or '{','}') will be
- properly handled. However, PSP requires that a comment may not
- extend across multiple lines. Each physical line of a comment
- must be delimited at both the beginning and ending of each line.
- In addition, PSP assumes that the beginning of a comment
- signifies the end of executable code on a given line.
-
-
-
-
-
-
-
-
-
- Copyright (C) 1988, Lee Lorentz
- Page 1
-
-
-
- Pascal Source Processor Documentation
-
-
-
-
-
- ------------
- INSTALLATION
- ------------
-
- The first step in the installation (and I CAN'T STRESS IT ENOUGH)
- is to make a working copy of the distribution disk and PUT THE
- ORIGINAL AWAY!!! PSP is not copy protected, and a copy may be
- produced by the standard DOS COPY command (see your DOS manual).
-
- If you will be working from a floppy-based system, your install-
- ation is complete. If you will be working from a hard disk sys-
- tem, I recommend that you copy the PSP.EXE file into the source
- code sub-directory. This is only for convenience, as you can
- specify the full file specification of a source file. If PSP is
- in the same directory as your source file, you need only enter
- the file name.
-
-
-
-
- ----------
- TO USE PSP
- ----------
-
- First, make the source code sub-directory the current directory,
- using the DOS CHDIR command. Then, from the DOS command line
- type 'PSP' (without the quote marks) and press [RETURN]. A data
- entry screen will then display.
-
- Type in the specification of the source file to be processed. If
- both PSP and the source file are on the same drive, you need not
- enter the drive. If they are in the same directory, you need not
- enter the path. The full file name is required in any case. If
- PSP cannot find the name entered, the prompt will redisplay. To
- exit from PSP without processing a file, enter 'END' for a file
- name.
-
- The prompt will move down to the destination selection. There
- are three numbered choices displayed. To make a selection, just
- press the number and processing will begin. It is not necessary
- to press [RETURN]. You will notice that selection one is con-
- tained within square brackets ('[1]'). The square brackets indi-
- cate that this is a default response. If you just press [RETURN]
- selection one will be assumed. Selection 1 sends the output dir-
- ectly to the printer (using LPT1:). Selection 2 sends the output
- to the screen. Selection 3 sends the output to a text file on
- disk. If you choose selection 3, an additional prompt will ap-
- pear for the output file name. I recommend that a suffix of .PRN
- be used for the text output files on disk. Again, even though
- the prompt doesn't suggest it, a full file specification can be
- entered.
-
-
-
-
- Copyright (C) 1988, Lee Lorentz
- Page 2
-
-
-
- Pascal Source Processor Documentation
-
- Once the above prompts have been answered, processing begins. As
- each step in the process begins, an advisory message appears on
- the screen. The processing steps are:
- Scanning source file line
- Printing banner page
- Parsing line
- Sorting
- Printing table of contents page
- Printing source code listing page
- The Scanning and Parsing lines are updated with the line number
- from the source code file as processing proceeds. The last three
- Printing lines are updated with the page number as processing
- continues. PSP returns to the DOS prompt when printing is com-
- plete.
-
-
- ------------------
- OUTPUT DESCRIPTION
- ------------------
-
- The output of PSP is produced in four main sections. Each of
- these is described in more detail in the paragraphs below. These
- sections are 1) Banner Page, 2) Table of Contents, 3) Source
- Listing, and 4) Symbol Cross Reference.
-
- Banner Page
- The banner page provides summary information about the process.
- At the top left and right corners are the run time and date.
- Centered below on the page is the file name (stripped of any path
- description), in enlarged and boldface print. This is followed
- by the line count from the source file, and the source file's
- date and time stamp from the directory entry. This helps to keep
- track of what version of your program is represented by your
- listing.
-
- Table of Contents
- The table of contents provides a listing of the first line of
- each function and procedure declared in your source file. It is
- case insensitive, and includes the line number of the declaration
- within your source file. The line number is printed in 10-pitch
- (pica) spacing, and the declaration line is printed in 12-pitch
- (elite). This is how PSP can put a full 80-character line of
- source on a 8" wide sheet.
-
- Source Listing
- The source listing is printed next. Again, the line number is
- printed in 10-pitch (pica) spacing, and the declaration line is
- printed in 12-pitch (elite). The page break scheme is fairly
- simple. When one of 'TYPE', 'CONST', 'VAR', 'FUNCTION', or 'PRO-
- CEDURE' (case sensitive) is found beginning in column one of the
- source listing, a page break is executed before printing the sym-
- bol. This is why comments relating to a function or procedure
- should follow the declaration. PSP attempts to keep one function
- or procedure per page. This may seem a waste of paper, but dur-
- ing the development process, it provides 'white space' on each
- page which provides a working area for handwritten notes.
-
-
-
- Copyright (C) 1988, Lee Lorentz
- Page 3
-
-
-
- Pascal Source Processor Documentation
-
-
- Symbol Cross Reference
- The symbol cross reference is printed next. The symbols are
- printed alone on a line, indented four spaces from the left
- margin in 10-pitch and double-strike mode. The line number(s)
- where the symbol was encountered are printed next, in 12-pitch.
- Hexadecimal constants are printed first (prefixed with a '$'),
- followed by symbols beginning with a capital letter, followed
- finally by symbols beginning with a lower case letter. The final
- page of the symbol cross reference ends with a page footing with
- no following header. This leaves the printer set at it's top of
- form position, ready for the next print job.
-
-
-
-
- ------------
- REGISTRATION
- ------------
-
- PSP is distributed under the Shareware concept. This means that
- you are encouraged to pass copies to your friends and associates.
- However, it is NOT public domain. If you find that PSP is of use
- to you, a contribution of $25.00 would be greatly appreciated.
- Registration also includes telephone support. To help keep the
- cost of quality software down, fill in the registration form
- below and send it with your contribution to:
-
- Lee Lorentz
- 3205 Harbor Lane North
- Plymouth, MN 55447
- (612) 557-1308
-
-
- Company ______________________________________
-
- Name ______________________________________
-
- Address ______________________________________
-
- City, State, Zip ______________________________________
-
- Telephone ( ) ______________________________
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (C) 1988, Lee Lorentz
- Page 4
-
-
-
-