inline asm portability



 DEVELOP > c-Plus-Plus > inline asm portability

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "Cristian Tota"
Date: 22 Nov 2003 04:31:46 PM
Object: inline asm portability
I am programming Visual C++ 6.0, using inline asm. MSDN says that code with
inline asm is not fully portable to other hardware platforms. What does this
reffer to? On what platforms isn't the code portable?
Cristian
.

User: "lilburne"

Title: Re: inline asm portability 22 Nov 2003 04:41:58 PM
Cristian Tota wrote:

I am programming Visual C++ 6.0, using inline asm. MSDN says that code with
inline asm is not fully portable to other hardware platforms. What does this
reffer to? On what platforms isn't the code portable?

Any platform that does not use the processor for which your
ASM is written for (MIPS, Motorola, SPARC, ..., etc) and
probably also any platform that is not windows too.
.

User: "Moonlit"

Title: Re: inline asm portability 22 Nov 2003 06:09:58 PM
Hi,
"Cristian Tota" <cristian.tota@vion-software.ro> wrote in message
news:bpok6j$5jm$1@ally.taide.net...

I am programming Visual C++ 6.0, using inline asm. MSDN says that code

with

inline asm is not fully portable to other hardware platforms. What does

this

reffer to? On what platforms isn't the code portable?

Any Processor that is not x86 and in addition to that, if you use assembly
instructions for newer processors it won't run on older ones and in addtion
to that using 32 bit segment code is likely not compatible with 16 bit
segment code.

Cristian




Regards, Ron AF Greve.
.

User: "Jack Klein"

Title: Re: inline asm portability 22 Nov 2003 10:51:55 PM
On Sun, 23 Nov 2003 00:31:46 +0200, "Cristian Tota"
<cristian.tota@vion-software.ro> wrote in comp.lang.c++:

I am programming Visual C++ 6.0, using inline asm. MSDN says that code with
inline asm is not fully portable to other hardware platforms. What does this
reffer to? On what platforms isn't the code portable?

Cristian

Not just hardware platforms, other compilers for the same target.
Microsoft's implementation of inline assembly language is not
conforming to the C++ language standard at all. And it won't work
with compilers from Borland, GNU, or Microtec, just to name a few,
that target the same 32-bit x86 processors.
So what MSDN should say is that all Visual C++ code with inline
assembly language is completely non-portable and locked into Visual
C++ forever, unless you are willing to translate it.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
.
User: "Pete Becker"

Title: Re: inline asm portability 23 Nov 2003 07:52:00 AM
Jack Klein wrote:


So what MSDN should say is that all Visual C++ code with inline
assembly language is completely non-portable and locked into Visual
C++ forever, unless you are willing to translate it.

As should every other implementation. They all vary on register usage,
stack frame layout, assembler syntax, access to named variables, etc.
--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
.



  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER