Main Page | Report Page

 

 

  Computers Forum Index » Computer Languages (Scheme) » Scheme for embedded systems?...

Author Message
Philipp Klaus Krause...
Posted: Mon Jan 18, 2010 6:30 pm
 
Is it possible to use Scheme to program for embedded systems?

I'd like to write programs for a Z80-based system, which has 1K RAM, 32
K ROM.
With sdcc a C compiler, which supports most of the C standard, is
available; there is no support for double or 64-bit integers and struct
support is limited though.

Is there a Scheme-to-C compiler you would recommend? The output should
be small and efficient, if some library is needed it should be small as
well, RAM usage of the output should be minimal. It should be possible
to call C functions from Scheme and vice versa.

Philipp
 
Jeffrey Mark Siskind...
Posted: Mon Jan 18, 2010 7:57 pm
 
See the work on BIT and PICOBIT by Marc Feeley, Danny Dube, and
Vincent St-Amour.

http://www.iro.umontreal.ca/~feeley/papers/ll3.pdf
http://www.iro.umontreal.ca/~feeley/papers/StAmourFeeleyIFL09.pdf

Also see the work on Hot Dog Scheme by Ian Horswill and his students.
 
Aaron W. Hsu...
Posted: Mon Jan 18, 2010 11:42 pm
 
On Mon, 18 Jan 2010 08:30:42 -0500, Philipp Klaus Krause <pkk at (no spam) spth.de>
wrote:

Quote:
Is there a Scheme-to-C compiler you would recommend? The output should
be small and efficient, if some library is needed it should be small as
well, RAM usage of the output should be minimal. It should be possible
to call C functions from Scheme and vice versa.

I haven't seen a Scheme system that runs with that small of a space, but I
could be very wrong. Smile In fact, I think that you could probably do it,
and maybe even write your own fairly easily if the system is really
limited. I'd be interested to hear from others what sorts of compilers
might work for this system. There are some small interpreters as well, but
I haven't heard of any that have that small a footprint. From my
understanding, Chibi Scheme was the smallest I have seen, but it seems
larger than that.

Aaron W. Hsu

--
A professor is one who talks in someone else's sleep.
 
Thomas Munro...
Posted: Tue Jan 19, 2010 12:58 pm
 
On Jan 18, 6:42 pm, "Aaron W. Hsu" <arcf... at (no spam) sacrideo.us> wrote:
Quote:
...
I haven't seen a Scheme system that runs with that small of a space, but I  
could be very wrong. Smile In fact, I think that you could probably do it,  
and maybe even write your own fairly easily if the system is really  
limited. I'd be interested to hear from others what sorts of compilers  
might work for this system. There are some small interpreters as well, but  

There have been a number of interpreters and at least one compiler for
Lisps of various dialects on Z80/8080 and 6502 systems. In my
googling I have found the following:

VLisp by Jerome Chailloux (1979): http://www.softwarepreservation.org/projects/LISP/index.html#VLISP_

Le Lisp 80 by Jerome Chailloux (1983):
http://www.softwarepreservation.org/projects/LISP/index.html#Le_Lisp_

Toolworks Lisp80 by Walt Bilofsky: http://www.retroarchive.org/cpm/lang/lang.htm

InterLisp/65 for the Atari machines: http://atariwiki.strotmann.de/xwiki/bin/view/APG/InterLisp65

Acornsoft Lisp: http://www.bbcmicro.net/old-8bs/elecgame/list_cassette.htm

SpecLisp for the ZX-Spectrum: http://www.worldofspectrum.org/infoseekid.cgi?id=0008718

P-Lisp for the Apple II: http://nostoc.stanford.edu/jeff/llisp/index.html

Lisp-64 for the Commodore 64: http://www.c64-online.com/phpbb/downloads.php?view=detail&df_id=163

Microlisp for the Commodore 64: http://cbm.csbruce.com/~csbruce/cbm/transactor/disks/disk-23.html

Z80 Scheme, an interpreter and a compiler by Kent Dybvig, mentioned in
http://www.cs.indiana.edu/~dyb/pubs/hocs.pdf

I'm sure there are plenty more. I have found a couple of modern 8 bit
Scheme/Lisp projects in unknown state of completion:

TI-Calculator Scheme (Z80): http://svn.revsoft.org/scheme/

6502 Lisp: http://www.hugbox.org/lisp8/lisp-6502.asm

I have my own toy Z80 Scheme interpreter which runs on the ZX
Spectrum, but it's a long way from being useful... perhaps by
mentioning it on here I will embarrass myself into completing it (look
out for it in Summer 2042). Designing memory representations, type
tagging and garbage collection etc on such tiny systems is a lot of
fun.

Interestingly, the Dybvig paper above says that they couldn't make
their compiler produce code that ran faster than their interpreter so
they abandoned it.

Thomas
 
Ron Garret...
Posted: Wed Jan 20, 2010 3:43 am
 
In article
<0c48b487-b4e5-4d7d-a77d-c804007e5fed at (no spam) s31g2000yqs.googlegroups.com>,
Thomas Munro <thomas.munro at (no spam) gmail.com> wrote:

Quote:

ALso http://www.flownet.com/ron/plisp.html

rg
 
 
Page 1 of 1    
All times are GMT
The time now is Wed May 16, 2012 10:23 pm