Hi, this should normally compile as at&t asm, but devc wont accept it:
int a = 10;
asm(" movw %%ax, %0" " : :"g" (a));
it means like loading the value of a into ax
Shouldn't it be:
movw %0, %%ax"
I believe with GAS syntax you must reverce the usual Intel structure.
As a side, does anyone know a link to really straightforward instructions on the GAS format?
I looked at the GNU.ORG stuff but it was really tough going!!!
BlakJak :]
Log in to post a comment.
Hi, this should normally compile as at&t asm, but devc wont accept it:
int a = 10;
asm("
movw %%ax, %0"
"
:
:"g" (a));
it means like loading the value of a into ax
Shouldn't it be:
movw %0, %%ax"
I believe with GAS syntax you must reverce the usual Intel structure.
As a side, does anyone know a link to really straightforward instructions on the GAS format?
I looked at the GNU.ORG stuff but it was really tough going!!!
BlakJak :]