home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug175.arc / JRTMAN1.LBR / JRTMAN.0Z1 / JRTMAN.001
Text File  |  1979-12-31  |  16KB  |  542 lines

  1. .OP
  2.  
  3.  
  4.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -1-
  5.  
  6.  
  7.  
  8.  
  9.       JRT Pascal version 3.0
  10.  
  11.  
  12.  
  13.            This is a major enhancement over earlier versions of JRT Pascal:
  14.  
  15.               version         release date
  16.               -------         ------------
  17.                 1.3           March 1980
  18.                 1.4           August 1980
  19.                 2.0           January 1982
  20.                 2.1           July 1982
  21.                 2.2           November 1982
  22.                 3.0           March 1983
  23.  
  24.            Version  3.0  includes internal improvements and these major new
  25.       features:
  26.               1. expanded user manual with 3-ring binder
  27.               2. JRT Pascal reference card
  28.               3. full support for indexed files (section 7.)
  29.               4. CRTMAP utility for full-screen record display (15.)
  30.               5. PICTURE external function for number formatting (7.10)
  31.               6. full support for Pascal file variables and GET/PUT (7.)
  32.               7. dynamic arrays - ALLOCATE, DEALLOCATE (4.9)
  33.               8. SEARCH external function (5.20)
  34.               9. %INCLUDE directive (3.4)
  35.              10. improved compiler listing, %TITLE, %PAGE(n)
  36.  
  37.            To make use of the new features, programs  written  for  earlier
  38.       versions should be recompiled under version 3.0.
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  56. è
  57.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -2-
  58.  
  59.  
  60.  
  61.       1.    Introduction
  62.  
  63.  
  64.            Pascal  is  a  high  level  programming language named after the
  65.       French  philosopher  and  mathematician  Blaise  Pascal  (1623-1662).
  66.       Nicklaus  Wirth  developed  the  language  beginning in 1968. It is a
  67.       descendent of  the  Algol  family  of  languages  which  incorporates
  68.       principles of structured programming.
  69.  
  70.            JRT  Pascal  was  designed  specifically  for the CP/M operating
  71.       system.  It includes many  state  of  the  art  features  not  before
  72.       available in any microcomputer language.
  73.  
  74.  
  75.       1.1   JRT Pascal features
  76.  
  77.            With  JRT  Pascal, programs of practically unlimited size can be
  78.       developed. External procedures and functions  written  in  Pascal  or
  79.       assembly  language  are  separately  compiled. They are automatically
  80.       loaded from disk when they are first referenced or they may be merged
  81.       with the main program  to  form  one  module.  The  advanced  dynamic
  82.       storage  system  will  purge  infrequently used procedures if storage
  83.       becomes full. Dynamic storage compression ensures the optimum use  of
  84.       the main storage resource.
  85.  
  86.            The  floating  point arithmetic provides 14 digits of precision.
  87.       All standard functions are supported.
  88.  
  89.            The input/output system supports sequential  and  two  types  of
  90.       random  disk  files.  With the "relative byte address" option, random
  91.       files of variable length records can be processed. Disk file data can
  92.       be written in either ASCII format or internal binary format.
  93.  
  94.            The CALL builtin procedure provided direct access  to  all  CP/M
  95.       operating  system  services.  The  MAP  builtin  procedure allows any
  96.       region of main storage  to  be  accessed  as  if  it  were  a  Pascal
  97.       variable.  Hardware input/output ports are directly accessable.
  98.  
  99.            Debugging  is  simplified  by  the  line  number  trace  and the
  100.       procedure name trace which can both be  turned  on  and  off  by  the
  101.       program at run-time.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  110. è
  111.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -3-
  112.  
  113.  
  114.  
  115.            Activan  -  the  activity  analyzer - can be used to monitor the
  116.       execution of a program and print out a histogram showing  the  amount
  117.       of activity in each program area.
  118.  
  119.  
  120.       1.2     Hardware requirements
  121.  
  122.            The compiler requires a minimum of 56K of main storage. One disk
  123.       drive  with  at  least  90K of storage is needed, but two or more are
  124.       strongly recommended.
  125.  
  126.  
  127.       1.3     List of files
  128.  
  129.       JRT Pascal compiler:
  130.               JRTPAS3.COM
  131.               PASCAL0.INT
  132.               PASCAL1.INT
  133.               PASCAL2.INT
  134.               PASCAL3.INT
  135.               PASCAL4.INT
  136.               PASCAL.LIB
  137.  
  138.       Run-time environment:
  139.               EXEC.COM
  140.  
  141.       External functions:
  142.               ARCTAN.PAS
  143.               COS.PAS.
  144.               EXP.PAS
  145.               LN.PAS
  146.               SIN.PAS
  147.               SQRT.PAS
  148.  
  149.       External procedure assembler:
  150.               JRTASM.INT
  151.  
  152.       External procedure linker:
  153.               LINKER.INT
  154.  
  155.       CRT Mapping utility:
  156.               CRTMAP.PAS
  157.  
  158.       System customization program:
  159.               CUSTOMIZ.INT
  160.  
  161.  
  162.  
  163.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  164. è
  165.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -4-
  166.  
  167.  
  168.  
  169.       Block letters external procedure:
  170.               LETTERS.INT
  171.  
  172.       Indexed file processing procedures:
  173.               INDEX0.INT
  174.               INDEX1.INT
  175.               INDEX2.INT
  176.  
  177.       Table search procedure:
  178.               SEARCH.INT
  179.  
  180.       Report number formatting facility:
  181.               PICTURE.INT
  182.  
  183.       Dynamic trace control external procedure:
  184.               DEBUG.INT
  185.       Utility to convert Microsoft modules:
  186.               CONVERTM.INT
  187.  
  188.       Statistical external procedure:
  189.               JSTAT.PAS
  190.  
  191.       Graph preparation external procedure:
  192.               JGRAF.PAS
  193.  
  194.       Sample assembly language external procedures:
  195.               SETBIT.ASM
  196.               RESETBIT.ASM
  197.               TESTBIT.ASM
  198.  
  199.       Additional external procedures:
  200.               ERASE.INT
  201.               RENAME.INT
  202.               VERIFY.INT
  203.  
  204.       Checksum information for file verification:
  205.               READTHIS
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  218. è
  219.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -5-
  220.  
  221.  
  222.  
  223.       1.4  For Beginners
  224.  
  225.  
  226.            This section explains how to use JRT Pascal for  those  who  are
  227.       new  to  personal  computing  or  who  are unfamiliar with "compiled"
  228.       languages.
  229.  
  230.            This is a tutorial on how to operate our implementation  of  the
  231.       Pascal  language.   For  tutorial  information of the Pascal language
  232.       itself, we refer you to the many text books now available.   The  one
  233.       book  we  strongly  recommend  is  the  standard definition of Pascal
  234.       written by its inventor, Nicklaus Wirth.
  235.  
  236.               Pascal User Manual and Report
  237.               by Jensen and Wirth
  238.               published by Springer-Verlag
  239.  
  240.  
  241.     Developing Pascal programs
  242.  
  243.            Developing a Pascal program is a three step process:
  244.  
  245.               1. create or modify a Pascal source program with any
  246.                  standard CP/M editor, like ED, WORDSTAR, or MAGICWAND
  247.  
  248.               2. compile the Pascal source program into an intermed-
  249.                  iate program
  250.  
  251.               3. execute the intermediate code (i.e., run the program)
  252.  
  253.       This process is illustrated in the flowchart on page 8.
  254.  
  255.  
  256.     File names and file types
  257.  
  258.            In CP/M, the names of data files and program  files  consist  of
  259.       two  parts: a filename of up to 8 characters, and a filetype of up to
  260.       3 characters.  These two parts are separated by a period.
  261.  
  262.               REPORT.LST
  263.               A.PAS
  264.               A.INT
  265.               STAT.COM
  266.  
  267.  
  268.  
  269.  
  270.  
  271.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  272. è
  273.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -6-
  274.  
  275.  
  276.  
  277.            The JRT Pascal compiler assumes that the source  program  has  a
  278.       filetype  of   '.PAS'.   It  creates  an  intermediate program with a
  279.       filetype of  '.INT'.
  280.  
  281.  
  282.     Editors
  283.  
  284.            Any standard CP/M-compatible editor may be  used  to  create  or
  285.       modify  programs  in  JRT  Pascal.   The  demo  program listing which
  286.       follows uses the CP/M line editor ED.COM
  287.  
  288.  
  289.     Required files   **** IMPORTANT ****
  290.  
  291.            The compiler and run-time system are large and complex programs.
  292.       TO make best use of  limited  main  storage  they  are  divided  into
  293.       modules.   These modules must be present on your disks when using the
  294.       compiler or run-time system.  The modules need not all be on  the  A:
  295.       disk.   They  may  be on either A: or B: disk, the Pascal system will
  296.       automatically locate them. (Use CUSTOMIZ to setup or modify the 'disk
  297.       search list' for both the run-time and compile-time modules if  disks
  298.       other than A: or B: are to be searched.)
  299.  
  300.            The compiler requires all these files:
  301.  
  302.               JRTPAS3.COM
  303.               PASCAL.LIB
  304.               PASCAL0.INT
  305.               PASCAL1.INT
  306.               PASCAL2.INT
  307.               PASCAL3.INT
  308.               PASCAL4.INT
  309.  
  310.  
  311.  
  312.            The run-time system (execution) requires the files:
  313.  
  314.               EXEC.COM
  315.               PASCAL.LIB
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  326. è
  327.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -7-
  328.  
  329.  
  330.  
  331.     Demo program
  332.  
  333.            In  order to clearly illustrate the program development process,
  334.       a flowchart of this process is included  here.   An  actual  computer
  335.       listing  of the three step process (create, compile, run) for a small
  336.       demo program follows the flowchart.
  337.  
  338.            The demo program is named A.PAS.  It computes and  displays  the
  339.       squares of the numbers 1 to 10.
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  380. è
  381.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -8-
  382.  
  383.  
  384.  
  385.         Program Development Flowchart
  386.  
  387.  
  388.                                    -----------
  389.                                    !  start  !
  390.               Commands             -----------        Actions
  391.               ________                  !             -------
  392.                               --------->!
  393.                               !         !
  394.                               !         V
  395.                               !    -----------
  396.                ED A.PAS       !    ! ED.COM  !        create/modify
  397.                               !    !         !           program
  398.                               !    -----------
  399.                               !         !
  400.                               !         !
  401.                               !         V
  402.                               !    -----------
  403.                JRTPAS3 A      !    !JRTPAS3. !        compile the
  404.                               !    !  COM    !           program 
  405.                               !    -----------
  406.                               !         !
  407.                               !         !
  408.                               !         V
  409.                               !    -----------
  410.                               !yes ( COMPILE )
  411.                               !<---( ERRORS? )
  412.                               !    -----------
  413.                               !         ! no
  414.                               !         !
  415.                               !         V
  416.                               !    ------------
  417.               EXEC A          !    ! EXEC.COM !       run the program
  418.                               !    ------------
  419.                               !         !
  420.                               !         !
  421.                               !         V
  422.                               !    -----------
  423.                               !no  ( RESULTS )
  424.                               !<---(  OKAY?  )
  425.                                    -----------
  426.                                         ! yes
  427.                                         !
  428.                                         V
  429.                                     ----------
  430.                                     !  STOP  !
  431.                                     ----------
  432.  
  433.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  434. è
  435.       JRT Pascal  User's Guide     version 3.0           NOT FOR SALE   -9-
  436.       Actual computer listing:   Create, Compile, and Run the program
  437.       -------------------------------------------------------------------------
  438.       A>ed a.pas              -- use editor to create program A.PAS
  439.       NEW FILE
  440.            : *i
  441.           1:  { demo program to print squares of numbers 1 to 10 }
  442.           2:
  443.           3:  program a;
  444.           4:
  445.           5:  var
  446.           6:  i : integer;
  447.           7:
  448.           8:  begin
  449.           9:  for i := 1 to 10 do
  450.          10:          writeln( i, sqr(i) );
  451.          11:  end.
  452.          12:  ^z
  453.            :  *e
  454.       -------------------------------------------------------------------------
  455.       A>jrtpas3 a             -- compile the demo program
  456.       JRT Pascal    ver 3.0
  457.       Copyright 1983 JRT Systems
  458.  
  459.       0000  0001:     { demo program to print squares of numbers 1 to 9 }
  460.       0000  0002:
  461.       0000  0003:     program a;
  462.       0000  0004:
  463.       0003  0005:     var
  464.       0003  0006:     i : integer;
  465.       0003  0007:
  466.       0006  0008:     begin
  467.       0010  0009:     for i := 1 to 10 do
  468.       0028  0010:             writeln( i, sqr(i) );
  469.       0029  0011:     end.
  470.       No errors detected
  471.       Module size = 45 dec bytes
  472.       End of compile for A
  473.       -------------------------------------------------------------------------
  474.       A>exec a                -- Run the program
  475.       Exec   ver 3.0
  476.        1 1
  477.        2 4
  478.        3 9
  479.        4 16
  480.        5 25
  481.        6 36
  482.        7 49
  483.        8 64
  484.        9 81
  485.        10 100
  486.       Program termination
  487.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  488. è
  489.       JRT Pascal  User's Guide     version 3.0          NOT FOR SALE   -10-
  490.  
  491.  
  492.  
  493.  
  494.         Basic terms
  495.  
  496.  
  497.         compiler  -  The Pascal compiler converts Pascal source programs to
  498.                intermeditate program files.  It reads in  a  Pascal  source
  499.                program  and  writes  out  an  INT  file.  The compiler also
  500.                displays the program at the terminal during the  compilation
  501.                process.
  502.  
  503.         debugging  -  Correcting errors in the program.  There are two main
  504.                catagories of errors or "bugs": those which can be  detected
  505.                by  the  compiler  and  those  which  appear only during the
  506.                execution  of  the  program.   Both  may  be  corrected   by
  507.                modifying the source program and re-compiling.
  508.  
  509.         intermediate  program  -  This  is  an internal code version of the
  510.                program which is created by the compiler.  It is a file with
  511.                a filetype of INT.
  512.  
  513.         source program - This is the actual Pascal program which is a  text
  514.                file  and  may be printed or viewed on a terminal, i.e., all
  515.                the bytes are in the range of the ASCII  character  set  and
  516.                are  therefore  printable  characters.  It has a filetype of
  517.                PAS.
  518.  
  519.         trace - There is a JRT  Pascal  feature  which  displays  the  line
  520.                number  of each line in the source program during execution.
  521.                This is very useful in locating the cause  of  some  program
  522.                errors.
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.       Copy compliments of Merle Schnick            SECTION 1:  Introduction
  542. è