1 | mov %eax, %ebx, transfers the contents of eax to ebx. |
1 2 3 | movb %al, %bl -- Byte move movw %ax, %bx -- Word move movl %eax, %ebx -- Longword move |
1 | movl $0xffff, %eax -- will move the value of 0xffff into eax register. |
1 2 3 | movb (%esi), %al -- will transfer the byte in the memory pointed by esi into al register |
1 2 3 4 5 6 7 8 9 10 | asm ( assembler template : output operands (optional) : input operands (optional) : list of clobbered registers (optional) ); |
1 2 3 4 5 6 7 8 9 | { int a=10, b; asm ("movl %1, %%eax; movl %%eax, %0;" :"=r"(b) /* output */ :"r"(a) /* input */ :"%eax"); /* clobbered register */ } |
1 | asm ("movl %%cr3, %0\n" :"=r"(cr3val)); |
1 2 3 4 5 6 | a %eax b %ebx c %ecx d %edx S %esi D %edi |
1 | ("sidt %0\n" : :"m"(loc)); |
1 | asm ("incl %0" :"=a"(var):"0"(var)); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |