scheme48.man 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .TH LS48 1
  2. .\" File scheme48.man: Manual page template for Scheme 48.
  3. .\" Replace LS48 with the name of your default image and LLIB with the
  4. .\" directory containing scheme48vm and default image.
  5. .SH NAME
  6. LS48 \- a Scheme interpreter
  7. .SH SYNOPSIS
  8. .B LS48
  9. [-i image] [-h heapsize] [-a argument]
  10. .SH DESCRIPTION
  11. .B LS48
  12. is an implementation of the Scheme programming language as described in
  13. the
  14. .I "Revised^5 Report on the Algorithmic Language Scheme."
  15. A runnable system requires two parts, an executable program that implements
  16. the Scheme 48 virtual machine, and an image that is used to initialize
  17. the store of the virtual machine.
  18. .B LS48
  19. is a shell script that starts the virtual machine with an image that runs
  20. in a Scheme command loop.
  21. .PP
  22. The
  23. .B LS48
  24. command loop reads Scheme expressions,
  25. evaluates them, and prints their results.
  26. It also executes commands, which are identified by an initial comma character.
  27. Type the command
  28. .I ,help
  29. to receive a list of available commands.
  30. .PP
  31. The
  32. .B \-h
  33. option causes
  34. .IR heapsize
  35. words to be allocated for both semispaces of the copying garbage
  36. collector. One word is four bytes. Cons cells are currently 3 words,
  37. so if you want to make sure you can allocate, say, a million cons
  38. cells, you should specify
  39. .B \-h
  40. 6000000 (actually a little more, to account for the initial heap
  41. image and breathing room).
  42. .PP
  43. The
  44. .I ,dump
  45. and
  46. .I ,build
  47. commands put heap images in files.
  48. The
  49. .B \-i
  50. option causes the initial heap image to be taken from file
  51. .IR image .
  52. The
  53. .B \-a
  54. option causes a list of strings to be passed as the argument
  55. to an image generated using the
  56. .I ,build
  57. command. The first argument to
  58. .I ,build
  59. is a procedure that is passed
  60. the arguments following
  61. .B \-a
  62. and which should return an integer (which is the
  63. return value of the Scheme 48 process).
  64. .PP
  65. .nf
  66. > ,build (lambda (a) (display a) (newline) 0) foo.image
  67. > ,exit
  68. $ LS48 -i foo.image -a mumble
  69. mumble
  70. $
  71. .PP
  72. .fi
  73. .SH FILES
  74. .TP 40
  75. .B LLIB/scheme48vm
  76. the virtual machine.
  77. .TP
  78. .B LLIB/LS48.image
  79. the default image.