多條語句的格式如下:
void QuickCopy(INT32U *addr, INT32U len, INT32U data)
{
__asm("STMFD SP!, { R4 - R11 }\n"
"ADD R1,
R0, R1\n"
"MOV R4, R2\n"
"MOV R5, R2\n"
"MOV R6, R2\n"
"MOV R7, R2\n"
"MOV R8, R2\n"
"MOV R9, R2\n"
"MOV R10, R2\n"
"MOV R11, R2\n"
"LOOP:nop\n"
"STMIA
R0!, { R4 - R11 }\n"
"CMP R1,
R0\n"
"BNE LOOP\n"
"LDMIA SP!, { R4 - R11 }\n"
"BX LR\n");
}
注意 多行之間使用 換行符 \n 隔開,最後一個括號要有逗號,否則編譯出錯;