News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Assembly portability

Started by anuradha, May 13, 2007, 08:04:15 AM

Previous topic - Next topic

anuradha

hi guys

question again
one of my friend talled me that assemby is not portable! is it true???
please help me
thanx :(

Ehtyar

In a word, no asm is not portable, but if you use the forum's search function you will most likely find out why and to what degree. There are also some limited workarounds (fasmlib for example).

Ehtyar.

Tedd

x86 Assembly will only work on x86 machines - that means 'standard' PCs only, which includes most Windows and Linux machines, and now Intel Macs -- which I think covers a pretty large percentage of machines.
So no, it's not portable to other architectures, but how many times have you even seen another type of machine?
The other 'portability' issue is that if you write code for windows then it's not going work on linux without some modification, which is due to using the window's api directly. But the situation is the same if you do the same thing in any other language, but for that reason it's not considered 'portable code.' The way you get around it is to have a library which provides the functions (the C runtime, for instance) and this library calls the OS functions for the OS it's on, then you can recompile your code for another OS and it will use the correct functions; you can actually do the same thing in assembler, it's just that there isn't currently a widely used 'standard' asm library (though you can easily use the C runtime) - which has much to do with the mentaility of the type of people who use asm and like to keep it close to the bone.
No snowflake in an avalanche feels responsible.

anuradha