#include <iostream>
using namespace std;
int main()
{
char s1[] = "Hola queridos amigos";
char tmp;
asm
(
"push edi"
"push esi"
"mov edx,lenS"
"or edx,edx"
"jz _end"
"lea eax,s1"
"mov esi,eax"
"add eax,edx"
"dec eax"
"mov edi,eax"
"_next:"
"mov al, [esi]"
"mov ah, [edi]"
"mov [edi], al"
"mov [esi], ah"
"inc esi"
"dec edi"
"cmp edi,esi"
"jz _end"
"mov eax,edi"
"inc eax"
"cmp eax,esi"
"jz _end"
"jmp _next"
"_end:"
"pop esi"
"pop edi"
);
std::cout<<s1<<std::endl;
return 0;
}
Error: junk `esimov edx' after expression
Error: too many memory references for `push'
А в чем заключаются эти ошибки, я не могу понять
"push edi"
"push esi"
"mov edx,lenS"
...
как их исправить