Wayback 20110824051900
www.stripedgazelle.org/joey/dream.html
This commit is contained in:
parent
16714e8ab9
commit
2aae3d999f
|
@ -1,6 +1,11 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>The 'dream' Scheme Interpreter</title>
|
||||
<div style="color:black; font-family:sans-serif;">
|
||||
<style type="text/css">
|
||||
body { background-color:black; color:white; font-family:sans-serif; }
|
||||
a { text-decoration:underline; }
|
||||
</style>
|
||||
</head>
|
||||
<h1>The 'dream' Scheme Interpreter</h1>
|
||||
by David Joseph Stith
|
||||
<hr>
|
||||
|
@ -12,32 +17,24 @@ The interpreter is properly tail recursive and passes all applicable tests from
|
|||
<br />
|
||||
Rational arithmetic with 32 bit magnitude numerator and denominator, or up to 262112 bit magnitude if the GMP library is available, is supported (with sign stored separately), but no Real or Complex numbers (these currently are in the works).
|
||||
<hr>
|
||||
Dream is compiled using an x86 <a href="assembler.html">assembler</a>
|
||||
I have written in Scheme, with a syntax very similar to GAS.
|
||||
Dream is compiled using an x86 assembler written in Scheme, with a syntax very similar to GAS.
|
||||
<br />
|
||||
Consequently Dream compiles itself. :-)
|
||||
<hr>
|
||||
<b>Download latest version for Linux on x86:</b>
|
||||
<a href="/cgi-bin/wiki_joey/dream20100316.tar.gz">dream20100316.tar.gz</a>
|
||||
<br />
|
||||
This is an ELF executable that may use Linux syscalls only or, by default, is dynamically linked with <b>ld-linux.so.2</b> in order to provide access in scheme to dlopen, dlclose, and dlsym.
|
||||
<br />
|
||||
In particular, if <b>libgmp.so.3</b> is available then it is dynamically loaded in order to implement multiple precision integer arithmetic.
|
||||
<hr>
|
||||
<b>Download latest version for Windows on x86:</b>
|
||||
<a href="/cgi-bin/wiki_joey/dream20100316.zip">dream20100316.zip</a>
|
||||
<br />
|
||||
Since dream.exe expects to find 'c:/dream/bootstrap.scm', unzip to your C: drive, or else place a copy of 'dream/bootstrap.scm' there.
|
||||
<br />
|
||||
This is a PE executable linked with <b>KERNEL.DLL</b>, giving access in scheme to call DLL functions via LoadLibraryA and GetProcAddress (known by 'dlopen' and 'dlsym' in the dream).
|
||||
<br />
|
||||
In particular, if <b>libgmp-3.dll</b> is available then it is automatically loaded in order to implement multiple precision integer arithmetic.
|
||||
<hr>
|
||||
Note that the sources for both versions above are the same.
|
||||
The boolean 'WINDOWS' in make.scm has simply been set #f or #t respectively, and then 'dream make.scm' was used to compile.
|
||||
<b>Download latest version for Linux or Windows on x86:</b>
|
||||
<a href="/cgi-bin/wiki_joey/dream20110707.tar.gz">dream20110707.tar.gz</a>
|
||||
<dt>Linux:</dt>
|
||||
<dd>'dream' is an ELF executable that may use Linux syscalls only or, by default, is dynamically linked with <b>ld-linux.so.2</b> in order to provide access in scheme to dlopen, dlclose, and dlsym.</dd>
|
||||
<dd>In particular, if <b>libgmp.so.3</b> is available then it is dynamically loaded in order to implement multiple precision integer arithmetic.</dd>
|
||||
<dt>Windows:</dt>
|
||||
<dd>'dream.exe' is a PE executable linked with <b>KERNEL.DLL</b>, giving access in scheme to call DLL functions via LoadLibraryA and GetProcAddress (known by 'dlopen' and 'dlsym' in the dream).</dd>
|
||||
<dd>In particular, if <b>libgmp-3.dll</b> is available then it is automatically loaded in order to implement multiple precision integer arithmetic.</dd>
|
||||
<dd>dream.exe expects to find 'c:/dream/bootstrap.scm'.
|
||||
So unzip to your C: drive, or else place a copy of 'bootstrap.scm' there.</dd>
|
||||
<hr>
|
||||
<b>Check out my DreamOS based on the Dream Scheme
|
||||
Interpreter as a bootable floppy disk:</b> <a href="dreamos.html">dreamos</a>
|
||||
|
||||
:-)
|
||||
<hr>
|
||||
<h2>Notes on the Design</h2>
|
||||
|
@ -141,9 +138,7 @@ Consequently when call-with-current-continuation is invoked, this native stack i
|
|||
The registers denoted by EXP, ENV, UNEV, ARGL, VAL, and FREE in <a href="http://mitpress.mit.edu/sicp/full-text/book/book.html">Structure and Interpretation of Computer Programs</a> are implemented by the machine registers EDX, EBP, ESI, EDI, EAX, and EBX respectively.
|
||||
The registers EXP, ENV, UNEV, ARGL, and VAL must point to a valid scheme object (or be zero) when the garbage collector is invoked.
|
||||
Likewise, the garbage collector registers OLD, NEW, and SCAN are implemented by the machine registers ESI, EDI, and EAX respectively.
|
||||
</p>
|
||||
<hr>
|
||||
<a href="home.html">home</a>
|
||||
|
||||
</div>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue