Assembly

Topics on common programming languages
Post Reply
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Assembly

Post by Nipuna » Wed Apr 07, 2010 8:45 pm

Is Assembly Hard to Learn?
User avatar
Magneto
Major
Major
Posts: 430
Joined: Wed Jul 15, 2009 1:52 pm
Location: London

Re: Assembly

Post by Magneto » Wed Apr 07, 2010 10:55 pm

Dear Friend ,

Actually it is not hard to learn. But the thing is it is not standard language like ANCII C. It vary on micro controller to
micro controller , according to the instruction set of the micro controller CPU. So when you change your micro controller ,
you have to learn the assembly instructions again for that new micro controller.

And for implement even a simple logic , you have to write large number of lines in assembly language compare to 'C' .
So I think , if you do not want much optimization , it is better to use a high level language like C.

Some C compilers allow to write assembly codes within C codes. So if you can use a such compiler , you can only
implement the code sections , in assembly language , which want very high optimization . Rest of the code you can
write in C language.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: Assembly

Post by Neo » Wed Apr 07, 2010 11:52 pm

As Magneto clearly stated, assembly is not hard to learn particularly the instruction set. However, you need to write several number of programmes to become a professional with that. If a task is given to two programmer, the assembly code they both write will be different. We rank the best assembly code in terms of accuracy of logic, optimised for size (shortest possible code), optimised for performance (fastest code).

If you take the IBM compatible PCs we normally use today, it all carries a common instruction set called x86 Instruction set. However, every processor type has advancements so the new instructions are added for each. Again, co-processors are also added with different instruction sets. For example, AMD has 3D Now co-processor where as Intel has SSE co-processor. Both have different instructions set.

See the instruction set for x86 IBM compatible Processors. This covers most of the sub-instruction sets like SSE variants, 3D Now, etc...
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: Assembly

Post by Nipuna » Thu Apr 08, 2010 8:52 am

Thank you for all
Post Reply

Return to “.Net & Other Programming”