home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug175.arc
/
JRTMAN1.LBR
/
JRTMAN.0Z1
/
JRTMAN.001
Wrap
Text File
|
1979-12-31
|
16KB
|
542 lines
.OP
JRT Pascal User's Guide version 3.0 NOT FOR SALE -1-
JRT Pascal version 3.0
This is a major enhancement over earlier versions of JRT Pascal:
version release date
------- ------------
1.3 March 1980
1.4 August 1980
2.0 January 1982
2.1 July 1982
2.2 November 1982
3.0 March 1983
Version 3.0 includes internal improvements and these major new
features:
1. expanded user manual with 3-ring binder
2. JRT Pascal reference card
3. full support for indexed files (section 7.)
4. CRTMAP utility for full-screen record display (15.)
5. PICTURE external function for number formatting (7.10)
6. full support for Pascal file variables and GET/PUT (7.)
7. dynamic arrays - ALLOCATE, DEALLOCATE (4.9)
8. SEARCH external function (5.20)
9. %INCLUDE directive (3.4)
10. improved compiler listing, %TITLE, %PAGE(n)
To make use of the new features, programs written for earlier
versions should be recompiled under version 3.0.
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -2-
1. Introduction
Pascal is a high level programming language named after the
French philosopher and mathematician Blaise Pascal (1623-1662).
Nicklaus Wirth developed the language beginning in 1968. It is a
descendent of the Algol family of languages which incorporates
principles of structured programming.
JRT Pascal was designed specifically for the CP/M operating
system. It includes many state of the art features not before
available in any microcomputer language.
1.1 JRT Pascal features
With JRT Pascal, programs of practically unlimited size can be
developed. External procedures and functions written in Pascal or
assembly language are separately compiled. They are automatically
loaded from disk when they are first referenced or they may be merged
with the main program to form one module. The advanced dynamic
storage system will purge infrequently used procedures if storage
becomes full. Dynamic storage compression ensures the optimum use of
the main storage resource.
The floating point arithmetic provides 14 digits of precision.
All standard functions are supported.
The input/output system supports sequential and two types of
random disk files. With the "relative byte address" option, random
files of variable length records can be processed. Disk file data can
be written in either ASCII format or internal binary format.
The CALL builtin procedure provided direct access to all CP/M
operating system services. The MAP builtin procedure allows any
region of main storage to be accessed as if it were a Pascal
variable. Hardware input/output ports are directly accessable.
Debugging is simplified by the line number trace and the
procedure name trace which can both be turned on and off by the
program at run-time.
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -3-
Activan - the activity analyzer - can be used to monitor the
execution of a program and print out a histogram showing the amount
of activity in each program area.
1.2 Hardware requirements
The compiler requires a minimum of 56K of main storage. One disk
drive with at least 90K of storage is needed, but two or more are
strongly recommended.
1.3 List of files
JRT Pascal compiler:
JRTPAS3.COM
PASCAL0.INT
PASCAL1.INT
PASCAL2.INT
PASCAL3.INT
PASCAL4.INT
PASCAL.LIB
Run-time environment:
EXEC.COM
External functions:
ARCTAN.PAS
COS.PAS.
EXP.PAS
LN.PAS
SIN.PAS
SQRT.PAS
External procedure assembler:
JRTASM.INT
External procedure linker:
LINKER.INT
CRT Mapping utility:
CRTMAP.PAS
System customization program:
CUSTOMIZ.INT
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -4-
Block letters external procedure:
LETTERS.INT
Indexed file processing procedures:
INDEX0.INT
INDEX1.INT
INDEX2.INT
Table search procedure:
SEARCH.INT
Report number formatting facility:
PICTURE.INT
Dynamic trace control external procedure:
DEBUG.INT
Utility to convert Microsoft modules:
CONVERTM.INT
Statistical external procedure:
JSTAT.PAS
Graph preparation external procedure:
JGRAF.PAS
Sample assembly language external procedures:
SETBIT.ASM
RESETBIT.ASM
TESTBIT.ASM
Additional external procedures:
ERASE.INT
RENAME.INT
VERIFY.INT
Checksum information for file verification:
READTHIS
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -5-
1.4 For Beginners
This section explains how to use JRT Pascal for those who are
new to personal computing or who are unfamiliar with "compiled"
languages.
This is a tutorial on how to operate our implementation of the
Pascal language. For tutorial information of the Pascal language
itself, we refer you to the many text books now available. The one
book we strongly recommend is the standard definition of Pascal
written by its inventor, Nicklaus Wirth.
Pascal User Manual and Report
by Jensen and Wirth
published by Springer-Verlag
Developing Pascal programs
Developing a Pascal program is a three step process:
1. create or modify a Pascal source program with any
standard CP/M editor, like ED, WORDSTAR, or MAGICWAND
2. compile the Pascal source program into an intermed-
iate program
3. execute the intermediate code (i.e., run the program)
This process is illustrated in the flowchart on page 8.
File names and file types
In CP/M, the names of data files and program files consist of
two parts: a filename of up to 8 characters, and a filetype of up to
3 characters. These two parts are separated by a period.
REPORT.LST
A.PAS
A.INT
STAT.COM
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -6-
The JRT Pascal compiler assumes that the source program has a
filetype of '.PAS'. It creates an intermediate program with a
filetype of '.INT'.
Editors
Any standard CP/M-compatible editor may be used to create or
modify programs in JRT Pascal. The demo program listing which
follows uses the CP/M line editor ED.COM
Required files **** IMPORTANT ****
The compiler and run-time system are large and complex programs.
TO make best use of limited main storage they are divided into
modules. These modules must be present on your disks when using the
compiler or run-time system. The modules need not all be on the A:
disk. They may be on either A: or B: disk, the Pascal system will
automatically locate them. (Use CUSTOMIZ to setup or modify the 'disk
search list' for both the run-time and compile-time modules if disks
other than A: or B: are to be searched.)
The compiler requires all these files:
JRTPAS3.COM
PASCAL.LIB
PASCAL0.INT
PASCAL1.INT
PASCAL2.INT
PASCAL3.INT
PASCAL4.INT
The run-time system (execution) requires the files:
EXEC.COM
PASCAL.LIB
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -7-
Demo program
In order to clearly illustrate the program development process,
a flowchart of this process is included here. An actual computer
listing of the three step process (create, compile, run) for a small
demo program follows the flowchart.
The demo program is named A.PAS. It computes and displays the
squares of the numbers 1 to 10.
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -8-
Program Development Flowchart
-----------
! start !
Commands ----------- Actions
________ ! -------
--------->!
! !
! V
! -----------
ED A.PAS ! ! ED.COM ! create/modify
! ! ! program
! -----------
! !
! !
! V
! -----------
JRTPAS3 A ! !JRTPAS3. ! compile the
! ! COM ! program
! -----------
! !
! !
! V
! -----------
!yes ( COMPILE )
!<---( ERRORS? )
! -----------
! ! no
! !
! V
! ------------
EXEC A ! ! EXEC.COM ! run the program
! ------------
! !
! !
! V
! -----------
!no ( RESULTS )
!<---( OKAY? )
-----------
! yes
!
V
----------
! STOP !
----------
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -9-
Actual computer listing: Create, Compile, and Run the program
-------------------------------------------------------------------------
A>ed a.pas -- use editor to create program A.PAS
NEW FILE
: *i
1: { demo program to print squares of numbers 1 to 10 }
2:
3: program a;
4:
5: var
6: i : integer;
7:
8: begin
9: for i := 1 to 10 do
10: writeln( i, sqr(i) );
11: end.
12: ^z
: *e
-------------------------------------------------------------------------
A>jrtpas3 a -- compile the demo program
JRT Pascal ver 3.0
Copyright 1983 JRT Systems
0000 0001: { demo program to print squares of numbers 1 to 9 }
0000 0002:
0000 0003: program a;
0000 0004:
0003 0005: var
0003 0006: i : integer;
0003 0007:
0006 0008: begin
0010 0009: for i := 1 to 10 do
0028 0010: writeln( i, sqr(i) );
0029 0011: end.
No errors detected
Module size = 45 dec bytes
End of compile for A
-------------------------------------------------------------------------
A>exec a -- Run the program
Exec ver 3.0
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100
Program termination
Copy compliments of Merle Schnick SECTION 1: Introduction
è
JRT Pascal User's Guide version 3.0 NOT FOR SALE -10-
Basic terms
compiler - The Pascal compiler converts Pascal source programs to
intermeditate program files. It reads in a Pascal source
program and writes out an INT file. The compiler also
displays the program at the terminal during the compilation
process.
debugging - Correcting errors in the program. There are two main
catagories of errors or "bugs": those which can be detected
by the compiler and those which appear only during the
execution of the program. Both may be corrected by
modifying the source program and re-compiling.
intermediate program - This is an internal code version of the
program which is created by the compiler. It is a file with
a filetype of INT.
source program - This is the actual Pascal program which is a text
file and may be printed or viewed on a terminal, i.e., all
the bytes are in the range of the ASCII character set and
are therefore printable characters. It has a filetype of
PAS.
trace - There is a JRT Pascal feature which displays the line
number of each line in the source program during execution.
This is very useful in locating the cause of some program
errors.
Copy compliments of Merle Schnick SECTION 1: Introduction
è