Question

I am writing an interpreter in almost pure assembler. At the moment I am using a mix of NASM macros and m4 (when those are not powerful enough) to generate large clouds of code.

I remember seeing lisp used as a meta-programming engine for generating and building assembler. I can't recall exactly where though.

Could somebody give examples of projects which use lisp as an assembler meta-programming tool or explain which engines or libraries should be used for this purpose?

Était-ce utile?

La solution

As it happens, Paul Khuong has just written about a very similar topic. He uses sb-assem to emit code for a simple stack machine.

The machinery is SBCL specific, and you might have trouble figuring out how to use sb-assem, but it could be worth a look.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top