+ 3

When do we use C and when do we use Assembly?

7th Mar 2018, 11:09 PM
Kevin Eldurson
Kevin Eldurson - avatar
4 Respuestas
+ 10
There is almost no need for Assembly any more. Compilers of C and C++ can generate better binary than most people can with Assembly. Even before decent optimizations, the maintenance cost of Assembly limited how much code was written, except for tight memory space or places that needed instructions that the compiler didn't generate. My embedded code in the late 70's was mostly C with 4 assembler functions of around 400 or so total instructions.
8th Mar 2018, 1:15 AM
John Wells
John Wells - avatar
+ 3
Thanks but I'm interested in the cases of usage. Like kernels are written in Assembly and OS's are written in C?
7th Mar 2018, 11:19 PM
Kevin Eldurson
Kevin Eldurson - avatar