Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Does ZXCOMP really convert Z80 machine code into 8086 machine code, or does it use some trick?

0
Posted

Does ZXCOMP really convert Z80 machine code into 8086 machine code, or does it use some trick?

0

Of course it’s a trick. If you have any knowledge about such things, you must know that real conversion is nearly impossible for many reasons (self-modifying code for example). So, ZXCOMP converts Z80 snapshots into a kind of P-code (more precisely, packed Z80 code) and links it with a run time module (which includes a P-coded ROM image too) which interprets it. This module is about 32K long for 48K snapshots and about 48K for 128K snapshots. P-code is usually about half size of full snapshot length. We must say that well-known “compiler” CLIPPER is not a real compiler too. It does a similar thing and nobody knows it. That’s why ZXCOMP look like a real compiler!

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.