Assembly
Assembly
Is Assembly Hard to Learn?
Re: Assembly
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.
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.
Re: Assembly
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...
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...
Re: Assembly
Thank you for all