Subject: Re: Examples of (Common) Lisp/Scheme code which interfaces with the bare metal ?
From: (Rob Warnock)
Date: Thu, 04 Jun 2009 21:13:33 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
jurgen_defurne  <> wrote:
| As a hobby project, I am designing a 32-bit processor which I am
| simulating using Common Lisp (mostly based upon SIMH ideas). Currently
| I have a working simulation of a simple load/store instruction set, an
| assembler and some simple test programs.


| However, I want to go further. Last fall I implemented a simple Lisp
| interpreter in Perl and now I want to implement a simple Lisp
| interpreter on my simulated machine. However, I would like to
| start with a Lisp description of all my necessary code and in order to
| do that I would like to know if there are somewhere examples and
| implementations of (Common) Lisp/Scheme code which
| deal with structures in the C sense of the word (contiguous blocks of
| memory with fields which are just offsets in the block) ?

Please say a little more about exactly what you mean by "deal with
structures". Almost all Lisp/Scheme compilers/interpreters have some
sort of simple "deref+offset" operators down at the bottom of their
implementations. E.g., DEFSTRUCT accessors might be defined as closures
over a more primitive operator such as (an internal version of) ELT,

Also, in terms of generating code for a "raw" machine, make sure you've
read the chapters on compilation in both SICP <>
and L.i.S.P. <> [and maybe
even the bits on compiling in PAIP <>].


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607