This preview shows page 1. Sign up to view the full content.
Unformatted text preview: by a high quality compiler is generally as good or even better than what can be achieved manually. The C language has largely eliminated machine access as a reason for writing in assembly code. The ability to access low-level data representations through unions and pointer arithmetic, along with the ability to operate on bit-level data representations, provide sufﬁcient access to the machine for most programmers. For example, almost every part of a modern operating system such as Linux is written in C. Nonetheless, there are times when writing in assembly code is the only option. This is especially true when implementing an operating system. For example, there are a number of special registers storing process state information that the operating system must access. There are either special instructions or special memory locations for performing input and output operations. Even for application programmers, there are some machine features, such as the values of the condition codes, that cannot be accessed directly in C. The challenge then is to integrate code consisting m...
View Full Document
- Spring '10
- The American