IMD 1.16: 1/06/2007 10:04:43 FOGCPM.172 --FOGCPM172JRTMAN 000*JRTMAN 001 -04-00 87 JRTMAN 002J !"JRTMAN 003(#$%&'JRTMAN 004l()*+,-./012345JRTMAN 0056789:;<=>?@ABCDEJRTMAN 005rFGHIJKLMNOPQRST-CPM172 DOCJRTMAN 008UVJRTMAN ERRWJRTMAN IFOTXYZ[\]^_`abJRTMAN TOCPcdefghijklJRTTECH NOTmnoPAS400 INTpqrstuvwxyz{|}~PAS400 INT>PAS404 INT PAS405 INTPAS406 INTPICTURE INT*READTHIS RENAME INTRESETBITASMSEARCH INTSETBIT ASMSIN PAS SQRT PASTESTBIT ASMVERIFY INTThis is the disk name.  vv vv eeeeeee rrrrrrr 3333333 00000 vv vv ee rr rr 33 00 00 vv vv eeee rrrrrrr 3333 00 00 vv vv ee rr rr 33 00 00 vvv eeeeeee rr rr :: 3333333 :: 00000 JJ RRRRR TTTTTTT PPPPP AA SSSSS CCCCC A LL JJ RR RR TT PP PP AAA SS SS CC CC AAA LL JJ RR RR TT PP PP AA AA SS CC AA AA LL JJ RR RR TT PP PP AA AA SS CC AA AA LL JJ RRRRRR TT PPPPPP AAAAAAA SSSSS CC AAAAAAA LL JJ JJ RRRR TT PP AA AA SS CC AA AA LL JJ JJ RR RR TT PP AA AA SS SS CC CC AA AA LL LL JJJJ RR RR TT PP AA AA SSSSSS CCCC AA AA LLLLLLLL UU UU SSSSS EEEEEE RRRRR """ SSSSS UU UU SS SS EE RR RR "" SS SS UU UU SS EE RR RR "" SS UU UU SS EE RR RR SS UU UU SSSSS EEEEE RRRRRR SSSSS UU UU SS EE RRR SS UU UU SS SS EE RR RR SS SS UUUUUUU SSSSSS EEEEEEE RR RR SSSSSS GGGGGG UU UU IIIIII DDDDDDD EEEEEEE GG GG UU UU II DD DD EE GG UU UU II DD DD EE GG UU UU II DD DD EE GG UU UU II DD DD EEEEEE GG GGGGG UU UU II DD DD EE GG GG UU UU II DD DD EE GGGGG UUUUUUU IIIIII DDDDDDDD EEEEEEE -------------------------------------------------------------------------- JRT Systems, 45 Camino Alto, Mill Valley, CA 94941 JRT Pascal User's Guide version 3.0 Preface A T L A S T . . . I T H A S A R R I V E D JRT CP/M PASCAL VERSION 3.0 You've seen it advertised for $29.95 in the magazines. Thanks to JRT's amazing generousity, I can give it to you free and legal. That's right, and JRT says exactly that, in writing, in their advertisements: "IN ADDITION, IF YOU WANT TO COPY THE DISKETTE OR MANUAL - SO LONG AS IT'S NOT FOR RESALE - IT'S O.K. WITH US. PASS IT ON TO YOUR FRIENDS!" Okay, JRT - now don't blame me for passing it on to my friends... And thank you for this very liberal policy!  This copy compliments of Merle Schnick NOT FOR SALE JRT Pascal User's Guide version 3.0 Preface The following is included, as clarification by JRT about their rights beyond their preceeding generousity. It is intended for those of you who might consider selling it. COPYRIGHT Copyright 1983 by JRT SYSTEMS. All rights reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise, without the prior written permission of JRT Systems, 45 Camino Alto, Mill Valley, California, 94941. DISCLAIMER JRT SYSTEMS makes no representations or warranties with respect to the contents ereof and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. Further, JRT SYSTEMS reserves the right to revise this publication and to make changes from time to time in the content hereof without obligation of JRT SYSTEMS to notify any person of such revision or changes. TRADEMARKS JRT Pascal is a trademark of JRT SYSTEMS, CP/M is a registered trademark and MP/M is a trademark of DIGITAL RESEARCH. This copy compliments of Merle Schnick NOT FOR SALE k of JRT SYSTEMS, CP/M is a registered trademark and MP/M is a trademark of DIGITAL RESEARCH. This copy compliments of Merle Schnick NOT lly disclaims any implied warranties of merchantability or fitness for any particular purpose. Further, JRT SYSTEMS reserves the right to revise this publication and to make changes from time to time in the content hereof without obligation of JRT SYSTEMS to notify any person of such revision or changes. TRADEMARKS JRT Pascal is a trademark of JRT SYSTEMS, CP/M is a registered trademark and MP/M is a trademark of DIGITAL RESEARCH. This copy compliments of Merle Schnick NOT  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 ring execution. This is very useful in locating the cause of some program errors. Copy  JRT Pascal User's Guide version 3.0 NOT FOR SALE -11- 2. Operating JRT Pascal JRT Pascal is a fully CP/M compatible language system. The distribution disk does not contain a copy of the operating system due to copyright restrictions. It is recommended that the distribution disk be backed up immediately and not be used as the main running disk. 2.1 Writing Pascal programs Pascal programs can be developed using any standard editor program. The ASCII character set is used throughout JRT Pascal. The program file must have a CP/M filetype of '.PAS'. The output modules produced by the compiler, linker and assembler are given a filetype of '.INT'. When the compiler is processing, it creates temporary storage files with a filetype of '.$$$'. These are normally deleted, but if processing should be interrupted, they may  remain on the disk, but will be deleted during the next operation of the compiler. 2.1.1 Identifiers Identifiers are the names assigned to variables, procedures, etc. They may be up to 64 characters long. All characters are significant. They are internally converted to upper case by the compiler. Identifiers must begin with an alphabetic character. Following characters may be alpha, numeric, the underline character and the dollar sign. Spaces are not allowed. x1 total_value DISTANCE ADDRESS compute_and_print_average INITIALIZE_PROC MTD_sales compute_and_print_totals percent_markup arc_cotangent Using meaningful data and procedure names greatly improves the readability of programs and serves as self-documentation. Copy compliments of Merle Schnick SECTION 2: Operating JRT Pascal JRT Pascal User's Guide version 3.0 NOT FOR SALE -12- 2.1.2 Numbers Integers or whole numbers in Pascal occupy two bytes of storage and range from -32768 to +32767. In both the Pascal program and in input/output, they can be entered in decimal or hexadecimal format. Hex format integers have an 'H' suffix character. If the first hex digit is A,B,C,D,E, or F then it must be preceded by a zero digit. 3AH 0EADH 12FH 0cf00h -0ffffh +50h Real numbers in JRT Pascal provide 14 digits of precision and floating point capability. The exponent can range from -64 to +63. The numbers are stored in an 8 byte binary-coded-decimal (BCD) format  which eliminates errors in converting between internal and printable formats. 3.14159 0.000098 250000.000321 0.442e+35 2.0E-60 -15.011e+03 Real numbers must include the decimal point. (NOTE: This version of Pascal also requires that at least one digit exists to the RIGHT of the decimal, even if only a zero. i.e., the real number 3. will give a real number format error, where 3.0 will not. Also note that .1 is not legal, but 0.1 is). The exponent field is optional, but when used MUST be in a FIXED FORMAT: character 'e', sign, 2 digits. The sign, even if the value is positive, must be used. (NOTE: Forgetting to include the '+' sign in the exponent field of this version of Pascal does NOT produce a compile-time error, but the results are not predictable. i.e., 1.456e07 vs. 1.456e+07 input).  2.1.3 Comments Comments in Pascal can be inserted anywhere in the program. They can be enclosed by either braces { } or by the character pairs (* *). { comment sample } (* comment sample # 2 *) Copy compliments of Merle Schnick SECTION 2: Operating JRT Pascal JRT Pascal User's Guide version 3.0 NOT FOR SALE -13- 2.2 Compiling Pascal programs JRT Pascal is a one-step compiler; no assembly or link is ever required. The assembler and linker provided are for advanced programming with external procedures. To compile a program, enter: JRTPAS3 filename <$ options> Examples: JRTPAS3 TESTPGM JRTPAS3 STATISTC $E JRTPAS3 INVENTRY $ELP C:JRTPAS3 B:PROJECT1 $E JRTPAS3 D :PLOT $E The filetype of the program must be '.PAS'. The filename may be different from the program name. The compiler option switches are: E - error stop, interrupt processing on detection of an error, issue message to console, ask user whether or not to continue compiling. L - prepare program for line trace, identical to inserting %LTRACE directive at start of program. P - prepare program for procedure trace, identical to inserting %PTRACE directive at start of program. Tx - control the output listing, x may be: A..P - write listing to '.LST' file on disk x X - write listing to console device Y - write listing to list device Z - suppress the output listing If errors are detected, verbal error messages will be displayed at the console imbedded in the source listing. Copy compliments of Merle Schnick SECTION 2: Operating JRT Pascal JRT Pascal User's Guide version 3.0 NOT FOR SALE -14- The following files are required by the compiler: JRTPAS3.COM PASCAL.LIB PASCAL0.INT PASCAL1.INT PASCAL2.INT PASCAL3.INT PASCAL4.INT The compiler does not need to be located on the A: disk drive. The main compiler module JRTPAS3.COM and its external procedures can be placed on any disk drive. Initially, the compiler assumes a two disk system. The CUSTOMIZ program should be used to update the compiler's and EXEC's disk search lists. (See section 9). 2.3 Executing Pascal programs A program which has compiled with no errors can be executed by typing and entering: EXEC filename <$ options> Examples: B:EXEC D:PLOT EXEC TESTPGM $A EXEC B:PROJECT1 The file PASCAL.LIB must be present on one of the disks. The run-time option switches are: A - generate an Activan interrupt before program before program begins execution (refer to appendix for description of Activan, p.117). L - activate the line trace (program must have been compiled with $L option or the $LTRACE directive). Copy compliments of Merle Schnick SECTION 2: Operating JRT Pascal JRT Pascal User's Guide version 3.0 NOT FOR SALE -15- N - generates and Exec interrupt before the program begins execution, used for trace control (refer to section on debugging). P - activate the procedure trace (program must have been compiled with the $P option or %PTRACE direc- tive). While the program is running , keying Control-a or control-n will cause an Activan or Exec interrupt. At that time, certain system parameters can be modified. When in interrupt mode, keying a space character will cause a list of available commands to be displayed. Keying a control-p in interrupt mode causes most system displays to be echoed to the system printer. If any error or warning conditions occur during the running of the program, a verbal error message is displayed at the console. If the error is severe and the program must terminate, a formatted display of critical system data is provided. This display is described in the section on debugging.  Copy compliments of Merle Schnick SECTION 2: Operating JRT Pascal  system data is provided. This display is described in the section on debugging. unning , keying Control-a or control-n will cause an Activan or Exec interrupt. At that time, certain system parameters can be modified. When in interrupt mode, keying a space character will cause a list of available commands to be displayed. Keying a control-p in interrupt mode causes most system displays to be echoed to the system printer. If any error or warning conditions occur during the running of the program, a verbal error message is displayed at the console. If the error is severe and the program must terminate, a formatted display of critical system data is provided. This display is described in the section on debugging.   JRT Pascal User's Guide version 3.0 NOT FOR SALE -16- 3. Compiler Directives Compiler directives are instructions to the compiler which are inserted in the Pascal source program. They may be inserted in the program anywhere a comment may appear. (Unlike JRT Pascal Version 1, they must not be followed by a semicolon delimiter.) 3.1 Listing Control Directives When a Pascal program is being compiled, the listing will be displayed on the system console. Five directives are provided to control the program listing. %NOLIST - stop display of program listing %LIST - resume display of program listing %PAGE - start a new page in the compiler listing, %PAGE(n) and optionally set the "lines per page" value to n. %TITLE('string') - print title at top of each page' activated by first %PAGE directive. 3.2 Line Trace Directives JRT Pascal line tracing will optionally display the source program line numbers as the program executes. The size of the output module will be increased by three bytes per line. %LTRACE - generate line trace codes %NOLTRACE - stop generating line trace codes - this allows storage saving by tracing only a portion of the program. JRT Pascal line tracing can be turned on or off under program control by using the SYSTEM builtin procedure. The range of line numbers to be traced can also be modified at run-time by this procedure. WHEN THE PROGRAM BEGINS EXECUTION, THE LINE TRACE IS DISABLED. Copy compliments of Merle Schnick SECTION 3: Compiler Directives JRT Pascal User's Guide version 3.0 NOT FOR SALE -17- SYSTEM( LTRACE ) - activate line trace SYSTEM( NOLTRACE ) - disable line trace SYSTEM( LRANGE, lower, upper ) - set range of line numbers for line trace - lower and upper are integer expressions. When a program is compiled with the %LTRACE directive, then if the run-time system detects an error condition, the line number will be displayed with the error message. 3.3 Procedure Trace Directives When procedure tracing is activated, the name of each procedure or function will be displayed on entry and exit. On entry to a procedure the activation count (total number of times called) for that procedure is also listed. %PTRACE - generated procedure trace codes %NOPTRACE - stop generating procedure trace codes Procedure tracing can be turned on and off under program control by using the SYSTEM builtin procedure. WHEN THE PROGRAM BEGINS EXECUTION, THE PROCEDURE TRACE IS DISABLED. SYSTEM( PTRACE ) - activate procedure trace SYSTEM( NOPTRACE ) - disable procedure trace When a program is compiled with the %PTRACE directive, then if the run-time system detects an error, the name of the procedure most recently activated will be displayed with the error message. NOTE that the procedure most recently activated is not necessarily the currently active procedure. If the procedure being entered is an external procedure then the trace message is flagged with and asterisk.  Copy compliments of Merle Schnick SECTION 3: Compiler Directives JRT Pascal User's Guide version 3.0 NOT FOR SALE -18- 3.4 Source file INCLUDE directive A section of source program code is sometimes used by different main programs of external procedures. Rather than enter this common code at each point it is used, it is easier to use a %INCLUDE directive. This has the effect of inserting the named Pascal code file in place of the directive. %INCLUDE('filename.typ') %INCLUDE files may not be nested. This directive should be placed on a line by itself. If the %INCLUDE is indented with spaces, then the entire included file is also indented by the same amount. %INCLUDE('GLOBALS.LIB') %INCLUDE('C:VARDCLS.PAS') %INCLUDE('B:SORTPROC.OLD')   JRT Pascal User's Guide version 3.0 NOT FOR SALE -19- 4. Data Types Pascal is a language rich in data types. Unlike Basic, which provides only two or three data types, Pascal provides eight: integers, real numbers, Booleans, characters, structured variables, sets, pointers, and dynamic strings. These forms can be combined in records and arrays to form data aggregates that closely relate to the application area. Records and arrays can contain other records and arrays and pointers with no restrictions on nesting or even on recursive definitions. It is these features that set Pascal apart from earlier languages like Cobol, Fortran, PL/I. Pascal recognizes the importance of powerful facilities for describing the data in a program as well as the active statements. 4.1 Integers Integers or whole numbers occupy two bytes. They are represented in twos complement format. The range is -32768 to +32767. Integer literals in the source program and in console or disk input may be entered as hex values. Standard Intel hex format is used. The last character must be an `H'. A leading zero is required if the first digit is A, B, C, D, E, or F. 1ah +0C35H -0ffh 0c00h 1234H 4.2 Real numbers Real numbers have 14 digits and are expressed in floating point format. The exponent range is from -64 to +63. The exponent field is not required in the source program or input, but when present it must be entered in a fixed format. The exponent format is `e+00' or `e-00'. (see NOTES section 2.1.2). Copy compliments of Merle Schnick SECTION 4: Data Types JRT Pascal User's Guide version 3.0 NOT FOR SALE -20- 32.01e+04 1.075 -3.14159 -1234567.8901234E-47 In source programs, the decimal point must be included to distinguish real numbers from integers. (NOTE: This version of Pascal requires that at least one digit is entered to the RIGHT and LEFT of the decimal point. i.e., 4. and .4 will produce errors where 4.0 and 0.4 will not). 4.3 Booleans Boolean variables may have only two values: TRUE or FALSE. Booleans may be used directly in output statements but should NOT be used directly in input statements. 4.4 Char The char data type is one character. Packed char fields are not meaningful on 8-bit microcomputers and are not supported. The ASCII character set is used in JRT Pascal. 4.5 Structured variables Structured variables are records or arrays which are treated as aggregates. For example: a record of one type could be compared directly against a record of another type. Structured variables may be compared (all six operators), assigned, input/output, concatenated, used as parameters and function return values without restriction. In addition to the CONCAT builtin function, the `+' operator indicates concatenation of structured variables or dynamic strings. Structured variables to be compared may have different lengths. The result is determined as if the shorter one is extended by spaces. In assigning structured variables of different lengths, if the receiving field is shorter then truncation will occur. If the receiving field is longer then the remainder of it is padded with spaces. Copy compliments of Merle Schnick SECTION 4: Data Types JRT Pascal User's Guide version 3.0 NOT FOR SALE -21- Arrays of type char constitute fixed length strings. Unlike dynamic strings, these have no (hidden) two byte length prefix. Arrays of fixed length strings are useful for many type of text processing. TYPE CHAR100 = ARRAY [1..100] OF CHAR; TABLE = ARRAY [1..40] OF CHAR100; VAR T : TABLE; BEGIN T:= ' '; (*CLEARS ENTIRE TABLE*) T[1,8] := '*'; (*STORE 1 CHARACTER *) T[15] := 'JRT Pascal is the best'; ... END; 4.6 Dynamic strings Dynamic strings are an extension to standard Pascal. A hidden two-byte prefix on the string contains the string's current length in bytes. JRT Pascal dynamic strings may be up to 64k bytes in length. Of course the computer's main storage size rest ricts the size to a smaller value. Other Pascals limit strings to 255 bytes. The maximum size of a string variable is declared with the variable definition. If no size is specified, the default is 80 bytes. VAR S1 : STRING; S2 : STRING[4000]; S3 : STRING[12]; Dynamic strings may be used in the same way as structured variables: comparisons, assignment, input/output, parameters, and function return values. Copy compliments of Merle Schnick SECTION 4: Data Types JRT Pascal User's Guide version 3.0 NOT FOR SALE -22- NOTE - Dynamic string variables may NOT be used in READ statements directed to files, only to the console. To read string data from files, fixed strings (arrays of characters) must be used.  The individual characters of a string may be accessed and updated. If an attempt is made to access an element of a string beyond the current length of the string, a run-time error occurs. S1[4] := 'X'; WRITELN( S2[1500] ); S1[J] := S1[J+1]; S3[1] := UPCASE( S3[1] ); Several builtin procedures and functions are available to enhance string processing. Refer to the sections on builtin functions and on builtin procedure for complete descriptions. name purpose ---- --------- CONCAT concatenate n strings COPY extract portion of string DELETE delete portion of string INSERT insert a string into another LENGTH return current string size POS search string for a pattern 4.7 Sets Set variables occupy 16 bytes. The entire ASCII caracter set may by represented in the 128 bits. LOW_CASE := ['a'..'z']; UP_CASE := ['A'..'Z']; NUMERIC := ['0'..'9']; ALPHAMERIC := LOW_CASE + UP_CASE + NUMERIC; ALPHABETIC := ALPHAMERIC - NUMERIC IF NOT (INPUT_CHAR IN ALPHAMERIC) THEN WRITELN('INVALID INPUT CHAR'); Copy compliments of Merle Schnick SECTION 4: Data Types JRT Pascal User's Guide version 3.0 NOT FOR SALE -23- NOTE - Set variables have no meaningful format in text format input/output. Sets may be input/output to disk files which are opened for binary format processing. 4.8 Pointers Pointers contain the virtual address of dynamic variables  created by the NEW procedure and of ghost variables created by the MAP procedure. Pointers are two bytes in size. The value stored in a pointer variable is NOT the actual address of the dynamic variable - it is the virtual address. The actual address of a dynamic variable may be obtained with the ADDR builtin function. ACTUAL_ADDRESS := ADDR( PTR^ ); Note that the actual address of a dynamic variable may change during program execution, but the virtual address is fixed for the life of the variable. 4.9 Dynamic arrays Dynamic arrays are a JRT extension to the Pascal language. Arrays are a widely used device for storing and retrieving logically identical data elements. Often it is not known in advance how many data elements will be processed - thus it is necessary to create arrays to hold the maximum number of elements that ever may be processed. With dynamic arrays, the array's actual size need not be "hard-coded" into the source program. The array size may vary with each run of the program or even at different times within the same run. Copy compliments of Merle Schnick SECTION 4: Data Types JRT Pascal User's Guide version 3.0 NOT FOR SALE -24- In some programs, dynamic arrays can greatly improve storage use efficiency. This implies that the program can operate over a much wider range of situations. IMPORTANT - Dynamic arrays MUST be actual variables - they may NOT be elements of other arrays or fields of record variables. Files of dynamic arrays are not allowed. Declaring dynamic arrays The declarations of dynamic arrays in either the TYPE or VAR sections is identical to static arrays exce pt that the indexes are not specified as subranges. The indexes must be specified as either the reserved word INTEGER or CHAR. No other index declaration is allowed in dynamic arrays. Static and dynamic indexes may not be mixed in the same array declaration. TYPE MATRIX = ARRAY [ INTEGER, INTEGER ] OF REAL; VAR M : MATRIX; TABLE : ARRAY [ CHAR ] OF STRING [20]; INDEX : ARRAY [ INTEGER, CHAR ] OF INTEGER; Allocating and deallocating dynamic arrays A dynamic array may not be referenced until it has been allocated. Doing so would cause a run-time error. Allocation accomplishes two purposes: 1. establish the dynamic arrays currnet lower and upper index bounds for each dimension. 2. allocate storage for the dynamic array in dynamic storage. Current bounds are stored in an array control block (ACB) which also contains an allocation flag, dimension count, and the virtual address of the dynamic array. A builtin procedure performs the allocation operation. ALLOCATE ( dyn_array_variable [ subrange_expr1,... subrange_exp_n ] ); Copy compliments of Merle Schnick SECTION 4: Data Types JRT Pascal User's Guide version 3.0 NOT FOR SALE -25- Note that an ALLOCATE must be used for each array VARIABLE declared, NOT for aaray TYPES. ALLOCATE ( M [1..10, 0..50] ); ALLOCATE ( TABLE ['A'..'M'] ); ALLOCATE ( INDEX [I..I+10, CHAR1..CHAR2] ); The bounds of a dynamic array may be changed by executing another ALLOCATE with different parameters. The data stored in a dynamic array is lost when it is reallocated. Dynamic arrays follow the standard Pascal rules for scope of reference. They remain allocated until they are explicitly deallocated. Since dynamic arrays use storage, they should be deallocated when they are no longer needed. DEALLOCATE ( dyn_array_variable ); Examples: DEALLOCATE ( M ); DEALLOCATE ( TABLE ); DEALLOCATE ( INDEX ); Dynamic arrays declared and allocated within a procedure are not automatically deallocated on the termination of that procedure. Programming Notes: 1. Dynamic arrays may not be referenced as structures. Only elements of dynamic arrays may be referenced in programs. 2. FILLCHAR should not be used to initialize dynamic arrays. 3. Dynamic arrays should always be DEALLOCATED before being reallocated to a different size 4. Full file variables now supported. File variables may be used as reference parameters (indicated by VAR) but should NOT be used as value parameters. (see section 7.) Copy compliments of Merle Schnick SECTION 4: Data Types iables may be used as reference parameters (indicated by VAR) but should NOT be used as value parameters. (see section 7.) Copy compliments of Merle Schrrays declared and allocated within a procedure are not automatically deallocated on the termination of that procedure. Programming Notes: 1. Dynamic arrays may not be referenced as structures. Only elements of dynamic arrays may be referenced in programs. 2. FILLCHAR should not be used to initialize dynamic arrays. 3. Dynamic arrays should always be DEALLOCATED before being reallocated to a different size 4.  JRT Pascal User's Guide version 3.0 NOT FOR SALE -26- 5. Builtin functions JRT Pascal provides numerous builtin functions and several external functions. JRT extensions are indicated with an asterisk. External functions are marked with an 'x'. function return value -------- ------------- ABS absolute value, integer/real * ADDR address of variable x ARCTAN arc tangent CHR convert integer to character * CONCAT concatenate n strings * COPY extract portion of string x COS cosine x EXP exponential * FREE amount of free space * HEX$ convert variable to hex format * LENGTH length of string x LN natural logarithm ODD test for odd value ORD convert character to integer * PORTIN hardware port input * POS search string for pattern PRED preceding value * REAL$ convert real number to string ROUND convert real number to integer x* SEARCH fast table search x SIN sine SQR square, integer/real x SQRT square root SUCC succeeding value TRUNC convert real number to integer * UPCASE convert string to upper case Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -27- 5.1 ABS Format 1 ABS( integer_expression ); Format 2 ABS( real_expression ); The ABS standard function returns the absolute value of an integer or a real expression. Examples: A := ABS( X ); WRITELN( 'ABSOLUTE VALUE IS',ABS( COS( Y ))); B := ABS( X + Y / Z ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -28- 5.2 ADDR Format ADDR( variable ); The ADDR function returns the real address of any variable, array element, field of a record, or dynamic variable. Note that the address of a dynamic variable may change when a storage compression occurs. If the address of a dynamic variable is needed, the ADDR function should be used to obtain the current address immediately before use. Examples: ADDRESS_OF_X := ADDR( X ); AD := ADDR( MATRIX[ X, Y+5 ]); DYN_VAR := ADDR( BASE^ ); DYN_VAR_2 := ADDR( BASE^.NEXT ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -29- 5.3 ARCTAN Format ARCTAN( real_expression ); This standard function returns the arc tangent of a real expression in radians. This is implemented as an external function. The declaration for an external function must be included in programs which reference it. FUNCTION ARCTAN ( X : REAL ): REAL; EXTERN; Examples: WRITELN( ARCTAN( A + 354159 )); NODE.VALUE := OLD_NODE.VALUE + ARCTAN( V ); NOTE: Pi can be conveniently determined by using this function as follows: VAR PI : REAL; FUNCTION ARCTAN ( X : REAL ): REAL; EXTERN; BEGIN PI := 4.0*ARCTAN(1.0); WRITELN('Pi is equivalent to ',PI) END. Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -30- 5.4 CHR Format CHR( integer_expression ); The CHR standard function converts an integer expression into a character. It is often used in sending control characters to output devices. Examples: WRITE( CHR( 12 )); WHILE PORTIN( MODEM ) = CHR(0FFH) DO I:=I+1; TAB := CHR( 9 ); CARRIAGE_RETURN := CHR( 0DH ); LINE_FEED := CHR( OAH ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -31- 5.5 CONCAT Format CONCAT( stringexpr1, stringexpr2,..., stringexprn ); The CONCAT string function concatenates two or more dynamic strings, literal strings, or structured variables. It returns a value of dynamic string of the length required. The plus sign can also be used to concatenate string expressions. Examples: OUTPUT_LINE := CONCAT( NAME, TAB, TAB, PHONE); WRITELN( CONCAT( 'VALUE', OPER, VALUE );  WRITELN( 'VALUE' + OPER + VALUE ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -32- 5.6 COPY Format COPY( string_expression, position, length ); The COPY function returns a string value extracted from the string_expression, beginning at position, for length characters. The position and length parameters are integer expressions. The first character of strings is at position 1. An error will occur if an attempt is made to copy from an area greater than the length of the string. Examples: CH := COPY( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', CH_NUM, 1 ); WRITELN( COPY( STR, POS( STR,'*' ), 5 ); WRITELN( COPY( 'THIS IS A STRING', 6, 4); (* output of above line is 'IS A' *) Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -33- 5.7 COS Format COS( real_expression ); The COS standard function returns the cosine of a real expression in radians. This is implemented as an external function. The declaration for an external function must be included in programs which reference it. FUNCTION COS ( X : REAL ): REAL; EXTERN; Examples: WRITELN( COS( ANGLE )); NODE.COSINE := COS( N ); WRITELN( COS( VELOCITY / CHARGE )); NOTE: For those who wish to deal in degrees, the following program format should be used: (a similiar program for SIN)  VAR PI,DR,COS_45_DEGREES,COS_45_RADIANS : REAL; FUNCTION ARCTAN ( X : REAL ): REAL; EXTERN; FUNCTION COS (X : REAL ): REAL; EXTERN; BEGIN PI := 4.0 * ARCTAN(1.0); DR := PI/180.0; (* CONVERT TO DEGREES *) COS_45_DEGREES := COS ( 45.0 * DR ); COS_45_RADIANS := COS ( 45.0 ); WRITELN( COS_45_DEGREES,' ' COS_45_RADIANS ) END. The output from the above program will be 0.7071067811867 0.5253219888207 Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -34- 5.8 EXP Format EXP( real_expression ); The EXP function computes e to the x power, where x is a real_expression. This is implemented as an external function. The declaration for an external function must be included in programs which reference it. FUNCTION EXP ( X : REAL ): REAL; EXTERN; Examples: X := EXP( Y ); PROJECTED_SALES := 1000 * EXP(YEAR / 100); VOLTAGE := EXP( SIN( PHASE ) ); SHIP_VELOCITY := EXP( WARP_FACTOR ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -35- 5.9 FREE Format FREE The FREE integer function returns the amount of storage currently available. Because the virtual storage manager may delete inactive external procedures, much more storage may be potentially available. The FREE function returns a 16-bit integer value.  If more than 32K of storage is available, the value of the integer would print out as negative, due to the limit on integer size. The following function converts unsigned integers to real number format to provide positive representation for numbers up to 65535. FUNCTION REALFREE : REAL; VAR TEMP : INDSGER; BEGIN TEMP := FREE; IF TEMP >= 0 THEN REALFREE := TEMP ELSE REALFREE := 65536.0 + TEMP; END; Examples: WRITELN('FREE SPACE =',FREE); IF REALFREE <= 2000.0 THEN WRITELN('STORAGE CRITICAL'); IF FREE >= 1500 THEN NEW( BUFFER ); IF FREE >= 4096 THEN BUFSIZE := 2048 ELSE BUFSIZE := 1024; RESET( INFILE, 'TEST.DAT', BINARY, BUFSIZE ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -36- 5.10 HEX$ Format HEX$( any_variable ); The HEX$ function converts any variable to hex format for display. The result is of type string and its length is twice the length in bytes of the input variable. Note that the 8080/Z80 microcomputers represent 16 bit integers in byte-reverse format, with low order byte followed by high order byte. That is, +ABCDH would appear in storage as CDABH. The HEX$ function converts all variables as they appear in storage. Often it is useful to display hex integers in the more usual order ABCD. The HEXINT function below makes this conversion: FUNCTION HEXINT ( X : INTEGER ): STRING[4]; VAR A : STRING[4]; BEGIN A := HEX$(X); HEXINT:=' '; HEXINT[1]:=A[3]; HEXINT[2]:=A[4]; HEXINT[3]:=A[1]; HEXINT[4]:=A[2]; END; Examples WRITELN( HEX$( 3.14159 )); WRITELN( HEXINT( ADDR( PTR^ ))); WRITELN( HEXINT( ADDR( FCB ))); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -37- 5.11 LENGTH Format LENGTH( dynamic_string_variable ); The LENGTH function returns an integer value which is the current length of the string variable. IMPORTANT - LENGTH may only be used with dynamic strings variables, not with expressions or any other data type. Examples: WRITELN( LENGTH( STR1 ) ); IF LENGTH(STR1) < 75 THEN STR1:=CONCAT( STR1, '----' ); FOR I:=1 TO LENGTH( NAME ) DO IF NOT (NAME[I] IN ALPHAMERIC) THEN NAME[I]:=' '; Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -38- 5.12 LN Format LN( real_expression ); The LN function computes the natural logarithm of a real expression. This is implemented as an external function. The declaration for an external function must be included in programs which reference it. FUNCTION LN ( X : REAL ): REAL; EXTERN; Examples: X := LN( Y );  WRITELN( LN( X + SQR( Y ) ) ); IF LN( ATOM_WEIGHT ) < 1000.0 THEN WRITELN(F1; ATOM); A := SQRT( LN(Z)); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -39- 5.13 ODD Format ODD( integer_expression ); ODD is a Boolean function which returns the value true if the integer_expression is odd otherwise it returns false. Examples: IF ODD(X) THEN TEST_FOR_PRIME(X); IF ODD(I) THEN I:=I+1; WHILE ODD( PORTIN(15H)) DO X:=X+1.0; WRITELN( ODD(Y) ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -40- 5.14 ORD Format ORD( character_expression ); The ORD function converts a character to an integer value. The character_expression may be a single character or a string. If it is a string, then the first byte will be converted to integer format. The conversion is based on the ASCII character set. This is like the ASC(n) function in most Basics. Examples: REPEAT READ(INFILE; CH) WRITE( CH ); UNTIL ORD(CH) + 1AH; (* EOF *) (* ASCII DISPLAY *) FOR CH := ' ' TO 'z' DO WRITELN( CH, ' = ', ORD(CH)); X := ORD( COPY( S1, I, 1 )); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -41- 5.15 PORTIN Format PORTIN( integer_expression ); The PORTIN function inputs a byte directly from the hardware port specified by the integer_expression. The return value is a character. Examples: IF PORTIN(255) = CHR(80H) THEN WRITELN('HIGH BIT IS ON'); CH := PORTIN(TTY); WHILE PORTIN(MODEM) = CHR(0FFH) DO TIMER := TIMER + 1.0; Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -42- 5.16 POS Format 1 POS( pattern, source ); Format 2 POS( pattern, source, start_position ); Search the source string for the first occurrence of the pattern string. Return the position of the first byte of the pattern if it was found, otherwise return zero. The first byte is position 1. In format 2 of the POS function, the start position of the search in the source string can be specified. PROGRAM DEMO; VAR STR1,STR2 : STRING; BEGIN STR1 := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; WRITELN( 'TEST 1 :', POS('EF', STR1)); WRITELN( 'TEST 2 :', POS('D', STR1, 8)); STR2 := 'XX XX XX'; WRITELN( 'TEST 3 :', POS(' ',STR2)); WRITELN( 'TEST 4 :', POS('XX', STR2, 2)); END. (* OUTPUT *) TEST 1 : 5 TEST 2 : 0 TEST 3 : 3 TEST 4 : 5 Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -43- 5.17 PRED Format 1 PRED( integer_expression ); Format 2 PRED( character_expression ); The PRED function returns preceding value of an integer or a character expression. For example: the PRED of 'c' is 'b'; the PRED of 98 is 97. Examples: WRITELN( A, PRED(A) ); WRITELN( CH, PRED(CH) ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -44- 5.18 REAL$ Format REAL$( real_expression ); The REAL$ function converts a real_expression to a printable standard format for direct output or further editing. The result is a string of length 22, in the format below: ' +0.12345678901234E+00' Examples: WRITELN( FREQUENCY_FILE; REAL$( CYCLES / MICROSECONDS )); STR := REAL$( VELOCITY / 7.03E-21 ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -45- 5.19 ROUND Format ROUND( real_expression ); ROUND is a standard function which converts a real expression to an integer value. If the real value's fractional part is greater than or equal to 0.5 then the value is rounded up to the next higher integer. If the real value is too large to be converted to integer format, a warning message is issued and the value returned is -32768 if the real expression was negative, otherwise +32767 is returned. Examples: INT := ROUND( X + Y ); TEMPERATURE := ROUND( THERMOMETER_READING ); PLOT_X := ROUND( X / SCALING_FACTOR ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -46- 5.20 SEARCH Search is an external function which allows high speed searches of tables. The array of records to be searched can be any length, the offset to the key within the record can be specified, and the key length can be specified. Search takes four arguments: the array, the key, the number of records in the array, and the search parameter record. The count of records in the array is passed by value. The three other arguments are passed by reference. Declaration required to use SEARCH: TYPE search_param = RECORD search_mode : integer; (* must be zero *) record_length : integer; key_offset : integer; key_length : integer; END; record_type = RECORD (* whatever is appropriate *) END; record_array = ARRAY[1..whatever] of record_type; key_type = STRING or ARRAY[1..x] OF CHAR; VAR arr : record_array; key : key_type; parameters : search_param; FUNCTION SEARCH ( VAR arr : record_array ; VAR key : key_type ; count : INTEGER; VAR param : search_param ) ; EXTERN; Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -47- Using SEARCH Set up the search parameter block (generally just once) : parameters.search_mode := 0; parameters.record_length := (* whatever *); parameters.offset := 0 (* or whatever *); parameters.key_length := (* whatever *); SEARCH looks through an array of records for an exact match between the search key and the key within the records. The search_mode option is provided for future extensions to allow the array to be in sorted order, to return the closest record, to let the array to be searched be a linked list, or for the record to contain a pointer to the key. SEARCH returns -1 if the arguments are invalid, 0 if the key cannot be found, and the index record if the key can be found ( starting at 1). Example  For example, assume an array of records containing an integer index and a 6-character key: (* type declaration *) search_param = RECORD search_mode : integer; (* must be zero *) record_length : integer; key_offset : integer; key_length : integer; END; char6 = ARRAY[1..6] OF CHAR; record_type = RECORD index_val : INTEGER; key : char6; record_array = ARRAY[1..999] OF record_type; key_type = char6; (* variables *) arr : record_array; key : key_type; parameters : search_param; nr_records : INTEGER; (* number of records *) Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -48- FUNCTION SEARCH (VAR arr : record_array ; VAR key : key_type ; count : INTEGER ; VAR param : search_param ) ; EXTERN; (* setup *) parameter.mode := 0; parameter.record_length := 8; parameter.key_offset := 2; parameter.key_length := 6; (* build an array of keys and indices into arr *) (* keep track of number of records in nr_records *) (* use *) ind := search ( arr, key, nr_records, parameter ); if (ind <= 0) then writeln('Record not found: ', key) else begin (* ... *) end; Record lengths and offsets Record lengths and offsets can be determined by counting bytes. Characters take 1 byte, integers, boolean, and enumerated types take 2 bytes, and real numbers take 8 bytes. Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -49- 5.21 SIN Format SIN( real_expression ); The SIN standard function returns the sine of a real expression in radians. This is implemented as an external function. The declaration for an external function must be included in programs which reference it. FUNCTION SIN ( X : REAL ): REAL; EXTERN; Examples: WRITELN( SIN( ANGLE )); NODE.SINE := SIN( N ); WRITELN( SIN( VELOCITY / CHARGE )); NOTE: See the note included with the COS builtin function for an example using degrees. Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -50- 5.22 SQR Format 1 SQR( real_expression ); Format 2 SQR( integer_expression ); The SQR standard function returns either a real value or an integer value depending on the parameter type. This function returns the square of the parameter expression - the value multiplied by itself. Examples: WRITELN( 'SQUARE OF X IS ', SQR(X) ); AREA := SQR( SIDE ); CIRCLE_AREA := PI * SQR( RADIUS ); ENERGY := MASS * SQR( LIGHT_SPEED ); Copy compliments of Merle Schnick  SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -51- 5.23 SQRT Format SQRT( real_expression ); This standard function returns the square root of a real expression. This is implemented as an external function. The declaration for an external function must be included in programs which reference it. FUNCTION SQRT ( X : REAL ): REAL; EXTERN; Examples: WRITELN( SQRT( A + 3.14159 )); NODE.VALUE := OLD_NODE.VALUE + SQRT( V ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -52- 5.24 SUCC Format 1 SUCC( integer_expression ); Format 2 SUCC( character_expression );  The SUCC function returns succeeding value of an integer or a character expression. For example: the SUCC of 'b' is 'c'; the SUCC of 97 is 98. Examples: WRITELN( A, SUCC(A) ); WRITELN( CH, SUCC(CH) ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -53- 5.25 TRUNC Format TRUNC( real_expression ); TRUNC is a standard function which converts a real expression to an integer value. The fractional portion of the real expression is truncated. If the real value is too large to be converted to integer format, a warning message is issued and the value returned is -32768 if the real expression was negative, otherwise +32767 is returned. Examples:  INT := TRUNC( X + Y ); TEMPERATURE := TRUNC( THERMOMETER_READING ); PLOT_X := TRUNC( X / SCALING_FACTOR ); Copy compliments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -54- 5.26 UPCASE Format UPCASE( string_expression ); The UPCASE function converts a string expression to all upper case letters. Non-alphabetic characters are not changed. Examples: IF UPCASE( COMMAND ) = 'X' THEN CMD_X; WRITELN ( F1; UPCASE( NAME ) ); READLN( OPTION ); IF UPCASE( OPTION ) = 'EXIT' THEN GOTO 99; Copy compliments of Merle Schnick SECTION 5: Builtin Functions  READLN( OPTION ); IF UPCASE( OPTION ) = 'EXIT' THEN GOTO 99; Copy compliments of Merle Schnick SECTION 5: Builiments of Merle Schnick SECTION 5: Builtin Functions JRT Pascal User's Guide version 3.0 NOT FOR SALE -54- 5.26 UPCASE Format UPCASE( string_expression ); The UPCASE function converts a string expression to all upper case letters. Non-alphabetic characters are not changed. Examples: IF UPCASE( COMMAND ) = 'X' THEN CMD_X; WRITELN ( F1; UPCASE( NAME ) ); READLN( OPTION ); IF UPCASE( OPTION ) = 'EXIT' THEN GOTO 99; Copy compliments of Merle Schnick SECTION 5: Bui JRT Pascal User's Guide version 3.0 NOT FOR SALE -118- 8. Linker The use of the linker is entirely optional. It is used to merge a Pascal program '.INT' file with some or all of its external procedure/function '.INT' files. It can process procedures written in assembler as well as Pascal. To run the linker, enter: EXEC LINKER The linker will issue a prompt to the console for the program name. After the main program has been processed, the user will be prompted to select which of the external procedures to merge. The procedures referenced by this program will be listed with their identification numbers (1 to 63). An asterisk indicates procedures selected. Possible replies to the 'Procedure selection' message are listed below. More than one number may be entered each time, separated by spaces. Entering zero ends the interactive portion and causes merge processing to begin. reply purpose ----- -------- 1 to 63 select this procedure -63 to -1 de-select this procedure 100 select all procedures -100 reset, select none 0 end selection, begin merge processing The output module file will have the same filename as the main program and a filetype of '.INT'. The filetype of the main program will be renamed to '.IN2'. If any of the selected input procedure files are not present, a run-time error will occur and the linker will terminate. All files must be present on the A: disk. Copy compliments of Merle Schnick SECTION 8: Linker  not present, a run-time error will occur and the linker will terminatThis file lists the errors known or reported in the JRTMANL series of files, for JRT ver 3.0 only. 1. Page 107: declaration within sample program TESTPICT: EXTERN PICTURE ( FMT : STRING; ...etc. should be: FUNCTION PICTURE ( FMT : STRING; ...etc. ----------------------------------------------------------- end of JRTMANL.ERR file CTURE ( FMT : STR JRT Pascal User's Guide Preface NOT PART OF MANUAL ***** W A R N I N G ***** DO NOT TRY TO SELL THIS MANUAL IT IS COPYRIGHTED BY JRT SYSTEMS Due to the length of the JRT Pascal User's Guide, it was very necessary to break it up into the obvious sections, as outlined below. This manual was transcribed to an ASCII disk file by Merle Schnick, Sysop for the Pacific Northwest Heath Users Group, in Seattle. Hopefully, it is of respectable quality and also completely accurate. By far, the greatest advantage of having this document as an ASCII file is that YOU can re-write it, with all the comments you might have otherwise written into the edges of an original document. Realistically, this process of typing in a manual will have created some new typos, but hopefully nothing more serious. When errors, no matter how minor, are found in this document, PLEASE report them to the PNHUG BBS SYSOP so that they may be corrected. Simply report the page number and exactly what is misspelled or wrong otherwise. This is a small thing that is asked in return for the large amount of time spent putting this manual together for your convenience. The BBS is a 24-hour and 7-day a week system, and can be reached from anywhere in the world by dialing direct to area code 206/682-5215. Please address comments to "SYSOP". ****** N O T E ******* You will need MODEM7 or equivalent program to download these files from this BBS. File transfer is done using XMODEM. If you are not familiar with this, return to USER 0, type NEWS, and select the file MODEM.IFO for listing. These files have been "squeezed", using SQ-16.COM, for minimal storage requirements and minimal transmission times. Note that the second character of a squeezed file has been distinctly changed to a "Q", to indicate its compressed format. To "unsqueeze" these files, you will also need to download the file called USQ-19.OBJ, rename it to USQ.COM on your system, then proceed to unsqueeze the files by typing USQ filename.filetype. For example, typing USQ ZJRTMANL.AQB will produce the file ZJRTMANL.APB, which is then listable and printable. For additional information of USQ'ing files, download the file SQUEEZ16.DOC, and specifically read the instructions for doing many files at one time. Retrieve the files from the BBS in the following sequence, although the entire document is sequentially paged (numbered) to avoid any confusion. All references from the Table of Contents hopefully have been correctly maintained. Page -1- JRT Pascal User's Guide Preface NOT PART OF MANUAL To print these files on your printer, USE THE CP/M 'PIP' UTILITY. DO NOT USE LIST.COM !! Proceed as follows: Use standard 8.5 x 11.0 white paper. Start the printer at the top of the form. Correct top of form alignment will produce the header ( "JRT Pascal User's Guide" ) at the TOP of each page as the first line, and as a footer ( the section title ) at the BOTTOM of each page. (Footer above perforation, header below perforation.) ......... ......... text ......... (last line of text on page) Copy compliments of (footer note from previous page) (blank line) ------------------------ (perforation between sheets) (blank line) JRT Pascal User's (header note on following page) ......... (first line of text on page) text ......... ......... Then to print out a file, type PIP LST:=filename For example: PIP LST:=ZJRTMANL.APB G O O D L U C K ! ! ZJRTMANL.IFO This file. ZJRTMANL.000 The cover page; comment on advertisement giving permission for JRT Pascal owners to copy and pass JRT Pascal software and manual on to friends; JRT's copyright, disclaimer, and trademark notices. ZJRTMANL.TOC The table of contents. ZJRTMANL.001 Section 1: Introduction;features;hardware reqrmts;list of files;for beginners. ZJRTMANL.002 Section 2: Operating JRT Pascal Writing JRT Pascal Identifies Numbers Comments Compiling Pascal programs Page -2- JRT Pascal User's Guide Preface NOT PART OF MANUAL Executing Pascal programs ZJRTMANL.003 Section 3: Compiler Directives Listing Control Directives Line Trace Directives Procedure Trace Directives Source file Include ZJRTMANL.004 Section 4: Data Types Integers Real numbers Booleans Char Structured variables Dynamic strings  Sets Pointers Dynamic arrays ZJRTMANL.005 Section 5: Builtin functions ABS ADDR ARCTAN CHR CONCAT COPY COS EXP FREE HEX$ LENGTH LN ODD ORD PORTIN POS PRED REAL$ ROUND SIN SQR SQRT SUCC TRUNC UPCASE ZJRTMANL.006 Section 6: Builtin Procedures CALL Calling the CP/M operating system  DELETE DISPOSE FILLCHAR INSERT MAP NEW PORTOUT Page -3- JRT Pascal User's Guide Preface NOT PART OF MANUAL SYSTEM ZJRTMANL.007 Section 7: Input/output Console input/output Sequential file processing Random file processing Indexed file processing CLOSE EOF EOLN ERASE GET OPEN PICTURE PUT READ, READLN RENAME RESET REWRITE  WRITE, WRITELN ZJRTMANL.008 Section 8: Linker ZJRTMANL.009 Section 9: Customiz ZJRTMANL.100 Section 10: Assembler Entry codes Operating JRTASM Directives Expressions Parameters and function return values Debugging assembler procedures Convertm program Sample assembly programs ZJRTMANL.101 Section 11: Storage management Main storage Dynamic storage ZJRTMANL.102 Section 12: External Procedures and Functions Coding external procedures and functions Referencing external procedures and functions ZJRTMANL.103 Section 13: Debugging Pascal programs Trace options DEBUG procedure  System status display Run-time messages Common problems ZJRTMANL.104 Section 14: Extended CASE statement ZJRTMANL.105 Section 15: CRT Formatting Structure of external procedure Map Definition File Operating CRTMAP Page -4- JRT Pascal User's Guide Preface NOT PART OF MANUAL CRTMAP example ZJRTMANL.APA Appendix A: Reserved words ZJRTMANL.APB Appendix B: Activity analyzer ZJRTMANL.APC Appendix C: Block letters ZJRTMANL.APD Appendix D: JSTAT ZJRTMANL.APE Appendix E: JGRAF ZJRTMANL.APF Appendix F: Restrictions ZJRTBUG.RPT Form to report errors directly to JRT ( you don't have to buy it to report bugs in it.)  ZJRTTECH.301 First technical letter from JRT on version 3.0 /README/.JRT The first file you could have read (the rest are 'squeezed', with the exception of this file that you are reading). /eof./ Page -5- queezed', with the exception of this file that you are reading). NOT PART OF MANUAL CRTMAP example ZJRTMANL.APA Appendix A: Reserved words ZJRTMANL.APB Appendix B: Activity analyzer ZJRTMANL.APC Appendix C: Block letters ZJRTMANL.APD Appendix D: JSTAT ZJRTMANL.APE Appendix E: JGRAF ZJRTMANL.APF Appendix F: Restrictions ZJRTBUG.RPT Form to report errors directly to JRT ( you don't have to buy it to report bugs in it.)  JRT Pascal User's Guide Table of Contents Table of Contents ------------------- JRT Pascal version 3.0 . . . . . . . . . . . . . . . . . . . . 1 1. Introduction . . . . . . . . . . . . . . . . . . . . . 2 1.1 JRT Pascal features . . . . . . . . . . . . . . . 2 1.2 Hardware requirements . . . . . . . . . . . . . . 3 1.3 List of files . . . . . . . . . . . . . . . . . . 3 1.4 **** FOR BEGINNERS **** . . . . . . . . . . . . . 5 2. Operating JRT Pascal . . . . . . . . . . . . . . . . . . 11 2.1 Writing Pascal programs . . . . . . . . . . . . . 11 2.1.1 Identifiers . . . . . . . . . . . . . . . . . . . 11 2.1.2 Numbers . . . . . . . . . . . . . . . . . . . . . 12 2.1.3 Comments . . . . . . . . . . . . . . . . . . . . . 12  2.2 Compiling Pascal programs . . . . . . . . . . . . 13 2.3 Executing Pascal programs . . . . . . . . . . . . 14 3. Compiler Directives . . . . . . . . . . . . . . . . . . 16 3.1 Listing control . . . . . . . . . . . . . . . . . 16 3.2 Line trace . . . . . . . . . . . . . . . . . . . . 16 3.3 Procedure trace . . . . . . . . . . . . . . . . . 17 3.4 Source file Include . . . . . . . . . . . . . . . 18 4. Data Types . . . . . . . . . . . . . . . . . . . . . . . 19 4.1 Integers . . . . . . . . . . . . . . . . . . . . . 19 4.2 Real numbers . . . . . . . . . . . . . . . . . . . 19 4.3 Booleans . . . . . . . . . . . . . . . . . . . . . 20 4.4 Char . . . . . . . . . . . . . . . . . . . . . . . 20 4.5 Structured variables . . . . . . . . . . . . . . . 20 4.6 Dynamic strings . . . . . . . . . . . . . . . . . 21 4.7 Sets . . . . . . . . . . . . . . . . . . . . . . . 22 4.8 Pointers . . . . . . . . . . . . . . . . . . . . . 23 4.9 Dynamic arrays . . . . . . . . . . . . . . . . . . 23 5. Built-in functions . . . . . . . . . . . . . . . . . . . 26 5.1 ABS . . . . . . . . . . . . . . . . . . . . . . . 27 5.2 ADDR . . . . . . . . . . . . . . . . . . . . . . . 28 5.3 ARCTAN . . . . . . . . . . . . . . . . . . . . . . 29 5.4 CHR . . . . . . . . . . . . . . . . . . . . . . . 30 5.5 CONCAT . . . . . . . . . . . . . . . . . . . . . . 31 5.6 COPY . . . . . . . . . . . . . . . . . . . . . . . 32 5.7 COS . . . . . . . . . . . . . . . . . . . . . . . 33 5.8 EXP . . . . . . . . . . . . . . . . . . . . . . . 34 5.9 FREE . . . . . . . . . . . . . . . . . . . . . . . 35 5.10 HEX$ . . . . . . . . . . . . . . . . . . . . . . . 36 5.11 LENGTH . . . . . . . . . . . . . . . . . . . . . . 37 JRT Pascal User's Guide Table of Contents 5.12 LN . . . . . . . . . . . . . . . . . . . . . . . . 38 5.13 ODD . . . . . . . . . . . . . . . . . . . . . . . 39 5.14 ORD . . . . . . . . . . . . . . . . . . . . . . . 40 5.15 PORTIN . . . . . . . . . . . . . . . . . . . . . . 41 5.16 POS . . . . . . . . . . . . . . . . . . . . . . . 42 5.17 PRED . . . . . . . . . . . . . . . . . . . . . . . 43 5.18 REAL$ . . . . . . . . . . . . . . . . . . . . . . 44 5.19 ROUND . . . . . . . . . . . . . . . . . . . . . . 45 5.20 SEARCH . . . . . . . . . . . . . . . . . . . . . . 46 5.21 SIN . . . . . . . . . . . . . . . . . . . . . . . 49 5.22 SQR . . . . . . . . . . . . . . . . . . . . . . . 50 5.23 SQRT . . . . . . . . . . . . . . . . . . . . . . . 51 5.24 SUCC . . . . . . . . . . . . . . . . . . . . . . . 52 5.25 TRUNC . . . . . . . . . . . . . . . . . . . . . . 53 5.26 UPCASE . . . . . . . . . . . . . . . . . . . . . . 54 6. Built-in Procedures . . . . . . . . . . . . . . . . . . 55 6.1 CALL . . . . . . . . . . . . . . . . . . . . . . . 56 6.1.1 Calling the CP/M Operating System . . . . . . . . 57 6.2 DELETE . . . . . . . . . . . . . . . . . . . . . . 63 6.3 DISPOSE . . . . . . . . . . . . . . . . . . . . . 64 6.4 FILLCHAR . . . . . . . . . . . . . . . . . . . . . 65 6.5 INSERT . . . . . . . . . . . . . . . . . . . . . . 66 6.6 MAP . . . . . . . . . . . . . . . . . . . . . . . 67 6.7 NEW . . . . . . . . . . . . . . . . . . . . . . . 69  6.8 PORTOUT . . . . . . . . . . . . . . . . . . . . . 71 6.9 SYSTEM . . . . . . . . . . . . . . . . . . . . . . 72 7. Input/Output . . . . . . . . . . . . . . . . . . . . . . 73 7.1 Console input/output . . . . . . . . . . . . . . . 74 7.2 Sequential file processing . . . . . . . . . . . . 76 7.3 Random file processing . . . . . . . . . . . . . . 78 7.4 Indexed file processing . . . . . . . . . . . . . 80 7.4.1 Index file format . . . . . . . . . . . . . . . . 81 7.4.2 Data file format . . . . . . . . . . . . . . . . 82 7.4.3 Using INDEX . . . . . . . . . . . . . . . . . . . 84 7.4.4 INDEX commands . . . . . . . . . . . . . . . . . . 85 7.4.5 INDEX return codes . . . . . . . . . . . . . . . . 87 7.4.7 INDEX2 utility . . . . . . . . . . . . . . . . . . 88 7.4.8 Efficiency notes . . . . . . . . . . . . . . . . . 90 7.4.9 Sample Indexed file program . . . . . . . . . . . 91 7.5 CLOSE . . . . . . . . . . . . . . . . . . . . . . 96 7.5.1 EOF . . . . . . . . . . . . . . . . . . . . . . . 97 7.6 EOLN . . . . . . . . . . . . . . . . . . . . . . . 98 7.7 ERASE . . . . . . . . . . . . . . . . . . . . . . 99 7.8 GET . . . . . . . . . . . . . . . . . . . . . . . 100 7.9 OPEN . . . . . . . . . . . . . . . . . . . . . . . 101 7.10 PICTURE . . . . . . . . . . . . . . . . . . . . . 102 JRT Pascal User's Guide Table of Contents 7.11 PUT . . . . . . . . . . . . . . . . . . . . . . . 109 7.12 READ, READLN . . . . . . . . . . . . . . . . . . . 110 7.13 RENAME . . . . . . . . . . . . . . . . . . . . . . 112 7.14 RESET . . . . . . . . . . . . . . . . . . . . . . 113 7.15 REWRITE . . . . . . . . . . . . . . . . . . . . . 114 7.16 WRITE, WRITELN . . . . . . . . . . . . . . . . . . 115 8. Linker . . . . . . . . . . . . . . . . . . . . . . . . . 118 9. Customiz . . . . . . . . . . . . . . . . . . . . . . . . 119 10. Assembler . . . . . . . . . . . . . . . . . . . . . . . 120 10.1 Entry codes . . . . . . . . . . . . . . . . . . . 120 10.2 Operating JRTASM . . . . . . . . . . . . . . . . . 121 10.3 Directives . . . . . . . . . . . . . . . . . . . . 121 10.4 Expressions . . . . . . . . . . . . . . . . . . . 123 10.5 Parameters and return values . . . . . . . . . . . 124 10.6 Debugging assembler procedures . . . . . . . . . . 126 10.7 Convertm program . . . . . . . . . . . . . . . . . 127 10.8 Sample assemble programs . . . . . . . . . . . . . 127 11. Storage Management . . . . . . . . . . . . . . . . . . . 131 11.1 Main storage . . . . . . . . . . . . . . . . . . . 131 11.2 Dynamic storage . . . . . . . . . . . . . . . . . 134 12. External Procedures and Functions . . . . . . . . . . . 136 12.1 Coding external procedures and functions . . . . . 137 12.2 Referencing external procedures . . . . . . . . . 139 13. Debugging . . . . . . . . . . . . . . . . . . . . . . . 140 13.1 Trace options . . . . . . . . . . . . . . . . . . 140 13.2 DEBUG procedure . . . . . . . . . . . . . . . . . 141 13.3 System status display . . . . . . . . . . . . . . 143 13.4 Run-time messages . . . . . . . . . . . . . . . . 147 13.5 Common problems . . . . . . . . . . . . . . . . . 149 14. Extended CASE Statement . . . . . . . . . . . . . . . . 154 15. CRT Formatting . . . . . . . . . . . . . . . . . . . . . 156  15.1 Structure of external procedure . . . . . . . . . 157 15.2 Map Definition File . . . . . . . . . . . . . . . 159 15.3 Operating CRTMAP . . . . . . . . . . . . . . . . . 161 15.4 CRTMAP example . . . . . . . . . . . . . . . . . 161 JRT Pascal User's Guide Table of Contents A. Reserved words . . . . . . . . . . . . . . . . . . . . . 170 B. Activity Analyzer ACTIVAN . . . . . . . . . . . . . . . 173 C. Block Letters . . . . . . . . . . . . . . . . . . . . . 174 D. JSTAT . . . . . . . . . . . . . . . . . . . . . . . . . 176 E. JGRAF . . . . . . . . . . . . . . . . . . . . . . . . . 177 F. Restrictions . . . . . . . . . . . . . . . . . . . . . . 184  E. JGRAF . . . . . . . . . . JRT PASCAL TECHNICAL NEWSLETTER 3.0 - 1 APRIL 11, 1983 1. EXTERNAL PROCEDURE DECLARATIONS One of the most common programming errors reported to us is declaring external procedures in the wrong order within external procedure modules. In the Pascal source program of an external procedure which calls other external procedures, the procedure header of the called procedures always comes AFTER the header of the current procedure. That is - only global const, type and var declarations can come between the word extern and the procedure header. EXTERN { optional global CONST, TYPE, VAR declarations } PROCEDURE THISPROC ( X,Y : INTERGER ); VAR N, M : INTEGER; { variables local to THISPROC } PROCEDURE EXPROC1; EXTERN PROCEDURE EXPROC2 ( A : REAL ); EXTERN; FUNCTION EXFUN1 ( X : REAL ): REAL; EXTERN; BEGIN { THISPROC Pascal code } END; . The external procedure example on the reference card is in error. 2. FILES OF RECORD LENGTH GREATER THAN 128 The procedures GET, PUT and window variables should not be used with files whose record length (declared in the FILE OF ...) is greater than 128 bytes. Random files with records of any length are allowed. READ/WRITE may be used to sequentially input/output records greater than 128 bytes if one of the following is done: A. if the file's record size exceeds 128 then it should be declared as FILE OF CHAR. B. install this patch using CP/M's DDT utility program: A>DDT EXEC.COM DDT VERS 1.4 NEXT PC END 5E00 0100 C7FF -A366E  366E LXI H,7F 3671 . A466E 466E LXI H,7F 4671 . -G0 A>SAVE 93 EXEC.COM TECHNICAL NEWSLETTER 3.0 - 1 Page 1  3671 . A466E 466E LXI H,7F 4671 . -G0 A>SAVE 93 EXEC.COM WRITE may be used to sequentially input/output records greater than 128 bytes if one of the following is done: A. if the file's record size exceeds 128 then it should be declared as FILE OF CHAR. B. install this patch using CP/M's DDT utility program: A>DDT EXEC.COM DDT VERS 1.4 NEXT PC END 5E00 0100 C7FF -A366E *PASCALX PR0200R^PEIII?III PPW_hhRx= No errors iPiR=1 error iPh= errors jP= detected i Y_Xh?`# P hZ)RhZ=RLjZK$63'hNRvhZPLKRhZPjZ0;hh=P;hZIRjZPRhZ0;hh=X;hZIRjZg=Y5PjZPhZhjZhXWYP2I'_'Y_ijZhXhX2jjZ^0=A=PI=YLRijZYPII I II?III P_\rhjZrR=0=YR*ehrZ 0=YR=hjZ[PII I II?III PP_=A5)YP_ =A5!)YP!_=A5+05)YP^_*=A5)05 ( YP_ =A5)!YP_ =A5)YP_ =N5!#YP^_ =N5!#%YP_ =05!YP_=A5  )YP-_09=AR)jZ v vP9=0RP:Y_ \Q Q QQRhXPQQQQQQR%hXPR5hXPREhXPiQSR[hXPjRihX!PRyhX^PhRhXPRhX^PQ RhXP'0=NRhX-[PFIII?III P7I@PY_RqjZYPu_KRhZPjZYP_ hjRjP RiiP RjP RP R RiP R[   Q7 hR@ jPW RW iiPW P Qs Qs R iP Q R jP R P P YP P _  hRT  hR jZ hR   NRE   i  P YPX _$jhER hZhh3R hZ" P " i"@R <jZhZKFNR P )_hZqjZhR 'ihZBR* hZOR8 P hZ@R] qjZ 'P 8,NR LjZP  jZ j!j" R !P j  NR q Z qjZ R hKR+ hZ3N@RA P FRT hZP <jZKh'$36NER @ONE@R hZP j   NR   R Y_#'NRhZ@RA jZ_hZqZ NR i ' jX hZPh)qjZ 'q  3Z hZhXX q  jZ q  Z ROXYhZJRD@RDjZqjZ'Xq Z  iR  jq   Z q  'Z hXuRhZR PP  0u (E ji  = 5i(0`a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ʘE@ʃEx'E:JyD>n2J͡H*FRGWʆGy~GzvG~fG}nG|VG{^GE͡H*Ow#r*O6=E͡H*Ow#͡HwE*O͡Hw# ˆEE͡H*Ow#6EO*O͡Hw# ªEE>n2J*tK*rK|E}H*O^#V$F>Z*tK#"tK*J#"J*Os#r>Z#*F~# F$FVH:J F> cH=F1F0000 0000: $*nK~#TFF MFcH4F"nKcH:mKIʋF!K"nKJ?LJ1F!L"nKLKF@MLKF1F>2L1F>2@M1F:mKIF>21FLK*pK"nK>S2mK2J1FH͡HEG>y2JD͡H?.G͡H2rK͡H2sK͡HF.GE9G  Error in %PAGE directive $*O6YE*O6NE*O6YE*O6NE>Y2JE>N2JE͡HE¼G͡H͡H?ҼG2KEO!xK͡Hw# ¤G͡HF¼GEG  %TITLE error or string > 64 bytes$͡H !LK͡Hw# Gw# H͡H5HͺE2JLK*nK"pK!M"nK>I2mKE@H  Error in %INCLUDE $$cHVH_:JY{ ʉH |H2HÀH!H4:HOGO> cH ”H*KN}H|HM KAN K!M~#"K|!"tK*vK#"vK>Z##{I~# H5IVH:K> cH> cHO!xK~#cH !I~IVH JRT Pascal ver 4.0 1234567890 Page 000 $*Ks#"K:K<2K!N"KN+KAO+K:KIO>̓I I+Kɯ2D2D2D!"O!"O! "O! "O!"O!"O!"O!3"O!"O!^"O!t"O!r"O!`~2K*O#~:+OJ~2J##J~# TJJ K*O [I~# |J:KQڱJX˜J2HDY©J2H>2HD>2cHD2+KJ!,Kw# ¾J+K+K!I"HDY7 PASTEMP1 $$$ LST12345678123SLNN_\+++V+^~?w#6PYPII I II?III P\P_\=RvP PP55[PAS401 LEX tPAS404 ADDMAIN >tBLOCK tFIND tPAS402 PAS403 EXPR vtUPDATE E9tGEN ;tFLDLST PARMREF .@tSYMBOL TEST wDtLEX2 DtBIT6 OtCOMPLEX OtPAS405 PAS406 RUbv| !2Blt#RWx 5?\\+=du~  #+03;@CIQVY_dgotw}GWfs  / 5 > F U Y a i q  . R V p # 3 6 G [ u  $ < ? J R   7 k -:\:HV_z$.2Zkw +C^be{4V[^dqtz "%-25=EJMY^alv8Lq,14]n $).1<ANbr![hq~%?HXe|aq"3R^fs{ &5Khpx $,S[rw"6F~#`z +36<DQUZt   _ g w z !%!1!=!B!E!Q!V!Y!^!a!i!n!q!y!!!!!!!!!!"" ""*"3"I"S"]"f"z""""""""# # #(#0#P#X#x########## $%$a$o$|$$$$$$$$$$$$% %% %(%5%=%U%[%h%p%}%%%%%%%%% && &(&3&<&W&&&&&&&&&&''.'6'['c''''''''((7(?([(_(i((((((((((((())6)U)))))))))*!*,*/*;*C*K*T*W*_*e*k*s*{*************,+4+>+F+I+Q+^+k+s+++++++++++, ,(,7,?,I,Y,k,{,,,,,,,,,,,--4-A-N-V---------- ..!.3.;.............//+/8/@/U/d/o/////////0 000(0F0N0V0[0^0f0n0000000000000001 111"1*191F1N1[1c1r1111111111111 22"2*2<2D2L2c2s22222222222223333 3(373H3P3X3e3m3u3}333333333344'484G4Q4Y4c4k4u4y4444444444444555,545@5R5c5f5{5555555555555 66%6-676?6G6Q6Y6c6g6o6}6666666666666 797J7M7_7d7w7|7777777777777888(808?8G8O8^8f8u88888888889"929F9999999::1:9:P:X:o:w::::::::: ;;);1;H;P;g;o;;;;;;;;;;;;;;;;;;;;;;<< < <<<< <#<)<,<2<5<;<>=A=D=G=J=O=\=_=b=i=l=o=r=u=~========================>>>>>(>0>9>>>A>N>R>V>`>e>h>l>p>s>v>~>>>>>>>>>>>>>>>> ?/@@@@@@@@@@@AAA.A;AHAPA]AeAAAAAAAAAAABBB!BVBrBBBBBBBCCTC]CfCoCxC{CCCCCCCCCCDDD"DFCFGFKFNFQFUFZF]F`FiFqFyFFFFFFFFFFFFFFFFFFFFFFFFFG G GGGGGG!G$G)G,G/GWG\G_GdGgGlGoGtGyG|GGGGGGGGGGGGGGGGGGGGGH HHHHH"H%H(H+H0H3H6H]HaHeHnHsHwHzH}HHHHHHHHHHHHHHHHHHII I IIII&I,I/I2IIIIIIIIIIIIIIIIIIIIIIIJJJJJ$J+J2J:J=JEJKJRJZJgJoJuJzJJJJJJJJJJJJJJJJJJJJJJnKKKOZPiPtPPPPP7QJQ]QQQQQQ<<<<<<<= ===='=*=.=4=;=>=A=D=G=J=O=\=_=b=i=l=o=r=u=~========================>>>>>(>0>9>>>A>N>R>V>`>e>h>l>p>s>v>~>>>>>>>>>>>>>>>> ?/@@@@@@@@@@@AAA.A;AHAPA]AeAAAAAAAAAAABBB!BVBrBMERROR HJ0200LPQIII?III P IP~I@I_aOjOOO= near '5=RR 0u  E ji  0 i`%     e05P  ='5  =$5P i`sQ  r5P\OOQOO i   Q  r05  iQ  r0R   ='5   =$5YP _^0=YR"YPP)_i U0 i^0=XRl U0 ii U0=$R1Y_=line r=:  ^0=XR=line r=:  jX)h^0=XRh YP_6jZY_W\hR>=Y5llijhR;jPGjhRGhhi=N5^0=NR^=Y5t0 =.ERR<0hX~^0=ZR=---- $;X0;X  <=$<;XhXlR=Severe error condition, = compile terminated j =Severe error condition, = compile terminated j^0=A=PI=YLR=Severe error condition,= compile terminated< < <=$<;XijZhX hOO^0=YRB=Error stop: enter 'E' to = end compile :  jOiOOO0=ER>hX hOOh jh[Rb #2GP]gq $':Va1<Ehq/4=$5YP _^0=YR"YPP)_i U0 i^0=XRl U0 ii U0=$R1Y_=line r=:  ^0=XR=line r=:  jX)h^0=XRh YP_6jZY_W\hR>=Y5llijhR;jPGjhRGhhi=N5^0=NR^=Y5t0 =MSTMTB Z \ 0200^ PDIII?II P PJ_RbjZYPf_0=IR6jZYP_0=CR0=NR=jZYP_=L;=N;Z YP_ hZEXJhZ_hZZ=S;=Y;Z 0=FRJ'jZFXJhZ RwhhZ PhhZ PYP_ hZhZjX0;XfhZjX0;XhZhhZ YP_ hZ hiZ  hZ hZER}hZ_hZZ=S;=Y;Z 0=FRn'jZ hZP hiZ  hZ hhZ YP_ hZhZjX0;XfhZ_hZZ=S;=Y;Z hZ_hZZ=S;=Y;Z hZhhZ YP[_hZEXJhZ_hZZ=S;=Y; Z  0=FR'jZ hZ BXJhZ jXhhZ  0=C=NLR,3jZBXJhZuRT PotRd hPo>jZPohZ&RhZ jX 0=IR4jZ&R hZ P-R @hZ P/R  hZ PhhZ hZYP_ hZEXJhZ_hZZ=S;=Y;Z 0=FR'jZhhZ FXJhZYP P}P_R0;=N;Z 09=IRhP9=RRP9=BRP9=ER' P9=CQ79=NR 0.NRhZ 0=N hR}GjZ0=NRhhZ  i P:O0=RRhZjX 79NRa0=RRaORGhZjXOR7hZjXPDhiZ PahiZ hiZ hZ   iY_hh_`NRhZhZP. @R 0;=F;Z 0=FRilhhZ KR+hZPFRDPBRhZisRs PrR@P1jZPhZhZjX09=RRP9=IRhhZ P2jZP:.hhZ hZPP ijXBR hZP. FKN R` hjXBR] hZP. FRs hZP{ jZ R P iR /hhZ R mhhZ Y_ h hh  9Q 0R P  .Q 0R =S5P =L5P hZER8 hZhX}PD  RN P h Z hZ  9Q 7R hhZ P 0Q .R hhZ P Y_\9Q 7Q .Q 0R hX PX -Q /Q &R hX[PX R hXPX R hXPX Q0 (R8 hXPX cRH hXPX *RX hXPX [EHWdw@Ufud{Yv"7HRZbm~,u %-5Gs $25E)1BJ`qy   E K V ^ i q  ) 3 6 I L v ~      & . 3 6 > C F N S V ijXBR hZP. FKN R` hjXBR] hZP. FRs hZP{ jZ R P iR /hhZ R mhhZ Y_ h hh  9Q 0R P  .Q 0R =S5P =L5P hZER8 hZhX}PD  RN P h Z hZ  9Q 7R hhZ P 0Q .R hhZ P Y_\9Q 7Q .Q 0R hX PX -Q /Q &R hX[PX R hXPX R hXPX Q0 (R8 hXPX cRH hXPX *RX hXPX [EHWdw@UfuMSTMTC l n 0200p PDIII?II P PJ_RbjZYPf_0=IR6jZYP_0=CR0=NR=jZYP_=L;=N;Z YPiIP_jZ KNRhZPYP_7jX70=NR@7=C570 1 0RhJjZY_>3hZEXJhZ@RjXPW_hZZiZ hZ55RIjXP50 5 0!5!0=FR)IjXP3VR7PlhhZ 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_hX#RhXe_ihXK;iXhXP2i_ihXK;iXPv 9=DQ9=CRH_0 10;iXRB2i6ij >0=-Rx;iXix;iXP3= ;iX= ;iXiPEP8 Pv 9=EQX9=^R8iRix=Z=S=9=#=%=-=+=^LRiPPPax=eR=e;iXP=E;iXhXPv 9=_Q9=\R! R ix;iXPv 9=*R hXR iR pij=*$R i=$}j=#}hXPv 9=$Q 9=LR 4R x;iXP x;iXhXehXPv 9=,Q 9= Q 9=:Q 9=/R x;iXwPv 9=BR" = ;iXwPv 9=0R8 =0;iXPv =invalid format character vRxTX,p i Pv :PYP~ _6j >0=-R =-;iX_&jX@$R hX1"h(hR ( X0=9R ( X=95&(YP# _"_&jX@RY &hX*h *h i *h hR *h hhX1P h*h R  P  *h  $@R hYP _hR' h*h RD hX1P "hRj (ihiR i X0=# X0=9R iPt _&jX@Rx i X0=9=#LRM  X=_5 X=05*h *h iPu  X0= Ru  X=_5P hXh *h i h hR hX1P hR  P   YP _= 5i:` X0509=#QC9=9R. hRm..iPC. . i<.iR=%;iXbP.hR0=9R=0;iXbP0;iXbPQR[.  >0;iXb<RX. . iPjQyQyQyR=0;i!XbPiRi i ii  K0;iXbPP9=^RKhR=-;iXbP=+;iXbi =0;iXbi =0;iXbP9=*R`=*5P9= R.hR0;iXbP:PY_`=RB5 hh5 >0=0  >0=0 >0=-RPh= 5= 5P= 5PhXhX~  R4P <R  8R~hX# PhX hX h:RP0Pi:uRPP=??uRY_\hX[ehknq%6AHV`{#/bkx!9>JT`o#9u%/CIT^jx?Xorz (058@HPadirz&1@CFNVm  ' , : J `    ( 3 6 f t x |  ! A J \ g r {    5 : ? B Y  ( 9 D K W a m v { $9APVkz".=OY_gow#FIQ^fs %/2;JScty|XbP:PY_`=RB5 hh5 >0=0  >0=0 >0=-RPh= 5= 5P= 5PhXhX~  R4P <R  8R~hX# PhX hX h:RP0Pi:uRPP=??uRY_\hX[ehknq%6AHV`{#/bkx!9>JT`o#9u%/CIT^jx?Xorz (058@HPadirz&1@CFNVm  ' , : J `    ( 3 6 f t x |  ! A J \ g r { This file contains information which can be used to verify that files on the distribution disk are free from error. The VERIFY program will compute the sum of the bytes and the number of sectors for a file. To run VERIFY just enter "EXEC4 VERIFY". It will ask for the name of the file to be checked. It will then print out the sum and sector count for the file. filename sectors sum ARCTAN.PAS 16 14554831 CONVERTM.INT 27 14517512 COS.PAS 13 12391860 CRTMAP.PAS 39 44133430 CUSTOMIZ.INT 10 8101175 DEBUG.INT 3 1513428 ERASE.INT 6 1883617 EXEC4.COM 188 56266455 EXP.PAS 29 22866736 INDEX0.INT 75 24192007 INDEX1.INT 51 14850541 INDEX2.INT 12 6867133 JGRAF.INT 29 5288936 JGRAF.PAS 77 80612723 JRTASM.INT 118 39308198 JSTAT.PAS 23 23813157 LETTERS.INT 10 2127916 LINKER.INT 29 9820434 LN.PAS 15 12986745 LOWER.PAS 12 12321274 PAS4.COM 170 53027124 PAS40.LIB 114 109912589 PAS400.INT 190 44087469 PAS401.INT 52 22239829 PAS402.INT 41 9234932 PAS403.INT 35 9899420 PAS404.INT 13 5277920 PAS405.INT 27 7609914 PAS406.INT 25 7930099 PICTURE.INT 42 10666019 RENAME.INT 7 2441556 RESETBIT.ASM 5 5944774 SEARCH.INT 4 421409 SETBIT.ASM 5 6016140 SIN.PAS 12 11297845 SQRT.PAS 8 6769075 TESTBIT.ASM 6 6850814 VERIFY.INT 8 670101  5288936 JGRAF.PAS 77 80612723 JRTASM.INT 118 39308198 JSTAT.PAS 23 23813157 LEMRENAME 0300PPI IIP0_'pujx=:Reix@5Prh5i= 5 p= RP=A=ZI=0=9I=$=/LEx@RiPi x5iix@Rx@R1iP R?P i` x5iiPP0 5 Y_=\1_  pvX05 10 5#0R"h =%%Rename error - file already exists:  p j P_  pvX05#10 5 0Rh = %Rename error - file not found:  p j [.Hc"/:=Q[} 7{";resetbit.asm ;external procedure which reset bit in a byte ; ; procedure resetbit ( var x : char; bit : integer ); ; extern; ; bit# in range 0..7 ; ;entry code db 95,6,0 ;int vmcode db 92 ;lpn vmcode db 0 ;mode vmcode ;on entry bc=wtos de=wb hl=wbase ; ;get bit# in b_reg, addr(x) in hl, x into c_reg resetbit xchg ;hl=wb dcx h! dcx h! dcx h! dcx h mov b,m ;bit# dcx h! mov d,m! dcx h! mov e,m ;addr(x) xchg ;hl=addr(x) mov c,m ;c=x ;create mask inr b ;incr loop count mvi a,0feh loop rrc dcr b jnz loop ;a=mask c=byte ana c mov m,a ;store byte ret ; end READTHIS RENAME INTRESETBIT$$$MEXTERN 0300]_\+V+^+}2|2>zV+^~##~2#~2#N#F#~2#~G<2+V+^z,$""+V+^2#"+V+^* :O::=G:2›=ʸ*##¢:=2¢*}_:G|W*: …:=2‚*r+s(-2;AEIMW[admrzPAS404 INT PAS405 INTPAS406 INTPICTURE INT*READTHIS RENAME INTRESETBITASMSEARCH $$$;setbit.asm ;external procedure which sets a bit on in a byte ; ; procedure setbit ( var x : char; bit : integer ); ; extern; ; bit# in range 0..7 ; ;entry code db 95,6,0 ;int vmcode db 92 ;lpn vmcode db 0 ;mode vmcode ;on entry bc=wtos de=wb hl=wbase ; ;get bit# in b_reg, addr(x) in hl, x into c_reg setbit xchg ;hl=wb dcx h! dcx h! dcx h! dcx h mov b,m ;bit# dcx h! mov d,m! dcx h! mov e,m ;addr(x) xchg ;hl=addr(x) mov c,m ;c=x ;create mask inr b ;incr loop count mvi a,1 loop rrc dcr b jnz loop ;a=mask c=byte ora c mov m,a ;store byte ret ; end READTHIS RENAME INTRESETBITASMSEARCH INTSETBIT $$$ EXTERN {=================================================================} FUNCTION sin (x : real) : real; CONST pi = 3.1415926535897; two_pi = 6.2831853071796; VAR i : integer; {=================================================================} PROCEDURE compute_sin; VAR result, result2, f, exclam, x2, power : real; odd1, i : integer; BEGIN (* compute_sin *) x2 := sqr(x); power := x * x2; odd1 := - 1; i := 0; result := x; exclam := 6.0; f := 3.0; REPEAT result2 := result; IF odd1 = 1 THEN result := result + (power / exclam) ELSE result := result - (power / exclam); power := power * x2; odd1 := - odd1; f := f + 2.0; exclam := f * (f - 1.0) * exclam; i := i + 1; IF i > 5 THEN BEGIN i := 0; IF abs(result - result2) < (1e-12 * result) THEN result2 := result; END; UNTIL result = result2; sin := result; END; (* compute_sin *) BEGIN (* sin *) IF (x = 0.0) OR (x = pi) OR (x = two_pi) THEN sin := 0.0 ELSE BEGIN WHILE x < 0.0 DO x := x + two_pi; WHILE x > two_pi DO x := x - two_pi; IF x > 1.0e-08 THEN compute_sin ELSE sin := x; END; (* else *) END; (* sin *) . := result; IF odd1 = 1 THEN result := result + (power / exclam) ELSE result := result - (power / exclam); power := power * x2; odd1 := - odd1; f := f + 2.0; exclam := f * (f - 1.0) * exclam; i := i + 1; IF i > 5 THEN BEGIN i := 0; IF abs(result - result2) < (1e-12 * result) THEN result2 := result; END; UNTIL result = result2; sin :# EXTERN {=================================================================} FUNCTION sqrt (x : real) : real; VAR sq, a, b : real; exponent, i : integer; zap : RECORD CASE integer OF 0 : (num : real); 1 : (ch8 : ARRAY [1..8] OF char); END; BEGIN IF x = 0.0 THEN sqrt := 0.0 ELSE BEGIN sq := abs(x); zap.num := sq; exponent := ord(zap.ch8[1]); exponent := (exponent DIV 2) + 32; zap.ch8[1] := chr(exponent); a := zap.num; b := 0; i := 0; WHILE a <> b DO BEGIN b := sq / a; a := (a + b) / 2; i := i + 1; IF i > 4 THEN BEGIN i := 0; IF abs(a - b) < (1.0e-12 * a) THEN a := b; END; END; sqrt := a; END; (* else *) END; (* sqrt *) . ;testbit.asm ;external function which returns bit value of a byte ; ; function testbit ( x : char; bit : integer ): ; boolean; extern; ; ; bit number is in range 0..7 ; ;entry code db 95,6,0 ;int vmcode db 92 ;lpn vmcode db 0 ;mode vmcode ;on entry bc=wtos de=wb hl=wbase ; ;get bit# into b_reg and x into a_reg testbit xchg ;hl=wb dcx h! dcx h! dcx h! dcx h ;point to bit lownib mov b,m ;low byte of bit dcx h! mov a,m ;x inr b ;shift loop loop rlc dcr b jnz loop jc true ;bit is set ;false : bit is zero dcx h! mvi m,0! dcx h! mvi m,0 ret ;true : bit is one true dcx h! mvi m,0! dcx h! mvi m,1 ret ; end SETBIT ASMSIN PAS SQRT PASTESTBIT $$$MVERIFY $&0300(8PI_iR#=enter filename or 'end' :  i i 0=ENDRXP#i0@ h%hǸRl& mi  &&&&&& & &&&&&&&&&& &"&$&&&(&*&,&.&0&2&4&6&8&:&<&>&@&B&D&F&H&J&L&N&P&R&T&V&X&Z&\&^&`&b&d&f&h&j&l&n&p&r&t&v&x&z&|&~%iPt= sectors = = sum =    h PYSVz! This is the release date of the disk. PAS405 INT PAS406 INT PICTURE INT READTHIS RENAME INT RESETBITASM SEARCH INT SETBIT ASM SIN PAS SQRT PAS TESTBIT ASM VERIFY INT JRTMAN .TOC 84 22 10240 80 JRTTECH .NOT 1C 55 2560 20 PAS400 .INT 7F E1 24320 190 PAS404 .INT 18 0E 1664 13 PAS405 .INT 07 1B 3456 27 PAS406 .INT F9 6A 3200 25 PICTURE .INT 9F B1 5376 42 READTHIS. 9D 97 1920 15 RENAME .INT 44 7D 896 7 RESETBIT.ASM 8A B3 640 5 SEARCH .INT B9 9A 512 4 SETBIT .ASM 2E F4 640 5 SIN  Fog Library Disk FOG-CPM.172 Copyright (1987) by Fog International Computer Users Group to the extent not copyrighted by the original author for the exclusive use and enjoyment of its members. Any reproduction or distribution for profit or personal gain is strictly forbidden. For information, contact FOG, P. O. Box 3474, Daly City, CA. 94015-0474. as part of the description of a file indicates that the program is distributed on a "try first, pay if you like it" basis. If you find the program(s) meet your need, please refer to the author's documentation for information on becoming a registered user. Only by registering and paying for the programs you like and use will the authors of such programs continue development. Often, more complete documentation, additional modules, and new releases are available only to registered users. Disk 2 of 4. JRT Pascal. Filename Description -04-00 .87 This is the release date of the disk. -CPM172 .D$OC This is the description of the disk contents. JRTMAN .000 EEF4 6K ver. 4.0 [JRT Pascal 26 of 78] JRTMAN .001 AEC8 16K ver. 4.0 [JRT Pascal 27 of 78] JRTMAN .002 A4BD 10K ver. 4.0 [JRT Pascal 28 of 78] JRTMAN .003 80B0 5K ver. 4.0 [JRT Pascal 29 of 78] JRTMAN .004 01AB 14K ver. 4.0 [JRT Pascal 30 of 78] JRTMAN .005 5B03 31K ver. 4.0 [JRT Pascal 31 of 78] JRTMAN .008 84DA 2K ver. 4.0 [JRT Pascal 32 of 78] JRTMAN .ERR 4A1E 1K ver. 4.0 [JRT Pascal 33 of 78] JRTMAN .IFO BB3E 11K ver. 4.0 [JRT Pascal 34 of 78] JRTMAN .TOC 8422 10K ver. 4.0 [JRT Pascal 35 of 78] JRTTECH .NOT 1C55 3K ver. 4.0 [JRT Pascal 36 of 78] PAS400 .INT 7FE1 24K ver. 4.0 [JRT Pascal 37 of 78] PAS404 .INT 180E 2K ver. 4.0 [JRT Pascal 38 of 78] PAS405 .INT 071B 4K ver. 4.0 [JRT Pascal 39 of 78] PAS406 .INT F96A 4K ver. 4.0 [JRT Pascal 40 of 78] PICTURE .INT 9FB1 6K ver. 4.0 [JRT Pascal 41 of 78] READTHIS. 9D97 2K ver. 4.0 [JRT Pascal 42 of 78] RENAME .INT 447D 1K ver. 4.0 [JRT Pascal 43 of 78] RESETBIT.ASM 8AB3 1K ver. 4.0 [JRT Pascal 44 of 78] SEARCH .INT B99A 1K ver. 4.0 [JRT Pascal 45 of 78] SETBIT .ASM 2EF4 1K ver. 4.0 [JRT Pascal 46 of 78] SIN .PAS 4907 2K ver. 4.0 [JRT Pascal 47 of 78] SQRT .PAS 3C5B 1K ver. 4.0 [JRT Pascal 48 of 78] TESTBIT .ASM 432A 1K ver. 4.0 [JRT Pascal 49 of 78] VERIFY .INT 2B78 1K ver. 4.0 [JRT Pascal 50 of 78] 2K ver. 4.%&'