[comp.lang.ada] MC68000 assembler to SPARC assebler cross translator??

maa@ssc-vax.UUCP (Mark A Allyn) (11/30/90)

I have the Verdix ada compiler for a Sun-4 (SPARC). I have a bunch of
ada software which was written on a Sun-3 (MC68000). Some of the modules
have assembler code (using the MACHINE_CODE package). 

When the ada code was developed on the Sun-3's, there was no problem since
the Sun-3 is a MC68000 machine.

The embedded system is still a MC68000 series machine. The embedded
MC68000 code has to stay in the software.

What I am looking for (either to buy or do) is come up with some means
to take the MC68000 assembler code that is embedded in the ada modules, 
and translate it to SPARC assembler code so that our Sun-4 based test-bed
can still run the ada software. 

Is there any way to creat another Machine Code package that would lay
on top of the SPARC machine code package to accept the MC68000 code and
translate it to SPARC machine code?

Or do I have to make a tool that would read in the ada code, strip out
and replace the MC68000 code and insert equivilent SPARC code and generate
a a new routine to compile for the Sun-4 based test-bed. (this would pose
some configuratijon control related problems)

Thanks for your help.

Mark A. Allyn  phone    206-477-2937 (day)  206-526-8852 (nite)

               US Mail  Boeing Company
                        Mail Stop 8X-03
			P.O. Box 3777
			Seattle Wa. 98124

               Email    uw-beaver!ssc-vax!ssc-bee!maa

	       Ham      WA1SEY
	       Radio

firth@sei.cmu.edu (Robert Firth) (12/01/90)

In article <3538@ssc-bee.ssc-vax.UUCP> maa@ssc-vax.UUCP (Mark A Allyn) writes:

>What I am looking for (either to buy or do) is come up with some means
>to take the MC68000 assembler code that is embedded in the ada modules, 
>and translate it to SPARC assembler code so that our Sun-4 based test-bed
>can still run the ada software. 

Don't do that.  Instead, go back to the specifications from which
the MC68000 Assembler components were written, and rewrite them in
SPARC Assembler from that specification.

If no such specification exists, or if the existing Assembler isn't
encapsulated into functional units, throw the program away with
considerable force.

rlk@telesoft.com (Bob Kitzberger @sation) (12/06/90)

In article <3538@ssc-bee.ssc-vax.UUCP>, maa@ssc-vax.UUCP (Mark A Allyn) writes:
>
> The embedded system is still a MC68000 series machine. The embedded
> MC68000 code has to stay in the software.
> 
> What I am looking for (either to buy or do) is come up with some means
> to take the MC68000 assembler code that is embedded in the ada modules, 
> and translate it to SPARC assembler code so that our Sun-4 based test-bed
> can still run the ada software. 

Do you really have to replace the 68000 machine code with corresponding 
Sun-4 source code?  If not (i.e. the Sun-4 is a test bed with simulated
I/O and sensors, etc) then the least painfull approach would be to 
rewrite the 68000 assembly in Ada.  If the original code was layered
correctly (i.e. machine-independent specifications and machine-dependent
bodies) you should be able to swap out the machine code insertions (MCI)
body and replace it with a pure Ada body.

I doubt that anyone has a translator from 68000 assembly to SPARC 
assembly, much less a translator from 68000 MCIs to SPARC MCIs.

	.Bob.
-- 
Bob Kitzberger               Internet : rlk@telesoft.com
TeleSoft                     uucp     : ...!ucsd.ucsd.edu!telesoft!rlk
5959 Cornerstone Court West, San Diego, CA  92121-9891  (619) 457-2700 x163
------------------------------------------------------------------------------
"Civilization rests on two things," said Hitzig; "the discovery that
fermentation produces alcohol, and voluntary ability to inhibit defecation."

				-- Robertson Davies, "The Rebel Angels"