[Larceny-users] Larceny on bare silicon
Jesse Tov
tov at ccs.neu.edu
Mon Feb 5 16:03:14 EST 2007
Hi David,
I think what you want to do is possible (of course), but it would be
hard, mainly because the Larceny runtime is written in hosted C, not
freestanding C. Larceny depends on system and C library services for
memory allocation and IO. You could probably hack up an allocator that
would work directly in 32-bit real mode, but you'd still have a very
hard time getting IO going.
david rush wrote:
> So I have two questions. One is obvious: does anyone have a good idea
> of where to start before I crawl into a dead-end in the code?
I would start with trying to figure out how to get the services that the
runtime needs in a freestanding environment. FreeDOS might provide some
of what you need to get started.
> And can
> anyone elaborate on how to use the Assassin module as a stand-alone
> assembler?
Given an s-expression representation of ia32 assembly code, the
assembler returns a byte vector containing ia32 machine code that you
can jmp or call into. IAssassin uses the Sassy assembler, which can be
found with documentation here:
http://home.earthlink.net/~krautj/sassy/sassy.html
The version of Sassy distributed with Larceny is somewhat modified, but
this should give you an idea of how it works. I'm not sure what you
mean by "stand-alone assembler", but you could write a Scheme program
that would read Sassy assembly syntax from a file, assemble it, and then
output it to another file.
Good luck!
Jesse
More information about the Larceny-users
mailing list