tailieunhanh - Low-Level C Programming

In its role as a high level assembler used for writing operating systems, C is often used to access memory locations and change individual bits. You might for example need to access individual bits in an int. It can sometimes be useful to conserve memory by using a byte to hold 8 flags though with an abundance of ram it's common to just use one byte per flag or even one per int. Knowing how to extract or alter individual bits is still worthwhile knowing; you may never have to use it but when you have to maintain code that. | UNIVERSITY OF INFORMATION TECHNOLOGY Low-Level C Programming ThS. Le Hoai Nghia nghialh@ February 2009 Low-Level C Programming - p. 1 49 s Function is correct Source code is concise readable maintainable Time-critical sections of program run fast enough Object code is small and efficient Basically optimize the use of three resources Execution time Memory Development maintenance time Low-Level C Programming - p. 2 49 You can say the same thing many different ways and mean the same thing. There are many different ways to say the same thing. The same thing may be said different ways. There is more than one way to say it. Many sentences are equivalent. Be succinct. Low-Level C Programming - p. 3 .