|Mixing mmix and C code? email@example.com (Luciano) (2006-10-10)|
|Re: Mixing mmix and C code? firstname.lastname@example.org (Tommy Thorn) (2006-10-11)|
|Re: Mixing mmix and C code? email@example.com (Luciano) (2006-10-16)|
|Re: Mixing mmix and C code? firstname.lastname@example.org (Tommy Thorn) (2006-10-17)|
|Re: Mixing mmix and C code? email@example.com (Daniel C. Wang) (2006-10-17)|
|Re: Mixing mmix and C code? firstname.lastname@example.org (glen herrmannsfeldt) (2006-10-17)|
|Re: Mixing mmix and C code? email@example.com (Tommy Thorn) (2006-10-19)|
|From:||"Tommy Thorn" <firstname.lastname@example.org>|
|Date:||11 Oct 2006 23:21:51 -0400|
|Posted-Date:||11 Oct 2006 23:21:51 EDT|
> I am intersted in the mmix language by Donald Knuth. Is there a way
> to call to routine that I write in mmix from C, or is there an mmix to
> C converter?
> [I see that Knuth has an mmix interpreter written in C. Perhaps you
> can modify that to make it a callable library. -John]
Luciano, the question is a bit unclear. First, MMIX is strictly
speaking not a language, but a microprocessor architeture. Most
likely, you do not want to be writing in the binary code that is the
machine code language of MMIX.
If you're using the mmix-gcc and wish to mix assembly to C code, then
that's completely standard. You can either inline assembly with the
usual asm() syntax, eg. asm("ADDI $2,$5,8") or write an complete
assembly file and with with that.
If you wish to instrument the simulator (as John implies), then it is
not that hard at all to modify the MMIX simulator. However, if you need
access to all of MMIX (notably the priviledge instructions) then you
need to modify the pipeline simulator MMMIX, which is a non-trivial
Return to the
Search the comp.compilers archives again.