====== Assembly Language Programming ====== | **Field** | Computer Science and Engineering | | **Went Obsolete** | early 2000s | | **Made Obsolete By** | Programming in higher level languages such as C, C++. Faster [[CPUs%3Faction=edit.html|CPUs]][[CPUs%3Faction=edit.html|?]] and better compilers slowly made hand-coded assembly less and less necessary on desktop computers. More complex CPU pipelines and caches made it more and more difficult to do efficiently. | | **Knowledge Assumed** | Intimate knowledge of the assembly language syntax, strong knowlege of the underlying hardware architecture | | **When useful** | Critical for debugging many application crashes in a timely fashion, and for understanding core dumps. Still used when the utmost performance or very low-level control (e.g. in bootloaders) is desired. Still may be used particularly for small, frequently used sub-routines. In embedded systems, it is still essential and so not really obsolete. Required to write compiler backends. In other words, not completely obsolete. | Assembly language programming is programming computers at the lowest practical level. The classical definition is that each assembly language instruction corresponds directly to exactly one machine instruction. In contrast, in higher level languages, a single line of code may represent many machine instructions. Programming in assembly language gives the programmer the ultimate flexibility and control. A knowledgeable and experienced programmer could often eke out extra performance by employing tricks and machine-specific optimizations. This rumor has been around for ages, yet any processor-intensive routine is still written in assembly language. Some, like cryptographic algorithms, are becoming more and more important in the internet age. Anything but dead. Writing assembly is still a skill used by [[http://en.wikipedia.org/wiki/Shellcode|shellcoders]], and security researchers need to be able to read it. Writing assembly language is also needed in micro-controllers such as Atmel, PIC, 6502, ARM, and SX. Micro-controllers are used in everything from hospital equipment to [[TVs%3Faction=edit.html|TVs]][[TVs%3Faction=edit.html|?]]. Try writing C++ on your microwave's CPU and you will see just how "obsolete" assembly language really is. There is also a significant amount of financial code written in 360 structured assembly in the financial institutions of the world. Some of you depend on such code for your paychecks each month.