473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Why assembly and translation

Sorry, I am new to programming, can you tell me why we need to learn
assembly ? What advantages/disadvantages does it have ?

Please answer this, can you tell me if there is any program able to
help me change code in assembly to a figurable level of c/C++ ???

Thanks
Jul 23 '05 #1
4 1777
> Sorry, I am new to programming, can you tell me why we need to learn
assembly ? What advantages/disadvantages does it have ?
you can program C++ without the need to see assembly at all
it depends on what are you doing
if you program microcontroller (more likely in C) then it becames
obviously more important
in general it helps to understand what is going behind the hood
Please answer this, can you tell me if there is any program able to
help me change code in assembly to a figurable level of c/C++ ???


change code of an executable (.exe)?
i am not aware of such tools
why would one need to?

Gruss, Daniel
Jul 23 '05 #2
Bob Jenkins wrote:
Sorry, I am new to programming, can you tell me why we need to learn
assembly ? Assembly is very useful in debugging programs. Many times
the debugger can't (or won't) display the C++ or C source
code, but can display the assembly language statements.

Another reason is to have finer control over the processor.
Sometimes a function needs to be implemented more efficiently
than the Compiler generated code or to use processor specific
instructions. For example, some Intel processors have
string processing instructions which the compiler may not
take advantage of.

Also, assembly language gives you more understanding of
how the processor works, especially transfering data from
memory to registers and back.
What advantages/disadvantages does it have ?

Please answer this, can you tell me if there is any program able to
help me change code in assembly to a figurable level of c/C++ ??? Yes, there are tools out there. However, there is a very
small chance that the source code will be meaningful. There
are many ways to generate assembly code for the higher level
constructs. The tool cannot know which construct generated
the assembly language.

Thanks

--
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.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
Jul 23 '05 #3
"Bob Jenkins" <gi*****@lycos.com> wrote in message
news:9c**************************@posting.google.c om...
Sorry, I am new to programming, can you tell me why we need to learn
assembly ? What advantages/disadvantages does it have ?

Please answer this, can you tell me if there is any program able to
help me change code in assembly to a figurable level of c/C++ ???


About the assembly: in addition to what others have said, it just straight
up gives you a better understanding of what's going on "under the hood."

- JFA1
Jul 23 '05 #4
gi*****@lycos.com (Bob Jenkins) wrote in message news:<9c**************************@posting.google. com>...
Sorry, I am new to programming, can you tell me why we need to learn
assembly ? What advantages/disadvantages does it have ?

Please answer this, can you tell me if there is any program able to
help me change code in assembly to a figurable level of c/C++ ???

Thanks


You need to know assembly so that when you find a bug in the compiler,
you can say what it is doing wrong to the compiler vendor :-)

Admittedly I don't know of anyone at Microsoft who would be able to do
anything about bugs in their code generation without charging you
an arm and a leg for the privilege (e.g. an issue I noticed
with Visual C++ 6.0 where it got confused between the cl and dl registers)
but some other compiler vendors appreciate you providing a short snippet of
C or C++ code with the generated assembly and the bug highlighted,
and even fix it in the next version :-)
Note that nearly all the time bugs are in your code rather than the
compiler, so you have to be very sure of the problem before you send
such a bug report.

Oh yeah, and it can be useful in your code as well, if you put bugs into it
and the bug only shows up in the version that doesn't have source code :-/

Plus the usual stated advantages of performance or extra capabilities when
you are dealing with specialised architectures, although that really depends
on your application field.
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Matt | last post by:
Short Description: The Translation Hub is not picking up the TNS names file. I'm using Oracle 9ids. It doesn't work for any users and it has never worked since it's been installed. Long...
40
by: Chiwa | last post by:
Hey, Expression: Math.floor(x * 100) / 100 x= 4.1 gives 4.09, why in gods name? While other values for x don't give a problem. Thx in advance
5
by: Haines Brown | last post by:
I suspect this is a FAQ, but as a guide to my further investigation, I wondered what the options are for providing readers of my web pages with the ability to translate the pages into their own...
7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
7
by: Peter Eisentraut | last post by:
Greetings. The official PostgreSQL documentation has been translated to German and has been published as a book by verlag moderne industrie/mitp ("PostgreSQL: Das offizielle Handbuch", ISBN...
4
by: Chris Croughton | last post by:
Does a translation unit have to have at least one externally visible declaration or function definition to be valid? As I read the standard, it doesn't: it must have at least one declaration or...
3
by: Kelmen Wong | last post by:
I'm having a real hard-time to work out the hell of the statelite assembly. 1) At start, the official MSDN stated to use: .... new ResourceManager(strBaseName,...
4
by: DELESTRE Christophe | last post by:
I’m sorry to disturb you but I have a problem on .NET development, and I’m need some help to resolve it if it’s possible. I have an aspx page with src property (no dll for my web...
0
by: Stef Mientki | last post by:
hello, I've build a translation tool, to translate all strings in a python source file. As a extra gadget I added translation through Babel Fish, using beautifulsoup. Although it works...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.