我想用Visual Studio中的內聯彙編在C中編寫程序。我正在讀取一個字符串,並且需要將變量中的小寫字符數和變量中的大寫字符數存儲起來。這是我到目前爲止:彙編語言 - 計數大小寫字母的數量
void FnlUpperLowerCount(char *inStr) {
int UpCount = -99;
int LowCount = -99;
_asm {
mov esi, inStr
mov al, [esi]
}
printf("The number of upper case letters : %d\n",UpCount);
printf("The number of lower case letters : %d\n",LowCount);
return ;
}
我真的不知道如何走得更遠。
一個空值終止序列我會先寫在C,從那麼它應該是相當簡單的將其轉換爲ASM。 – Devolus