.text .global _start _start: mov r1,#1 mov r2,#2 cmp r1, r2 bgt branch1 add r3,r1,r2 b end branch1: sub r3,r1,r2 end: nop C 语言: if(a>b) a = a- b else a = a +b…
The format of basic inline assembly is very much straight forward. Its basic form is 基本汇编嵌入格式如下: asm("assembly code"); Example. asm("movl %ecx %eax"); /* moves the contents of ecx to eax */ __asm__("movb %bh (%eax)"); /*moves…