|
-
Dec 30th, 2004, 09:15 PM
#1
Thread Starter
Dazed Member
Assembly Portability
Taken from http://webster.cs.ucr.edu/ Which Assembler is the Best?
Portability may seem like an oxymoronic term when applied to assembly language. Obviously you're not going to write code with an x86 assembler that runs (natively) on some other processor. However, even on the same processor you can run into portablity problems. For example, if you write a generic x86 assembly subroutine (that is OS independent), can you assemble and use that same code across multiple OSes? For a large part, the question is answered by whether or not the assembler runs under different OSes. For example, a generic NASM subroutine will assemble and be usable under every operating system that NASM supports.
There is one more dimension to portability - can you write a complete application with an assembler and port that code from one OS to another with only a "recompile" of the source code? Currently, only one assembler supports this feature (HLA) through the use of the HLA Standard Library. This is an important consideration, for example, if you want to be able to create Windows and Linux applications in assembly with minimal effort. On the other hand, if you're working with a single operating system and absolutely have no plans to work with any other OS (now or in the future), then this issue may not be important to you.
After reading the following about asm and portability i have some questions.
I understand that it's not possible write code with an x86 assembler to run on a different processer with a different instruction set. Also according to what's above it's not possible to write asm code to run across multiple OS's without the assembler being supported for that specific OS. For instance NASM supports Windows, DOS, Linux, BSD, QNX but not OS/2. But then why it it possible to be able to run assembly code written in HLA on an OS that HLA does not support? I don't think this can be correct. HLA supports only Windows and Lunix. So i think the statement
There is one more dimension to portability - can you write a complete application with an assembler and port that code from one OS to another with only a "recompile" of the source code? Currently, only one assembler supports this feature (HLA) through the use of the HLA Standard Library.
only pertains to those OS's that HLA supports. Windows and Lunix
Last edited by Dilenger4; Jan 1st, 2005 at 11:49 PM.
Reason: Added in where quotes were taken from.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|