home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / scheme / 2949 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  2.1 KB

  1. Path: sparky!uunet!mitech!gjc
  2. From: gjc@mitech.com (George J. Carrette)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: Mini-Scheme ?
  5. Message-ID: <4627@mitech.com>
  6. Date: 22 Jan 93 11:15:20 GMT
  7. References: <2415@sousa.tay.dec.com>
  8. Organization: Mitech Corporation, Concord MA
  9. Lines: 46
  10.  
  11. In article <2415@sousa.tay.dec.com>, secrist@msdsws.enet.dec.com (Strong datatypes for weak minds.) writes:
  12. > Anybody have a cut-down Scheme smaller than SIOD or SCM that would
  13. > fit, without overlaying, into 64K on a microprocessor ?
  14.  
  15. Good question. Why is SIOD so big? (By the way some archive sites have 
  16. siod 1.x which is smaller).
  17.  
  18. Well, SIOD.EXE for SIOD version 2.9 on a VMS machine is 33k bytes.
  19. Of course you have to add to that the amount of the C runtime library
  20. you would need. So you don't have much space left for objects. And
  21. you would probably want to store numbers as ints rather than doubles.
  22.  
  23. Here are some serious suggestions for cutting down the size of SIOD.
  24. With info taken from the LINK/MAP/FULL command under VMS. Good microprocessors
  25. with good compilers should be able to do almost as well in terms of
  26. code compactness as does VAX/VMS, should they not?
  27.  
  28. CHAR_STRING_CONSTANTS 3562.
  29.                 SIOD    21.
  30.                 SLIB  2682.
  31.                 SLIBA  721.
  32.                 TRACE  130.
  33.  
  34. Look at that. Almost four thousand bytes taken up by string constants.
  35. The solutions is obvious. Shorten all error messages to 3 character codes.
  36. Shorten all procedure names to maybe 6 characters or less.
  37.  
  38. Also, if you don't need arrays you can leave out SLIBA, if you don't want to
  39. be able to trace then leave out TRACE.
  40.  
  41.  $CODE    27484.
  42.   SLIB    16850.
  43.  SLIBA     8700.
  44.  TRACE     1428.
  45.  
  46. There is about 28K bytes of executable code. Again, you can leave out SLIBA
  47. and TRACE and get that down to about 17K bytes.
  48.  
  49. Tell me, am I assuming too much if I state that a good programmer who
  50. knows his microprocessor environment should be able to get that running
  51. on a 64k machine without any problem?
  52.  
  53. -gjc (who still does pdp-11 work in macro assembler and whitesmith C
  54.       from time to time for big $$$).
  55.  
  56.  
  57.