home *** CD-ROM | disk | FTP | other *** search
- The p-pascal directory on this diskette contains DOS ".exe" files for
- the standard portable Pascal compiler and its p-code interpretor. The
- reference for these two programs is in the book:
-
- Pemberton, S. Pascal Implementation. Ellis-Horwood Publishers,
- Ltd., England, 1981.
-
- The Pascal programs listed in the above book have been translated into
- ANSI C programs that use huge pointer arrays and compiled to run under
- the DOS 3.2 operating system.
-
-
- NOTE ON USING THE COMPILER:
-
- This implementation limits Pascal sets to 64 members and strings to no
- more than 11 characters apiece.
-
- Some small source program examples are included in the "samples"
- directory on this diskette. They illustrate the lower case input re-
- quired by the compiler and the required command parameters.
-
- Note in particular that using (*$c+*) causes programs to be compiled.
- Without the c+ present, the compiler only checks for errors without
- generating code.
-
- Command line calling sequences for the compiler and interpretor are as
- described below.
-
- For the compiler:
-
- compiler your_source_code.inp p_code_output.prr
-
- or
-
- compiler con p_code_output.prr
-
- The above command line illustrates how source programs can be typed in
- from the keyboard if "con" is used as an argument on the compiler com-
- mand line; but editing is limited to the current line only. Refer to
- the DOS manual description of the "copy con output_file" command for
- information about how to use the console keyboard for program input to
- the compiler. In particular, "control-Z" or ^Z is used as the end of
- file mark to terminate source programs.
-
- The file extensions ".prr" and ".prd" refer to the Pascal compiler
- listings in the above book. ".pas" and ".pcd" are just handy mnemonics
- and are not required as file extensions.
-
- Compiler listings are sent to the screen, unless DOS I/O redirection
- is used:
-
- compiler source.pas object.pcd > lpt1 (* parallel printer *)
-
- or
-
- compiler source.pas object.pcd > com1 (* serial printer *)
-
- or
-
- compiler source.pas object.pcd > a:listing.asc
-
-
- NOTES ON USING THE INTERPRETOR:
-
- For the interpretor:
-
- interpretor p_code_input.prd temp_file.prr
-
- or
-
- interpretor p_code_input.pcd temp_file.prr
-
- The interpretor also has available the standard Pascal input and
- output files, known in the C language as stdin and stdout. So
- programs compiled for the interpretor can access up to three files.
-
- Note that the interpretor has some limitations, most important of
- which is that strings are limited to 11 characters at present. Also,
- sets can have up to 64 members. This is a relatively complete Pascal
- otherwise. It is intended as a teaching system, with the p-code in-
- terpretor to be used by students in compiler courses. Thus, the p-code
- output from the compiler is in ascii format, so that it can be in-
- spected and compared with the source code and used in conjunction with
- the listings in the above book.
-
- Compiler error messages use the error number format that appears in
- the book
- Jensen, K. and Wirth, N. Pascal User Manual and Report.
- Springer Publishing Co., 1974.
-
- C source listings are available for a small charge from
-
- Victor Schneider
- 291 Summit Avenue
- Brighton, MA 02146 USA
-
-