home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / s / s48.zip / INSTALL < prev    next >
Text File  |  1992-06-18  |  5KB  |  161 lines

  1. -*- Mode: Indented-text; -*-
  2.  
  3. To install the system, it is sufficient to
  4.  
  5.     1. Edit definitions of BIN, LIB, and MAN at top of Makefile as
  6.        appropriate for your system (see comments in Makefile).
  7.        If you like descriptive names you might also want to set
  8.        RUNNABLE = scheme48 instead of s48. 
  9.  
  10.     2. Run make.  This creates scheme48vm (the virtual machine) from
  11.        the .c files.
  12.  
  13.        At this point you may want to test the system; do
  14.  
  15.         ./scheme48vm -i scheme48.image
  16.  
  17.        and type a few Scheme forms.
  18.  
  19.     3. Do "make install" to copy scheme48vm to LIB and heap image file
  20.        to BIN/s48.
  21.  
  22. A more thorough test of the system is to have it build a fresh heap
  23. image from sources.  If scheme48 is already installed, you can do
  24.  
  25.     make scheme48.image
  26.  
  27. If not, try this:
  28.  
  29.     ./scheme48vm -i scheme48.image
  30.         :load files.scm
  31.     (load-linker)
  32.     (link-system)
  33.     :exit
  34.     ./scheme48vm -i boot/system.image
  35.     :load misc/command.scm
  36.     (command-processor #f)
  37.     :disable
  38.     :dump test.image
  39.     :exit
  40.     :exit
  41.  
  42. Now you can do ./scheme48vm -i test.image, etc.
  43.  
  44. See below for information on customizing the default heap image.
  45.  
  46. -----
  47.  
  48. The scheme48 directory should contain the following subdirectories:
  49.  
  50.     rts            run-time system sources
  51.     vm             virtual machine sources
  52.     boot           code to produce image files (perhaps using a Scheme
  53.              other than Scheme48)
  54.     misc           useful hacks not included in the image by default
  55.              (inspector, pretty printer, disassembler,
  56.              bignums, etc.)
  57.  
  58. The scheme48 directory should contain the following files:
  59.  
  60.     README              
  61.     INSTALL        this file
  62.     NEWS        recent changes
  63.     TODO        list of things to do
  64.     user-guide.txt    user's guide
  65.     Makefile        Makefile for Unix
  66.     Makefile.filenames  included by Makefile, generated from files.scm
  67.     files.scm        lists of file names
  68.     scheme48.image    an image file containing the development environment
  69.     scheme48vm.c    most of the VM (generated by PreScheme compiler)
  70.     main.c        part of the VM
  71.     unix.c        part of the VM
  72.     error.c        part of the VM
  73.     scheme48.man        a Unix-style man page
  74.  
  75. The PreScheme compiler isn't included in this distribution because
  76. it's too rickety.  The vm directory should therefore be considered to
  77. be documentation, not source.
  78.  
  79. -----
  80.  
  81. If you edit files.scm, you'll want to do a "make Makefile.filenames"
  82. before you do any further "make"s.
  83.  
  84. -----
  85.  
  86. Performance
  87.  
  88. If you don't have a C compiler that optimizes as well or better than
  89. gcc does, then performance may suffer greatly.  Take a look at the
  90. automatically generated code in scheme48vm.c to find out why.  With a
  91. good register allocator, all those variables (including the virtual
  92. machine's register) get allocated to hardware registers, and it really
  93. flies.  Without one, performance could be pretty bad.
  94.  
  95. To improve overall performance even more, maybe about 6-10%, it is
  96. worthwhile to remove the range check from the interpreter's
  97. instruction dispatch.  To do this, use -S to get assembly code for
  98. scheme48vm.c, then find the instructions in scheme48.s corresponding
  99. to the big dispatch in perform_application():
  100.  
  101.  L34459: {
  102.   long b_113X;
  103.   b_113X = (*((unsigned char *) RScode_pointerS));
  104.   RScode_pointerS = (RScode_pointerS + 1L);
  105.   switch (b_113X) {
  106.     ... }
  107.  
  108. There will be one or two comparison instructions to see whether b_113X
  109. is in range; just remove them.  For the 68000 I use a "sed" script
  110.  
  111.     /cmpl #158,d0/ N
  112.     /cmpl #158,d0\n    jhi L/ d
  113.  
  114. but of course the constant may have to change when a new release comes
  115. along.
  116.  
  117. -----
  118.  
  119. Customization:
  120.  
  121. Configuring your scheme48.image: by default, the image consists of a
  122. core Scheme system (Revised^4 Scheme plus a very minimal
  123. read-eval-print loop) together with a standard set of "options"
  124. (command processor, debugging commands, inspector, disassembler,
  125. generic arithmetic).  The set of options is controlled by the
  126. definition of MOREFILES in the Makefile.  If you set this variable to
  127. the empty string, then "make scheme48.image" will create an Scheme
  128. system without any extras (like error recovery), and the image will be
  129. smaller.  The usual set is the EXTRAFILES defined in
  130. Makefile.filenames, which is generated from the extra-files list in
  131. files.scm.  The files are listed in approximate order of decreasing
  132. desirability; you'll probably want at least through
  133. misc/debuginfo.scm.
  134.  
  135. You can choose subsets of the standard features either by putting a
  136. modified version of EXTRAFILES from Makefile.filenames as the
  137. definition of MOREFILES in Makefile, or by editing the definition of
  138. extra-files in files.scm and doing "make Makefile.filenames".
  139. After this, do
  140.  
  141.        make scheme48.image
  142.  
  143. to rebuild the image.
  144.  
  145. -----
  146.  
  147. New versions of the run-time systems can be tested within existing
  148. systems:
  149.  
  150.     :load boot/primitives-for-debugging.scm
  151.     :load files.scm
  152.  
  153.     (for-each load-file rts-files)
  154.     (?start bare #f)
  155.  
  156. The advantage of this is that one can use a working system's debugger
  157. to track down errors that crop up during initialization.  Otherwise,
  158. if you simply write an image and try to start it directly from the VM,
  159. you're liable to get an uninformative message like "exception handler
  160. is not a closure".
  161.