19 Replies - 4933 Views - Last Post: 26 June 2011 - 02:15 PM
#1
Cross-Platform Assembly Language?
Posted 14 February 2011 - 01:50 PM
My question is, why does someone not make a cross-platform language that has a syntax similar to most assemblers? The reason I'm asking is, I enjoy programming in NASM (Windows) but I also have Linux (Ubuntu) and I hate having to change my code to assemble on each different platform. Programming in Assembly is fun for me because it is more challenging to accomplish simple tasks, and challenges are always fun, but the re writing of the code is a real turn off for me.
What do you guys think and is there a language like that, that I don't know about?
Replies To: Cross-Platform Assembly Language?
#2
Re: Cross-Platform Assembly Language?
Posted 14 February 2011 - 02:05 PM
#3
Re: Cross-Platform Assembly Language?
Posted 14 February 2011 - 02:09 PM
#4 Guest_Hornet*
Re: Cross-Platform Assembly Language?
Posted 15 February 2011 - 10:59 PM
The file format can be a difficult thing for OS's to agree on, so you have to determine a neutral file format that loads equally well on each OS. More specifically there's a reason most drivers/applications/etc. have seperate files for each operating system. You more so want to combine the two to create a neutral format, which isn't really declared yet (hoping for a new ISO cross-platform file format shortly).
Best of luck, just make sure to know the differences in operating systems.
#5
Re: Cross-Platform Assembly Language?
Posted 15 February 2011 - 11:11 PM
#6
Re: Cross-Platform Assembly Language?
Posted 19 March 2011 - 07:33 PM
If you want to port your Assembly code from one processor to another, just make a Google search for comparisons with the processor that you used and the one that you want your code to run.
#7
Re: Cross-Platform Assembly Language?
Posted 21 March 2011 - 10:23 AM
#8
Re: Cross-Platform Assembly Language?
Posted 31 May 2011 - 10:25 AM
#9
Re: Cross-Platform Assembly Language?
Posted 07 June 2011 - 05:01 PM
This post has been edited by Bellum: 07 June 2011 - 05:01 PM
#10
Re: Cross-Platform Assembly Language?
Posted 08 June 2011 - 07:15 PM
Quote
maybe an intermediate representation but not cross platform assembly.
#11
Re: Cross-Platform Assembly Language?
Posted 10 June 2011 - 07:27 PM
ishkabible, on 21 March 2011 - 01:23 PM, said:
Wouldn't a pre-proc be a HUGE undertaking? It would have to know what/how to convert the system calls/API's to each platforms version. Which ones changed and how. Basically map one API/system call to another right? I'd say leave well enough alone (Assembly), leave it up to the developer to write the code for each platform since they are all soooo different, or just use C/C++ or some other HLL. People are always wanting to change Asm and make it easier... Nah, simplicity of it is the best.
#12
Re: Cross-Platform Assembly Language?
Posted 15 June 2011 - 06:47 PM
something like this
#ifdef WIN32 import printf from msvcrt.dll #elseifdef LINUX import printf from runtimelib.so #end
i don't know that the runtime lib is for Linux but you get he idea
This post has been edited by ishkabible: 15 June 2011 - 06:53 PM
#13
Re: Cross-Platform Assembly Language?
Posted 15 June 2011 - 09:29 PM
#14
Re: Cross-Platform Assembly Language?
Posted 19 June 2011 - 03:30 PM
the pre-proc doesn't take care of calling convention but if you are writing cross platform functions you would write each function differently, in writing these functions you, the writer, would take care of the calling convention, not the assembler.
This post has been edited by ishkabible: 19 June 2011 - 03:33 PM
#15
Re: Cross-Platform Assembly Language?
Posted 19 June 2011 - 10:28 PM
|
|

New Topic/Question
Reply



MultiQuote











|