Re: Machine language and assembler translators?

glen herrmannsfeldt <gah@ugcs.caltech.edu>
22 Jul 2005 20:17:38 -0400

          From comp.compilers

Related articles
Machine language and assembler translators? jatinb@noida.hcltech.com (Jatin Bhateja, Noida) (2005-06-21)
Re: Machine language and assembler translators? vtsikoza@yahoo.com (2005-06-23)
Re: Machine language and assembler translators? DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-06-23)
Re: Machine language and assembler translators? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-06-23)
Re: Machine language and assembler translators? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-06-26)
Re: Machine language and assembler translators? vtsikoza@yahoo.com (2005-06-30)
Re: Machine language and assembler translators? jcrens@earthlink.net (Jack Crenshaw) (2005-07-17)
Re: Machine language and assembler translators? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-07-22)
Re: Machine language and assembler translators? toby@telegraphics.com.au (toby) (2005-07-22)
Re:Machine language and assembler translators? Robert.Thorpe@antenova.com (Robert Thorpe) (2005-07-22)
Re: Machine language and assembler translators? peter.jinks@manchester.ac.uk (Pete Jinks) (2005-07-22)
Re: Machine language and assembler translators? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-07-26)
Re: Machine language and assembler translators? Martin.Ward@durham.ac.uk (Martin Ward) (2005-07-26)
Re: Machine language and assembler translators? haberg@math.su.se (2005-07-28)
[3 later articles]
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 22 Jul 2005 20:17:38 -0400
Organization: Compilers Central
References: 05-06-103 05-07-076
Keywords: translator
Posted-Date: 22 Jul 2005 20:17:38 EDT

Jack Crenshaw wrote:


> I have built translators like this for machine/assembly language, with
> mixed results. Yes, it can be done. But it won't be efficient code.


(snip)


> Our first translator, back in the 8-bit days, involved translating 8080
> assembly language to 6800. That's probably the worst-case scenario for
> two reasons.


Recently there was a discussion in another newsgroup on 8080 to 8086
translation.


It seems that intel designed the 8086 to make assembly source
translation easy. Some 8086 instructions originally existed only for
that reason. Though it isn't necessary that one 8080 instruction
generate one 8086 instruction.


One interesting case is the instruction for loading the 8080 A
register into the flags register. The equivalent 8086 instruction
turned out to be very useful when the 8087 was designed. The 8087,
being a separate processor, needed a way to get the flags back to the
8086. They are stored into memory, loaded into AH, and then into the
flags register to be used for conditional tests.


Features of the pentium 4 can be traced back to the 8080, 30 years ago.


Then again, much of the instruction set of IBM's current
z/Architecture came from S/360 over 40 years ago.


-- glen


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.