Bonjour à tous,
gcc -mno-cygwin -fno-asm -Wall -omyFirst.exe myFirst.c
myFirst.c:12: warning: ignoring asm-specifier for non-static local variable 'x'
myFirst.c:15: error: parse error before "MOV"J'ai essayé de défénir int x asm("x") = 50; ligne 12
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 /* Jean Bernard Emond X86 2003 page 334 */ /* Il a utilisé le Visual C++ */ #include <stdio.h> void main(void){ int x = 50; _asm { MOV EAX, x SHL EAX, 1 } printf("x = %d\n", x); }
Je lis le livre, je lis la doc et je ne trouve pas comment encadrer l'asm.
Cordialement,
JPD
Partager