Re: [Dev-C++] Problem with __asm statement
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2007-02-17 00:42:04
|
Because asm isn't examply part of the c++ standard. The use of embedded assembler is a compiler-specific extension, and different architectures and/or compilers can use different formats. VC uses the Intel standard for writing x86 assembly instructions. gcc uses the AT&T syntax. See http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html#s3 Different compilers also have different calling conventions, so even if the assembly code is modified to the correct dialect, you can't be sure that the two compilers uses the same registers or parameter passing conventions. Did you request him to write in assembler? If you didn't specifically requested it, then the delivery was not according to agreement. If you did request an assembler solution, then you should have specified the target, i.e. processor, OS, compiler, ... /pwm On Sat, 17 Feb 2007, Philip Bennefall wrote: > Hello, > > A few days go I hired a person from Rent a coder to write me a couple of C++ functions. he was using Vc++ to develop his code as far as I know. Now, MinGW has problems compiling his code because of the fact that he is using assembly. One part of the code looks like: > __asm { > mov ebx, dwCardID > add ebx, i > xor eax,eax > mov al, bTmp > mov byte ptr [ebx],al > } > But it completely refuses to compile it. Can anyone tell me why? > > Thanks in advance. > > Regards > Philip Bennefall |