[英]How can I convert this C code into Assembly IA32?
I would like to know if there is a quick way to convert this code into Assembly from IA32 please! 我想知道是否有一种快速的方法可以将此代码从IA32转换为Assembly。
void function1(char trs[], int let[26]) {
int i;
int ind;
int x = trs[i];
for(i=0; trs[i]!='\0'; i++) {
if (x>='a' && x<='z')
ind = x - 'a';
let[ind]++;
if (x>='A' && x<='Z')
ind=x - 'A';
let[ind]++;
}
}
Assuming you're using gcc
, you can just use gcc -S main.c -o main.s
. 假设您正在使用gcc
,则可以只使用gcc -S main.c -o main.s
This outputs assembly code (GAS flavour) far faster than any human can :) 这样输出的汇编代码(GAS味道)远比任何人都快:)
But seriously, if you wanted to convert this by hand, I would recommend converting your code into plain English, and then into Assembly. 但认真的说,如果您想手动转换此代码,我建议您将代码转换为普通英语,然后转换为汇编语言。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.