从c转换为asm [英] Translate from c to asm

查看:493
本文介绍了从c转换为asm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!


任何人都可以提供一些资源,或者可能是一个算法/提示

从c转换为汇编程序(任意汇编程序,但是LC2是首选。

c例程本身很小,很简单)。我在4天内参加了一个

计算机科学课程的考试,我根本无法控制这个

主题。


任何帮助都将受到高度赞赏。

问候,


Ronny Mandal

Hello!

Can anyone please provide me some resources, or maybe an algorithm / tip on
translating from c to assembler (arbitrary assembler, but LC2 is preferred.
The c-routines themselves are small, trivial ones). I hvae an exam in a
computer science course in 4 days, and I simply cannot get a grip on this
topic.

Any help would be highly appreciated.
Regards,

Ronny Mandal

推荐答案

尝试GCC'的-S参数:


gcc -S test.c


这应创建一个名为的汇编版本test.s.


Ronny Mandal写道:
Try GCC''s -S argument:

gcc -S test.c

This should create an assembly version called test.s.

Ronny Mandal wrote:
你好!

任何人都可以请给我一些资源,或者算法/ tip on
从c转换为汇编程序(任意汇编程序,但LC2是首选。
c例程本身是小的,无关紧要的)。我在4天内参加了计算机科学课程的考试,我根本无法掌握这个主题。

任何帮助都会受到高度赞赏。

问候,

Ronny Mandal
Hello!

Can anyone please provide me some resources, or maybe an algorithm / tip on
translating from c to assembler (arbitrary assembler, but LC2 is preferred.
The c-routines themselves are small, trivial ones). I hvae an exam in a
computer science course in 4 days, and I simply cannot get a grip on this
topic.

Any help would be highly appreciated.
Regards,

Ronny Mandal



Ronny Mandal写道:
Ronny Mandal wrote:
您好!

任何人都可以为我提供一些资源,或者可能是一个算法/提示从 c-routines本身是小的,微不足道的)。我在4天内参加了计算机科学课程的考试,我根本无法掌握这个主题。

任何帮助都会受到高度赞赏。

问候,

Ronny Mandal
Hello!

Can anyone please provide me some resources, or maybe an algorithm / tip on
translating from c to assembler (arbitrary assembler, but LC2 is preferred.
The c-routines themselves are small, trivial ones). I hvae an exam in a
computer science course in 4 days, and I simply cannot get a grip on this
topic.

Any help would be highly appreciated.
Regards,

Ronny Mandal




查看编译器文档。许多人都可以选择创建

汇编语言列表。另请检查调试器文档。

某些调试器也具有此功能。你可能想看看他们是否已经交织了。功能,即打印C语言

语句,然后是汇编语言。这将是非常有用的,因为你可以看到为每个C语句创建了汇编语言




-

Thomas Matthews


C ++新闻组欢迎辞:
http://www.slack.net/~shiva/welcome.txt

C ++常见问题: http://www.parashift.com/c++-faq-lite

C常见问题: http://www.eskimo .com /~scs / c-faq / top.html

alt.comp.lang.learn.c-c ++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html

其他网站:
http://www.josuttis。 com - C ++ STL图书馆书籍
http://www.sgi.com/tech/stl - 标准模板库



Check you compiler documentation. Many have an option for creating
assembly language listings. Also check your debugger documentation.
Some debugger''s have this capability too. You may want to see if
they have "interwoven" capability, which is to print a C language
statement, then followed by the assembly language. This would
be very helpful since you can see what assembly language was created
for each C statement.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library


mhandis写道:
mhandis wrote:
尝试GCC的-S论证:

gcc -S test.c

这应该创建一个名为test.s.的汇编版本。

Ronny Mandal写道:
Try GCC''s -S argument:

gcc -S test.c

This should create an assembly version called test.s.

Ronny Mandal wrote:
你好!

可以任何人请提供一些资源,或者从c到汇编程序(任意汇编程序,但LC2是首选)的算法/提示
。 c例程本身很小,很简单)。我在4天内参加了计算机科学课程的考试,我根本无法掌握这个主题。

任何帮助都将受到高度赞赏。

问候,

Ronny Mandal
Hello!

Can anyone please provide me some resources, or maybe an algorithm / tip
on translating from c to assembler (arbitrary assembler, but LC2 is
preferred. The c-routines themselves are small, trivial ones). I hvae an
exam in a computer science course in 4 days, and I simply cannot get a
grip on this topic.

Any help would be highly appreciated.
Regards,

Ronny Mandal



关于相关且完全偏离主题的说明,有没有人有AT& T汇编语法的综合在线参考资料是什么?

?我已经尝试了

找到一个,总是做空。


-nrk。


On a related and totally off-topic note, does anyone have a good,
comprehensive, online reference for the AT&T assembler syntax? I''ve tried
to find one, and always come up short.

-nrk.


这篇关于从c转换为asm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆