我目前正在學習彙編和C編程語言,我有幾個關於它的問題。 C代碼 int arith(int x, int y, int z) {
int t1 = x + y;
int t2 = z*48;
int t3 = t1 & 0xFFFF;
int t4 = t2 * t3;
return t4;
}
彙編代碼 movl 16(%ebp),%eax
我在彙編中寫入一個無符號長整型函數。 這是一個UTF-8字符。 我想檢查它是否是1個,2個,3個或4個字節的UTF-8字符。到目前爲止,我有這樣的:(我改變代碼不被字節序的影響,我認爲...) movl 12(%ebp),%eax # Move long u to %eax
movl %eax,buff # Move long u to buff
andl $128,buff # &-ma