Is there a portable assembly language?

Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2007
Posts: 2
Reputation: PieSquared is an unknown quantity at this point 
Solved Threads: 0
PieSquared PieSquared is offline Offline
Newbie Poster

Is there a portable assembly language?

 
0
  #1
Aug 9th, 2007
I'm writing a compiler, but if I want it to be on more than one platform, it seems I have to learn every assembly language for the different platforms. I've seen a number of languages which try to be 'portable assembly languages' such as Linolium and C--, but they all seem to be incomplete or abandoned.

Is there any such language which can be used as a compiler back-end language?

If this is a stupid question for any reason, please say so, as I am new to writing compilers/interpreters.

--PieSquared
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 130
Reputation: Evenbit is on a distinguished road 
Solved Threads: 4
Evenbit's Avatar
Evenbit Evenbit is offline Offline
Junior Poster

Re: Is there a portable assembly language?

 
0
  #2
Aug 10th, 2007
Originally Posted by PieSquared View Post
I'm writing a compiler, but if I want it to be on more than one platform, it seems I have to learn every assembly language for the different platforms. I've seen a number of languages which try to be 'portable assembly languages' such as Linolium and C--, but they all seem to be incomplete or abandoned.
Yes, people try these ideas but they tend to go nowhere because this approach works against itself. Assembly is the language that the CPU understands ... therefore it is a highly hardware dependent language and this is where all the benefits come from -- take away this "close bond with the hardware" and you will loose all of the benefits. This is why C is still widely used today -- it is as close as one can get to ASM and still be portable.

Is there any such language which can be used as a compiler back-end language?
Actually, the Java byte-code runs on a virtual machine (VM) and so does the MSIL for .NET (and mono) -- of course, this is managed code (runs in a "sandbox") but either of these could function as a 'portable assembly-like language' to be used as a compiler back-end.

Nathan.
while (CPU is present) {some assembly required}
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 2
Reputation: PieSquared is an unknown quantity at this point 
Solved Threads: 0
PieSquared PieSquared is offline Offline
Newbie Poster

Re: Is there a portable assembly language?

 
0
  #3
Aug 10th, 2007
That answered my question, thanks!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Assembly
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC