home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug003.arc / PASCAL.HLP < prev    next >
Text File  |  1979-12-31  |  10KB  |  215 lines

  1. Compiler Operation
  2. Invoking Pascal
  3. Compilation Switches
  4. File Input/Output
  5. Special Functions and Procedures
  6. Pascal/MT Symbolic Debugger
  7. Pascal/MT Reserved Words
  8. Notes
  9. :Compiler Operation
  10.  
  11.      Thσ Pascal/M╘ compile≥ exist≤ iε tw∩ versions¼á eacΦ consistinτ oµ tw∩ ì
  12. 808░á objec⌠á codσ files║  FLTCOMP.CO═ (renameΣ PASCAL.CO═ oε ARIES-1⌐á anΣ ì
  13. P2/FLT.OV╠á fo≥á thσá versioεá iε whicΦ REA╠á number≤á arσá implementeΣá a≤ ì
  14. floatinτá poin⌠á value≤ internall∙ anΣ BCDCOMP.CO═ anΣ P2/BCD.OV╠á fo≥á thσ ì
  15. versioεá iεá whicΦ REA╠ number≤ arσ implementeΣ a≤ BC─á value≤á internally«  ì
  16. Thesσ file≤ arσ Pas≤ ▒ anΣ Pas≤ ▓ oµ thσ Pascal/M╘ compiler¼á respectively«  ì
  17. Als∩ requireΣ b∙ thσ compile≥ arσ thσ followinτ file≤ --
  18.  
  19.           P1ERRORS.TXT   - Pass 1 Error Messages
  20.           P2ERRORS.TXT   - Pass 2 Error Messages
  21.           PASCAL/F.RT╨   - Run-timσ Packagσ (includinτ debugger⌐ fo≥ FLT
  22.           PASCAL/B.RTP   - Run-time Package (including debugger) for BCD
  23.  
  24.      Thσá inpu⌠á file≤ t∩ thσ Pascal/M╘ compile≥ mus⌠á havσá thσá extensioε ì
  25. '.SRCºá o≥ '.PASº indicatinτ tha⌠ i⌠ i≤ ß sourcσ prograφ file«á  Therσ mus⌠ ì
  26. bσá ß carriagσ return/linσ feeΣ sequencσ a⌠ thσ enΣ oµ eacΦ inpu⌠ linσá anΣ ì
  27. aε inpu⌠ linσ ma∙ no⌠ bσ longe≥ thaε 8░ characters.
  28. :Invoking Pascal
  29.  
  30.      Thσá Pascal/M╘á compile≥ i≤ invokeΣ oε ARIES-▒ b∙ usinτ thσá followinτ ì
  31. commanΣ --
  32.  
  33.           PASCAL filename.DL
  34.  
  35. wherσá 'filenameºá i≤á thσ namσ oµ thσ filσ witΦ thσá extensioεá '.SRCºá o≥ ì
  36. '.PASº containinτ thσ Pascal/M╘ sourcσ statement≤ t∩ bσ compiled¼ ─ i≤ ┘ o≥ ì
  37. ╬á t∩ indicatσ whethe≥ t∩ includσ thσ debugge≥ iε thσ resultan⌠ .CO═á file¼ ì
  38. anΣá ╠á i≤á ┘ o≥ ╬ t∩ indicatσ whethe≥ t∩ producσ ßá .PR╬á filσá (listing)«  ì
  39. PASCA╠ default≤ t∩ n∩ debugge≥ anΣ n∩ listing«  Thσ fou≥ invocatioε option≤ ì
  40. are --
  41.  
  42.           PASCAL filename     - no debugger, no listing
  43.           PASCAL filename.Y   - debugger, no listing
  44.           PASCAL filename.NY  - no debugger, listing
  45.           PASCAL filename.YY  - debugger, listing
  46.  
  47.      Fo≥á usagσá witΦ thσ BC─ versioε oµ thσá compiler¼á thσá command≤á arσ ì
  48. similar except that 'PASCAL' is replaced by 'BCDCOMP'.
  49. :Compilation Switches
  50.      Compile-timσá option≤ ma∙ bσ specifieΣ t∩ thσ compile≥ froφ withiε thσ ì
  51. sourcσ file«á  SucΦ option≤ takσ thσ forφ oµ specia∞ comments«  Thσ forφ oµ ì
  52. thesσ comment≤ is
  53.           (*$o info*) or {$o info}
  54. wherσá 'oºá i≤á thσá lette≥ oµ thσ optioε anΣá 'infoºá i≤á informatioε ì
  55. particular to that option.  These options are --è
  56.           $I<filename>   Include <filename>.SRC into source stream
  57.           $L+ or $L-     Turn listing on (default) or Turn listing off
  58.           $P             Insert form feed into .PRN file
  59.           $D+ or $D-     Turn debug code on (default) or Turn debug code off
  60.           $C+            Use CALL instructions for real operations
  61.           $Cn            Use RST n for real operations (n=0 ... 7)
  62.           $O $aaaa       ORG program (run-time) at $aaaa (default 100H)
  63.           $R $bbbb       ORG RAM data at $bbbb
  64.           $Z $cc00       Set run-time size to $cc 256-byte pages
  65.           $X $dddd       Set run-time stack space to $dddd (default $200)
  66.           $S+ or $S-     Turn recursion or or Turn recursion off (default)
  67.           $Q+ or $Q-     Enable verbose output (default) or Disable verbose
  68. :File Input/Output
  69.      Thσ standarΣ Pasca∞ READ¼á READLN¼á WRITE¼ anΣ WRITEL╬ statement≤ ì
  70. arσá implementeΣ fo≥ thσ CP/═ consolσ device«á  WRIT┼ o≥ WRITEL╬ t∩á ß ì
  71. built-iεá filσ calleΣ PRINTE╥ i≤ alloweΣ t∩ directl∙ acces≤á thσá CP/═ ì
  72. list device (like, WRITE(PRINTER,'Hello')).
  73.      The following extensions are implemented to handle files --
  74.           OPEN(fcbname,title,result{,extent_number});
  75.                (extent_number defaults to 0)
  76.           CLOSE(fcbname,result);
  77.           CREATE(fcbname,title,result);
  78.           DELETE(fcbname);
  79.           BLOCKREAD(fcbname,buffer,result{,relativeblock});
  80.           BLOCKWRITE(fcbname,buffer,result{,relativeblock});
  81. where    fcbname : a variable of type TEXT (array 0..32 of CHAR)
  82.          title   : ARRAY [0..11] of CHAR with
  83.                     title[0]=disδáá selec⌠á bytσá (0=loggeΣá iεá disk¼ ì
  84.                       1=A,...)
  85.                     title[1..8]=filename and title[9..11]=filetype
  86.          result  : integer to contain returned value
  87.          buffer  : ARRAY [0..127] of CHAR
  88.          relativeblock : optional integer 0..255
  89. :Special Functions and Procedures
  90.  
  91.      Pascal/MT supports the following special routines --
  92.  
  93.           PROC MOVE(source,dest,length-in-bytes);
  94.           PROC EXIT;
  95.           FUNC TSTBIT(16-bit-var,bit#):BOOLEAN;
  96.           PROC SETBIT(VAR 16-bit-var,bit#);
  97.           PROC CLRBIT(VAR 16-bit-var,bit#);
  98.           FUNC SHR(16-bit-var,#bits):16-bit-result; {Shift Right}
  99.           FUNC SHL(16-bit-var,#bits):16-bit-result; {Shift Left}
  100.           FUNC LO(16-bit-var):16-bit-result;
  101.           FUNC HI(16-bit-var):16-bit-result;
  102.           FUNC SWAP(16-bit-var):16-bit-result;
  103.           FUNC ADDR(variable reference):16-bit result;
  104.           PROC WAIT(portnum:constant; mask:constant; polarity:boolean);
  105.           FUNC SIZEOF(variable or type name):integer;
  106.      Please refer to pp 32-33 of "Pascal/MT 3.0 Guide" for further info.
  107. :Pascal/MT Symbolic Debugger
  108.  
  109.      Thσá debugginτá facilitie≤ availablσ t∩ thσ use≥ wheεá usinτá thσ ìèdebugge≥ fal∞ int∩ tw∩ catagorie≤ -- prograφ flo≈ contro∞ anΣ variablσ ì
  110. display.
  111.  
  112.      Iµá thσ use≥ wishe≤ t∩ seσ thσ command≤ durinτ thσá executioεá oµ ì
  113. the debugger, type a '?' followed by a return.
  114.  
  115.      Thσ prograφ flo≈ command≤ provideΣ iε thσ symboliπ debugge≥ allo≈ ì
  116. thσ use≥ t∩ debuτ thσ Pascal/M╘ prograφ a⌠ thσ Pasca∞ sourcσ statemen⌠ ì
  117. level«á  IncludeΣá arσ go/continuσ (witΦ optiona∞ breakpoint)¼á trace¼ ì
  118. set/clear/displa∙á permanen⌠ breakpoin⌠ anΣ ß modσ whicΦ wil∞á displa∙ ì
  119. thσ namσ oµ eacΦ procedure/functioε oε thσ consolσ a≤ thσ procedurσ o≥ ì
  120. function is entered.
  121.  
  122.      These commands are discussed briefly on the following displays --
  123.  
  124. Debugger Command:  G - Go with optional breakpoint
  125.  
  126.      Syntax:   G{,<linenumber>}
  127.                G{,<proc/func name>}
  128.  
  129.      G∩ resume≤ executioε wherσ thσ prograφ las⌠ stopped«á  Breakpoin⌠ ì
  130. may be optionally set at a specific line or function/procedure.
  131.  
  132. Debugger Command:  T - Trace
  133.  
  134.      Syntax:   T{<integer>}
  135.  
  136.      Execute one or more lines of the program.
  137.  
  138. Debugger Command:  E - Procedure/Function Display Toggle
  139.  
  140.      Syntax:   {-}E
  141.  
  142.      ┼á engage≤ displa∙ oµ thσ name≤ oµ procedures/function≤á entered╗   ì
  143. -┼ disengage≤ it.
  144.  
  145. Debugger Command:  S - Set/Clear Slow Execution Mode
  146.  
  147.      Syntax:  {-}S
  148.  
  149.      ╙á allow≤á thσ use≥ t∩ selec⌠ Fast¼á Medium¼á o≥á Slo≈á executioε ì
  150. speed; -S causes the program to run at full speed.
  151.  
  152. Debugger Command:  P - Set/Clear Permanent Breakpoint
  153.  
  154.      Syntax:  -P     (* Clears breakpoint *)
  155.               P<linenumber>
  156.               P<proc/func name>
  157.  
  158.      P sets the permanent breakpoint; -P clears it.
  159.  
  160. Debugger Command:  B - Display Permanent Breakpoint
  161.  
  162.      Syntax:  B
  163.  
  164.      Displays line the permanent breakpoint is set for.
  165.  
  166. Debugger Command:  D - Variable Display
  167.  
  168.      Syntax:   D <global var>
  169.                D <proc/func name>:<local var>
  170.                D <func name>
  171.                D <pointer name>^
  172.  
  173.      The D command is used as indicated.
  174.  
  175. Debugger Commands:  +,-,* - Variable Display
  176.  
  177.      Syntax:  *  -- display last value requested (using D or some other)
  178.               +n -- display variable n bytes forward from last
  179.               -n -- display variable n bytes backward from last
  180. :Pascal/MT Reserved Words
  181.  
  182.      ABS            DO             LO             READ         TSTBIT
  183.      ADDR           DOWNTO         MAXINT         READLN       TYPE
  184.      AND            ELSE           MOD            REAL         UNTIL
  185.      ARRAY          ENABLE         MOVE           RECORD       VAR
  186.      BEGIN          END            NIL            REPEAT       WAIT
  187.      BLOCKREAD      EXIT           NOT            RIM85        WHILE
  188.      BLOCKWRITE     EXTERNAL       ODD            ROUND        WRITE
  189.      BOOLEAN        FALSE          OF             SETBIT       WRITELN
  190.      CASE           FILE           OPEN           SHL
  191.      CHAIN          FOR            OR             SHR
  192.      CHAR           FUNCTION       ORD            SIM85
  193.      CHR            GOTO           OUTPUT         SIZEOF
  194.      CLOSE          HI             PACKED         SQR
  195.      CLRBIT         IF             PRED           SQRT
  196.      CONST          INLINE         PRINTER        SUCC
  197.      CREATE         INPUT          PROCEDURE      SWAP
  198.      DELETE         INTEGER        PROGRAM        THEN
  199.      DISABLE        INTERRUPT      RANDOMREAD     TO
  200.      DIV            LABEL          RANDOMWRITE    TRUE
  201. :Notes
  202.      1. Hexadecimal values may be specified as $hhhh, like $1A = 1AH.
  203.      2«á Al∞á standarΣ Pasca∞ typσ definition≤ excep⌠ ARRA┘ arσá supported«  ì
  204. Thσáá standarΣáá forφáá ARRAY...O╞áá ARRAY..«ááá mus⌠áá bσáá specifieΣáá a≤ ì
  205. ARRAY[...,...,...], and a maximum of three dimensions may be used.
  206.      3. Type TEXT is ARRAY [0..35] OF CHAR.
  207.      4«á Interrup⌠ Procedures¼á declareΣ a≤ "PROCEDUR┼ INTERRUPT[i▌ proc;"¼ ì
  208. are supported, where i is the restart vector number (0..7).
  209.      5«á CP/═á V▓á randoφá filσá acces≤á i≤á supporteΣá b∙á RANDOMREA─á anΣ ì
  210. RANDOMWRITE.
  211.      6«á Machinσá code¼á constan⌠ data¼á anΣ assembl∙ languagσ codσ ma∙á bσ ì
  212. inserted using INLINE (see pp 37-39 of "Pascal/MT 3.0 User Guide").
  213.      7. Chaining is supported by CHAIN, whose usage is "CHAIN(filename)".
  214.      8. Redirected I/O is supported (see pp 42-43).
  215.