written 5.8 years ago by |
(i) Assembly language is a low level language. It is dependent on the system architecture. i.e writing assembler routines for one computer, can't port it over to another computer without a radical rewrite of the code.
In case of C, you can port C over to various platforms quite easily. Hence it is independent of the system architecture.
(ii) While writing assembly code, you get what you write. Every instruction is written as one mnemonic, one instruction to the processor and there is no optimization of code afterwards.
For eg.
$\hspace{1cm}$LOAD a
$\hspace{1cm}$LOAD b
$\hspace{1cm}$ADD a, b$\hspace{1cm}\Bigg\}$Addition of 2 no.s
$\hspace{1cm}$STORE c
In C(and other HLL) each instruction/line of code will result in may be dozens of instructions to the processor. Also, the code will be optimized.
For eg. : c = a + b $\;\;\;$ // addition of 2 no.s
For C, it is a 2 step process, first compiling and then linking it with libraries and other object files.