scsh-0.5/vm
bdc f1dc00dcf6 a working scsh/static.scm and all the trimmings 1996-08-19 08:29:48 +00:00
..
README *** empty log message *** 1995-10-14 03:34:21 +00:00
arch.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
arith.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
data.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
defenum.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
define-primitive.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
disasm.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
env.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
external.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
gc.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
heap.scm a working scsh/static.scm and all the trimmings 1996-08-19 08:29:48 +00:00
interfaces.scm a working scsh/static.scm and all the trimmings 1996-08-19 08:29:48 +00:00
interp.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
macro-package-defs.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
memory.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
package-defs.scm a working scsh/static.scm and all the trimmings 1996-08-19 08:29:48 +00:00
prescheme.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
prim.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
ps-interface.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
ps-memory.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
ps-package-defs.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
ps-package.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
resume.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
s48-package-defs.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
stack.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
stob.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
struct.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
vm-utilities.scm *** empty log message *** 1995-10-14 03:34:21 +00:00
vmio.scm *** empty log message *** 1995-10-14 03:34:21 +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)))))))
)