On Jan 17, 2023, at 04:52, Peter Coghlan via cctalk
<cctalk(a)classiccmp.org>
How about translating code from Z80 which has several registers to 6502 with
rather fewer? That would seem to need some more intelligent thinking on
how to simulate the unavailable registers without causing additional
difficulties.
Regards,
Peter Coghlan.
That would be not much different than compiling code (say, C) for the 6502. One need not
“simulate” anything. One could use the stack plus perhaps a bit of so-called heap
storage to manage register allocation, along with translating ( perhaps with optimization
) the instruction stream. Dealing with changed 8080 stack offsets from the original code
would be tricky.