From: thelifter
Subject: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <b295356a.0312171113.748833c5@posting.google.com>
Hello,

I'm looking for a Lisp high level assembler. The idea would be that
you can use Lisp macros and all the power of lisp to write your
assembly program.
After executing the Lisp high level assembler the output should be a
low level assembly program. After that you can use a normal low level
assembler to assemble it into machine code.

Has anything like this been done before? Can you give me any pointers,
references, etc...?

I'm sorry for taking your time, I'm sure you have got more important
things to do,
so I apologize in advance...

thelifter

From: Frank A. Adrian
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <pan.2003.12.17.20.07.45.126906@ancar.org>
On Wed, 17 Dec 2003 11:13:19 -0800, thelifter wrote:
> I'm looking for a Lisp high level assembler. The idea would be that
> you can use Lisp macros and all the power of lisp to write your
> assembly program.
> After executing the Lisp high level assembler the output should be a
> low level assembly program. After that you can use a normal low level
> assembler to assemble it into machine code.

Corman has a pretty good system for building x86 code into the Lisp image.
That might be a good starting point.  The main issue is not generating the
bytes (although for the x86 architecture that is a wee bit of a pain, if
you get my drift...), but in fooling about with things like relocation
records, extern decls, etc., for the binary file format you want to
generate. Most Lisps use their own FASL formats, so you're probably on
your own with building this type of file.

Another possibility would be to generate ASM source code symbolically and
then formatting the code to feed through a native assembler (Hey, it
worked for K&R!).  This gives you the power of Lisp without having to
handle all the grody bits of binary formats.

In any case, it sounds like an interesting project.  Let us know how it
turns out...

faa
From: Rayiner Hashem
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <a3995c0d.0312171541.5244598e@posting.google.com>
> I'm looking for a Lisp high level assembler. The idea would be that
> you can use Lisp macros and all the power of lisp to write your
> assembly program.
> After executing the Lisp high level assembler the output should be a
> low level assembly program. After that you can use a normal low level
> assembler to assemble it into machine code.
You can probably get gcl to output ASM, since it uses GCC as a back-end.
From: ·······@noshpam.lbl.government
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <Pine.LNX.4.44.0312171916530.16397-100000@thar.lbl.gov>
Check out the following book on-line:

"The Structure and Interpretation of Computer Programs"

Chapter 5 has some good discussion of a high-level assembler/compiler,
all done in Scheme ( which can be relatively easily converted into CL
if need be ).

~Tomer

On Dec 17, 2003 at 11:13am, thelifter wrote:

thelif >Date: 17 Dec 2003 11:13:19 -0800
thelif >From: thelifter <·········@gmx.net>
thelif >Newsgroups: comp.lang.lisp, comp.lang.scheme
thelif >Subject: Seeking: Lisp/Scheme Assembler
thelif >
thelif >Hello,
thelif >
thelif >I'm looking for a Lisp high level assembler. The idea would be that
thelif >you can use Lisp macros and all the power of lisp to write your
thelif >assembly program.
thelif >After executing the Lisp high level assembler the output should be a
thelif >low level assembly program. After that you can use a normal low level
thelif >assembler to assemble it into machine code.
thelif >
thelif >Has anything like this been done before? Can you give me any pointers,
thelif >references, etc...?
thelif >
thelif >I'm sorry for taking your time, I'm sure you have got more important
thelif >things to do,
thelif >so I apologize in advance...
thelif >
thelif >thelifter
thelif >
From: Pascal Bourguignon
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <87zndrhvf0.fsf@thalassa.informatimago.com>
·········@gmx.net (thelifter) writes:

> Hello,
> 
> I'm looking for a Lisp high level assembler. The idea would be that
> you can use Lisp macros and all the power of lisp to write your
> assembly program.
> After executing the Lisp high level assembler the output should be a
> low level assembly program. After that you can use a normal low level
> assembler to assemble it into machine code.
> 
> Has anything like this been done before? Can you give me any pointers,
> references, etc...?
> 
> I'm sorry for taking your time, I'm sure you have got more important
> things to do,
> so I apologize in advance...
> 
> thelifter

Overflying  the sources  of  openmcl,  I got  the  impression that  it
included Lisp assemblers for PowerPC and SPARC. openmcl.clozure.com.



I've  started  to read  the  ARM specifications  and  plan  to have  a
rudimentary Lisp assembler for ARM (and for 680x0 too), but don't hold
your breath on it :-(

-- 
__Pascal_Bourguignon__                              .  *   * . * .* .
http://www.informatimago.com/                        .   *   .   .*
There is no worse tyranny than to force             * .  . /\  (   . *
a man to pay for what he does not                    . .  / .\   . * .
want merely because you think it                    .*.  / *  \  . .
would be good for him. -- Robert Heinlein             . /*   o \     .
http://www.theadvocates.org/                        *   '''||'''   .
SCO Spam-magnet: ··········@sco.com                 ******************
From: Jeff Greif
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <G8aEb.580606$Tr4.1557040@attbi_s03>
I think that some CommonLisp compilers produced a high-level Lisp-assembler
language as an intermediate representation.  One *might* have been the Lucid
Lisp (later known as Liquid Lisp, I think).  The makers of LispWorks may
still be the owners of Lucid/Liquid Lisp.

Jeff

"thelifter" <·········@gmx.net> wrote in message
·································@posting.google.com...
> Hello,
>
> I'm looking for a Lisp high level assembler. The idea would be that
> you can use Lisp macros and all the power of lisp to write your
> assembly program.
> After executing the Lisp high level assembler the output should be a
> low level assembly program. After that you can use a normal low level
> assembler to assemble it into machine code.
>
> Has anything like this been done before? Can you give me any pointers,
From: Fred Gilham
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <u7vfoe2kfn.fsf@snapdragon.csl.sri.com>
Jeff Greif wrote:
> I think that some CommonLisp compilers produced a high-level
> Lisp-assembler language as an intermediate representation.  One
> *might* have been the Lucid Lisp (later known as Liquid Lisp, I
> think).  The makers of LispWorks may still be the owners of
> Lucid/Liquid Lisp.

I'm pretty sure CMUCL did this at one point.  You can see the
fossilized remnants of the scheme in the CMUCL source tree under the
assembler directory.

-- 
Fred Gilham                                   ······@csl.sri.com
Lisp has jokingly been called "the most intelligent way to misuse a
computer". I think that description is a great compliment because it
transmits the full flavor of liberation: it has assisted a number of
our most gifted fellow humans in thinking previously impossible
thoughts.   E. Dijkstra
From: Rahul Jain
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <87wu8tskux.fsf@nyct.net>
Fred Gilham <······@snapdragon.csl.sri.com> writes:

> Jeff Greif wrote:
>> I think that some CommonLisp compilers produced a high-level
>> Lisp-assembler language as an intermediate representation.  One
>> *might* have been the Lucid Lisp (later known as Liquid Lisp, I
>> think).  The makers of LispWorks may still be the owners of
>> Lucid/Liquid Lisp.
>
> I'm pretty sure CMUCL did this at one point.  You can see the
> fossilized remnants of the scheme in the CMUCL source tree under the
> assembler directory.

It still does, at least for VOPs...

-- 
Rahul Jain
·····@nyct.net
Professional Software Developer, Amateur Quantum Mechanicist
From: Ivan Boldyrev
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <sgcdb1xca9.ln2@ibhome.cgitftp.uiggm.nsc.ru>
On 8596 day of my life Jeff Greif wrote:
> I think that some CommonLisp compilers produced a high-level Lisp-assembler
> language as an intermediate representation.  One *might* have been the Lucid
> Lisp (later known as Liquid Lisp, I think).  The makers of LispWorks may
> still be the owners of Lucid/Liquid Lisp.

At least, they still sell Liquid Lisp. :)

-- 
Ivan Boldyrev

                                        | recursion, n:
                                        |       See recursion
From: Hannu Koivisto
Subject: Re: Seeking: Lisp/Scheme Assembler
Date: 
Message-ID: <87llp5ae7g.fsf@lynx.tre-1.ionific.com>
·········@gmx.net (thelifter) writes:

> I'm looking for a Lisp high level assembler. The idea would be that
> you can use Lisp macros and all the power of lisp to write your
> assembly program.
> After executing the Lisp high level assembler the output should be a
> low level assembly program. After that you can use a normal low level
> assembler to assemble it into machine code.
>
> Has anything like this been done before? Can you give me any pointers,
> references, etc...?

COMFY-65: <http://home.pipeline.com/~hbaker1/sigplannotices/column04.tex.gz>
It compiles directly to machine code, but is otherwise exactly what
you are looking for as far as I can see.

-- 
Hannu