944,058 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 2581
  • Assembly RSS
Aug 9th, 2007
0

Is there a portable assembly language?

Expand 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.

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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
PieSquared is offline Offline
2 posts
since Aug 2007
Aug 10th, 2007
0

Re: Is there a portable assembly language?

Click to Expand / Collapse  Quote originally posted by PieSquared ...
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.

Quote ...
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.
Reputation Points: 99
Solved Threads: 5
Junior Poster
Evenbit is offline Offline
140 posts
since Mar 2005
Aug 10th, 2007
0

Re: Is there a portable assembly language?

That answered my question, thanks!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
PieSquared is offline Offline
2 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: x86 Assembly in Mac OS X
Next Thread in Assembly Forum Timeline: Linux Assembly - how to output numbers instead of ASCII symbols





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC