Curiosity question: Cross compilers for the Z-machine?

Hi all,

Just out of curiosity, I was wondering if anybody ever bothered to write a cross compiler of a “reputable” programming language (like “C” or Forth), targeting the Z-machine?

A quick search didn’t find anything. I find the idea intriguing of embedding a more complex piece of code written in such a language in an I6 story file or such. (It’s really just a curiosity question. I don’t see a real application for it.)



There is a Z-Machine back-end for the VBCC C compiler: see

The latter link has a patched version of the compiler that has been used to compile several variants of Colossal Cave / Adventure.