Looking for some advice relative to Pascal compilers.

I'm trying to get a sense for the degree of challenge I might be facing.
My goal is to get a version of turbo Pascal running on CP/M 8080.

Turns out that Turbo Pascal was written originally for Z80. Close but not
close enough!

Also turns out that a really good disassembly for Turbo Pascal version 1, 2
and 3 is available online.  A German guy did the work...wow.

And so, I am contemplating a rewrite to do two things:

1)  adapt the Turbo Pascal application to run on 8080.  This amounts to
rewriting code or otherwise working around all of the Z80 specific
opcodes.
2) adapt the Turbo Pascal compiler to generate 8080 code rather than Z80.

Given the starting point of a decent source code set, does this seem
achievable?
I get the feeling by looking at the code that this would be hard to do
without a good understanding of how the compiler actually works.  This is
because the compiler makes use of the Z80 registers fully, so to reduce the
functions to run on 8080 seems like a re architecting of the compiler.

I may be crazy...

Anyone have any suggestions?
Steve

Reply via email to