home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / PASCAL / VALZAH.ZIP / REGEN.DOC < prev    next >
Encoding:
Text File  |  1987-01-11  |  2.5 KB  |  63 lines

  1.         if sym=elsesym then begin
  2.                 getsym;
  3.                 statement
  4.                 end;
  5.             test(endsym,13);
  6.             gen(lab,0,elab);
  7.             gen(int,0,0-intsize)
  8.             end; (* case casesym *)
  9.         getsy:    begin
  10.             getsym; test(pound,99);
  11.             i:=compcon;
  12.             test(lparen,9); test(ident,2);
  13.             gen(csp,i,0);
  14.             i:=position;
  15.             genlev(sto,i);
  16.             test(rparen,4)
  17.             end; (* case getsy *)
  18.         putsym:    begin
  19.             getsym;
  20.             test(pound,99);
  21.             i:=compcon;
  22.             if sym<>lparen then error(9);
  23.             repeat
  24.                 getsym; expression(dontcare);
  25.                 if eresrting at 100h.
  26.  
  27. 5) Boot back to the CCP.
  28.  
  29. 6) Save memory up to one byte below the final code address printed by
  30.    the assembler.  F'rinstance if 0600 was last address, type
  31.    "SAVE 5 RTP.COM".
  32.  
  33. This procedure must be followed so that PIP can be used to concatenate
  34. the runtime package and the object code produced by the compiler.
  35. It will also make your life a lot easier when using COMPARE.COM to
  36. compare parents and childern (should you ever try and extend the compiler).
  37.  
  38.  
  39. If you make changes to ppc.pas or pfet.pas, you'll want to be sure
  40. that the new compiler is capable of compiling itself.  In genetics,
  41. this would be like making sure that your children are not sterile.
  42. The file validate.sub should help make sure you don't have sterile
  43. children.  It uses a "know fertile" compiler (ppc.com, pfet.com) to
  44. compile the new ppc.pas and pfet.pas.  The resulting compiler is then
  45. used to compile ppc.pas and pfet.pas again.  The results of this
  46. second compilaton are compared to the results of the first.  If they
  47. match, it is safe to erase the "known fertile" compiler because you
  48. now know that you have a compiler which can reproduce itself.  If
  49. they miscompare, you'd better find out why and fix it before erasing
  50. the parents.  You should also note that this test only guarantees
  51. that you'll be able to continue to use the compiler to compile itself.
  52. It does N-O-T guarantee that you've got a fully functional compiler,
  53. because the compiling the compiler does not exercise all functions
  54. of the compiler.
  55.  
  56. After making any changes to the compiler, you'll probably want to
  57. make sure that you can still compile and execute tester.pas.  This
  58. test doesn't test all functions of the compiler either, but passing
  59. tester is good sign that you haven't broken anything major.  By the
  60. way, it is normal to get a few type missmatch errors while compiling
  61. tester.  A new version of the compiler which is smarter about type
  62. checking would prevent these messages.
  63.