scsh-0.5/vm
olin-shivers 838b110f01 Integrated srfi-13 (string lib)& srfi-14 (char-set lib)
- Ported sources to use these libs instead of older string & cset libs
- Wrote backwards-compatibility libs for now-deprecated procs in the
  scsh API
- Hacked the makefile/package/interfaces glue
Whew.
2001-03-11 03:47:00 +00:00
..
README Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
arch.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
arith.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
data.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
defenum.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
define-primitive.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
disasm.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
env.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
external.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
gc.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
heap.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
interfaces.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
interp.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
macro-package-defs.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
memory.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
package-defs.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
prescheme.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
prim.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
ps-interface.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
ps-memory.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
ps-package-defs.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
ps-package.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
resume.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
s48-package-defs.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
stack.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
stob.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
struct.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
vm-utilities.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00
vmio.scm Integrated srfi-13 (string lib)& srfi-14 (char-set lib) 2001-03-11 03:47:00 +00:00

README

; To load the VM into Scheme 48:
;   ,exec ,load README
;
; Then, for example,
;  (start-vm "~/s48/initial.image" 4000000 20000 '#())
; in the user package will start up the VM with the initial image.
; Be patient.  It will take a while.  Running the initial image as
; above on a SGI Indy (100 mhz R4000) it took over 70 minutes to
; get the - prompt.  scheme48.image starts up faster as it does little
; in the way of initialization.
;
; You will need to have a large heap to start with. -h 12000000 works
; for loading the initial image in version 0.35, smaller heaps may also
; work.

(config)
(load "ps-interface.scm")
(load "interfaces.scm")
(load "s48-package-defs.scm")
(load "package-defs.scm")
(load-package 'destructuring)  ; used in FOR-SYNTAX clause
(load-package 'bigbit)
(load-package 'interpreter)

(user)
(open 'pre-scheme)
(open 'interpreter)
(open 'memory-debug)

(run '
(define (start-vm image-file heap-size stack-size start-args)
  (reinitialize-memory)
  (let ((needed-space (+ (quotient (check-image-header image-file) 4)
	                 (required-init-space start-args (vector-length start-args)))))
    (cond ((< heap-size (* 16 needed-space))
           (display "Heap too small, want at least ")
           (display (* 16 needed-space))
           (newline))
          (else
           (let ((heap (allocate-memory heap-size))
                 (stack (allocate-memory stack-size)))
             (initialize-vm heap (quotient heap-size 4)
			    stack (quotient stack-size 4))
             (call-startup-procedure (read-image image-file 0)
                                     start-args
                                     (vector-length start-args)))))))
)