home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / mystic.zip / PAS2.DOC < prev    next >
Text File  |  1986-02-27  |  12KB  |  344 lines

  1.  
  2.         Mystic Pascal  User Manual                                      12
  3.  
  4.  
  5.         3.  Full Screen Editor
  6.  
  7.              Mystic  Pascal  provides a full screen editor which is  used 
  8.         for  entering,  modifying and inspecting Pascal source  programs.  
  9.         It is not intended for editing other types of files.
  10.  
  11.              You can edit your Pascal program as a text file although the 
  12.         editor stores the program in a "tokenized" format.   A token is a 
  13.         one byte code which can represent an entire Pascal reserved word.  
  14.         For  example,  the  reserved word PROCEDURE uses 9 bytes in  text 
  15.         format  but only one byte in token format.   Obviously a  typical 
  16.         Pascal program can be greatly compressed by using token format.
  17.  
  18.              The  editor converts all identifiers to upper case  when  it 
  19.         stores  them  in  its table.   You can use an  option  switch  to 
  20.         control  whether  reserved words,  standard identifiers and  user 
  21.         defined identifiers are displayed in lower or upper case.  (Refer 
  22.         to   section  4.1  of  this  manual.)    For  example,   the  two 
  23.         identifiers "Initialize" and "INITIALIZE" are treated as the same 
  24.         identifier.
  25.  
  26.              Source  programs  must  not contain lines  greater  than  80 
  27.         characters, the width of the standard display screen.
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.         Section 3:   Full Screen Editor
  58.  
  59.         Mystic Pascal  User Manual                                      13
  60.  
  61.  
  62.         3.1  Loading and Saving Pascal Programs
  63.  
  64.              When you want to work on a Pascal program which is saved  on 
  65.         disk,  you  must load it into Mystic Pascal.   To load a  program 
  66.         from  disk,  go  to  the Editor screen.   (F1 is used  to  switch 
  67.         between  the different screens.)  If you are in the  Editor,  hit 
  68.         F2.  This will display the Editor command menu.  Select command L 
  69.         for load.    You will be asked the name of the file to be loaded.  
  70.         The 3 character filetype must be keyed in with the filename.   It 
  71.         does not assume any default filetype.   A disk letter prefix  may 
  72.         be added to access files not on the current disk drive.
  73.  
  74.              Sample filenames with filetypes:
  75.                   TEST.PAS            c:stock.mdl
  76.                   Startrek.bak        b:Train.set
  77.  
  78.              If the file is not found or there is some other  error,  the 
  79.         error  message  will  be  displayed and you may  then  retry  the 
  80.         operation.
  81.  
  82.              To  save  a  the Pascal program currently  residing  in  the 
  83.         editor is a nearly identical process.  Enter F2, then S, then the 
  84.         filename.filetype.   The filename need not be the same as in  the 
  85.         last Load command.
  86.  
  87.  
  88.  
  89.         3.2  Entering a New Pascal Program
  90.  
  91.              When  Mystic Pascal is first started the editor is empty and 
  92.         a new program may be directly keyed in.  If there is a program in 
  93.         the editor and you wish to enter a new program,  key F2,  then N.  
  94.         This  command clears out the editor.   Any program in the  editor 
  95.         buffer is cleared out of the buffer by the New command.  You  can 
  96.         use the Save command to save such a program first.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.         Section 3:   Full Screen Editor
  115.  
  116.         Mystic Pascal  User Manual                                      14
  117.  
  118.  
  119.         3.3  Editing Commands
  120.  
  121.              Mystic  Pascal  editing commands are used to modify text  on 
  122.         the CRT screen for the current Pascal program.   Many people  are 
  123.         experienced  with the Wordstar word processing  program.   Mystic 
  124.         Pascal's edit commands are similar to those commands.
  125.  
  126.  
  127.         3.3.1  Cursor Movement Commands
  128.  
  129.         right one character           Control D      right arrow
  130.         left one character            Control S      left arrow
  131.         up one line                   Control E      up arrow
  132.         down one line                 Control X      down arrow
  133.         right one word                Control F      Control right arrow
  134.         left one word                 Control A      Control left arrow
  135.         top of file                   Home
  136.         end of file                   End
  137.         tab                           Tab 
  138.         reverse tab                   Shift Tab
  139.         next line                     return
  140.  
  141.  
  142.         3.3.2  Scroll Commands
  143.  
  144.         scroll up one line            Control Z
  145.         scroll down one line          Control W
  146.         scroll up one page            Control C      PgUp
  147.         scroll down one page          Control R      PgDn
  148.  
  149.  
  150.         3.3.3  Insert and Delete Commands
  151.  
  152.         insert mode toggle            Control V      Ins
  153.         insert new line               Control N      
  154.         delete character              Control G      Del
  155.         destructive backspace         Control H      right arrow key 14
  156.         delete word right             Control T
  157.         delete line                   Control Y
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.         Section 3:   Full Screen Editor
  172.  
  173.         Mystic Pascal  User Manual                                      15
  174.  
  175.  
  176.         3.4  Compiling a Pascal Program
  177.  
  178.              To  compile a Pascal program you must first load it into the 
  179.         editor.   Generally a program you are working on will already  be 
  180.         in the editor.
  181.  
  182.              Once  your  program  is  loaded and you are  in  the  editor 
  183.         screen,  then to compile the program, enter key F2 then letter C.  
  184.         If  the  compile has no errors,  a small window will display  the 
  185.         elapsed  time of the compile and the compiler speed in lines  per 
  186.         second.   The size of the code generated is also displayed.   Hit 
  187.         any key to remove the window.
  188.  
  189.              To compile, enter
  190.  
  191.                   F2   then    C
  192.  
  193.              If  there  is an error during the  compile,  the  cursor  is 
  194.         positioned  at the location of the error (or just past it) in the 
  195.         source program.  An error message is displayed in a small window.  
  196.         Hit any key to remove the window and resume editing.  Correct the 
  197.         error and you can then recompile.
  198.  
  199.  
  200.  
  201.         Technical Notes
  202.  
  203.               Mystic  Pascal  uses an advanced compiler  architecture  to 
  204.         achieve very high compile speed.  The "Lines per second" value is 
  205.         intended  to show the effective compilation speed for  comparison 
  206.         with other compilers.
  207.  
  208.              The  compiler  elapsed time is measured using  the  Personal 
  209.         Computer's  timer tick interrupt which occurs every 0.055  second 
  210.         (18.2  times per second).   If,  by chance,  no timer ticks occur 
  211.         between the start and finish of the compilation,  then the actual 
  212.         time must have been between 0.0 and 0.055 second.   In this case, 
  213.         the elapsed time is adjusted to 0.030 second,  a middle value, to 
  214.         avoid division by zero in computing the lines per second.
  215.  
  216.  
  217.  
  218.         3.5  EXE File Create                                ** 1.6 **
  219.  
  220.              After   a  Pascal  program  has  successfully  compiled,   a 
  221.         standalone  EXE file version of the program may be  created  with 
  222.         the 'E' command on the F2 menu.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.         Section 3:   Full Screen Editor
  229.  
  230.         Mystic Pascal  User Manual                                      16
  231.  
  232.  
  233.         4.  Direct Mode
  234.  
  235.              In the Direct Mode screen,  Pascal statements may be entered 
  236.         directly.   They are instantly compiled, executed and any results 
  237.         displayed.
  238.  
  239.              The  statements are compiled at the global level.   You  can 
  240.         access  all  global variables,  procedures and functions but  not 
  241.         those  declared within a procedure or function.   Each  statement 
  242.         must fit on one line.   Multiple statements may be entered on one 
  243.         line.
  244.  
  245.              The backslash "\" is the prompt character.
  246.  
  247.              To run the entire program,  type the program's name which is 
  248.         declared in the program header.
  249.  
  250.              Since  many  Direct Mode statements will use  the  procedure  
  251.         WRITE  to display the value of variables,  an abbreviated form is 
  252.         provided.  
  253.  
  254.              .X, Y, Z       is equivalent to
  255.              WRITE(X, Y, Z)
  256.  
  257.              When using the dot print command,  no other statements  must 
  258.         appear on the line and the dot must be the first character.
  259.  
  260.  
  261.  
  262.         4.1  Case Control
  263.  
  264.              The  #CASE  command controls the display of upper and  lower 
  265.         case in the editor screen and for the Save command.   Three types 
  266.         of  words  - reserved words,  predefined  identifiers  and  user-
  267.         declared  identifiers - may be displayed in either upper or lower 
  268.         case.  The #CASE command is keyed into the Direct Mode screen.
  269.  
  270.              The format is:
  271.  
  272.                   #CASE=abc
  273.  
  274.              a,  b and c may be either 'U' or 'L'.   No spaces or  commas 
  275.         are allowed in this command.
  276.  
  277.              a = reserved word case
  278.              b = predefined identifiers case
  279.              c = user-declared identifiers case
  280.  
  281.              The initial setting is  #CASE=ULL.
  282.  
  283.  
  284.  
  285.         Section 4:   Direct Mode
  286.  
  287.         Mystic Pascal  User Manual                                      17
  288.  
  289.  
  290.  
  291.         4.2  Video Snow
  292.  
  293.              The IBM Color Adapter may produce video noise or "snow" when 
  294.         the video memory is directly updated.   Mystic Pascal does access 
  295.         the  video memory directly because this is many times faster than 
  296.         operating  through DOS.   Mystic Pascal is able to  suppress  the 
  297.         snow  effect,  but  this may greatly slow down the display  speed 
  298.         since screen updates may only be done during vertical retrace.
  299.  
  300.              Snow suppression is automatically turned on when running  on 
  301.         the  Color  card.   Snow  suppression may be  suppressed  by  the 
  302.         Mysticin installation program,  because some IBM compatible color 
  303.         cards  do  not produce snow and should not be forced to  pay  the 
  304.         speed penalty.
  305.  
  306.              Snow  suppression  may also be toggled on and off  with  the 
  307.         #SNOW command in Direct Mode.  Do not use this command if a color 
  308.         card is not present!   Color card users can easily see the effect 
  309.         of snow suppression by trying this command and then examining the 
  310.         System Display screen.
  311.  
  312.  
  313.         4.3  Intermediate Code Listing
  314.  
  315.              The  Mystic  Pascal  compiler  parser  outputs  intermediate 
  316.         codes.  The code generator then converts these "icodes" into 8086 
  317.         object code.  Mystic's first optimizer operates on the icodes and 
  318.         the second optimizer operates on the 8086 code.  
  319.  
  320.              The  #LIST  command produces a listing of the icodes on  the 
  321.         printer.   This  listing is only for informational  purposes  for 
  322.         hackers and other curious people.
  323.  
  324.              The formats are:
  325.  
  326.              #LIST = 1      Turn on Icode listing
  327.              #LIST = 0      Turn off Icode listing
  328.  
  329.              Warning!   The Icode listing for a large program can be VERY 
  330.         long and may not be interrupted once begun.
  331.  
  332.  
  333.         4.4  Clear Screen Command
  334.  
  335.              In  Direct  Mode the screen may be cleared by  entering  '#' 
  336.         followed by a return.
  337.  
  338.  
  339.  
  340.  
  341.  
  342.         Section 4:   Direct Mode
  343.  
  344.