Does inline assembly still have to follow microprocessor instruction set? Or is it automatic somehow?
Does inline assembly still have to follow microprocessor instruction set? Or is it automatic somehow?
Your question doesn't make any sense...
I'm not sure I understand your question, but, YES. The assembler converts each assembly language instruction to exactly one machine language instruction (microprocessor instruction set). The machine language is specific to the processor. (Although there is lots of compatibility between the various Intel x86 processors and between the x86 and AMD.) There is no way you can run Intel assembly on a Mac!
Last edited by DougDbug; 01-29-2003 at 06:34 PM.
I was just asking if inline assembly in C++ still has to follow the instruction set of the processor you are using. Doesn't each processor have its own instruction set?Your question doesn't make any sense...
It doesn't "follow" a instruction set, it uses an instruction set. And yes, different processors use different instruction sets... the inline asm you're using must match the native asm for the machine you're compiling on.
omg you can't be serious...lolIt doesn't "follow" a instruction set, it uses an instruction set
If it 'uses' a certain set of instructions it seems to me it 'follows' it. We 'use' the C++ standard therefore we 'follow' it, but w/e you answered my question so I'm happy
Note that it not only needs to "follow" the instruction set of the machine you are using, it must also "follow" the way your compiler treats inline assembly.
Exactly.....for example VC++ uses a stripped down version of the MASM syntax.....and then that supports the intel instruction set (IA32)Originally posted by Shiro
Note that it not only needs to "follow" the instruction set of the machine you are using, it must also "follow" the way your compiler treats inline assembly.
Not if you're running a compiler on top of an emulator.
Joe