- Buy this product and stream 90 days of Amazon Music Unlimited for free. E-mail after purchase. Conditions apply. Learn more
Low-Level Programming: C, Assembly, and Program Execution on Intel® 64 Architecture Paperback – 29 Jun 2017
|New from||Used from|
Special offers and product promotions
Frequently bought together
Customers who viewed this item also viewed
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Would you like to tell us about a lower price?
If you are a seller for this product, would you like to suggest updates through seller support?
From the Back Cover
Learn Intel 64 assembly language and architecture, become proficient in C, and understand how the programs are compiled and executed down to machine instructions, enabling you to write robust, high-performance code.
Low-Level Programming explains Intel 64 architecture as the result of von Neumann architecture evolution. The book teaches the latest version of the C language (C11) and assembly language from scratch. It covers the entire path from source code to program execution, including generation of ELF object files, and static and dynamic linking. Code examples and exercises are included along with the best code practices. Optimization capabilities and limits of modern compilers are examined, enabling you to balance between program readability and performance. The use of various performance-gain techniques is demonstrated, such as SSE instructions and pre-fetching. Relevant Computer Science topics such as models of computation and formal grammars are addressed, and their practical value explained.
Low-Level Programming teaches programmers to:
- Freely write in assembly language
- Understand the programming model of Intel 64
- Write maintainable and robust code in C11
- Follow the compilation process and decipher assembly listings
- Debug errors in compiled assembly code
- Use appropriate models of computation to greatly reduce program complexity
- Write performance-critical code
- Comprehend the impact of a weak memory model in multi-threaded applications
About the Author
Igor Zhirkov teaches his highly successful “System Programming Languages” course at ITMO University in Saint Petersburg. He studied at Saint Petersburg Academic University and received his master degree from ITMO University. Currently, he is doing research in verified C refactorings as part of his PhD thesis and formalization of Bulk Synchronous Parallelism library in C at IMT Atlantique in Nantes, France. His main interests are low-level programming, programming language theory, and type theory.
Customers who bought this item also bought
There was a problem filtering reviews right now. Please try again later.
It's better than that! It's more like a guide book, i.e. it's an overview of the whole modern software stack, starting with low-level assembly and ending with relatively high-level C code. So if you want to get an idea of how things work under the hood, and how those pieces stick together - this is the book for you.
PS I have been programming in Assembly regularly, starting at the Secondary school.
Most helpful customer reviews on Amazon.com
There are books on programming that are best used as references, standing on one's desk and waiting for its owner to forget a name of a handy function. Then there are books that seek to land their readers a job by providing the minimal knowledge required to pass a programming iterview and do some productive programming, learning the missing pieces later in the field. And then there are books that outline the underlying principles on which programming is built. The present book is of the latter kind.
That isn't to say the book can't be used to land a job. The presented examples and topics are not merely for academic pondering but practical enough for a reader to be able to apply the acquired knowledge in the field. However, if one just wants to start writing assembly and C, this book is probably an overkill. It doesn't hold one's hand and requires much more effort from the reader than necessary to start producing working code, so if one's goal is to be able to read and write some C, online tutorials would probably be a better place to start.
Who is this book for, then? Well, one of its major focus is on good practices, so if one is somewhat experienced in programming, the book can help to solidify the intuitive understanding of how to write. The other focus is on the underlying principles of low-level programming: many connections to other branches of computer science are provided, putting low-level programming into a broader perspective, which results in better programs. For example, one doesn't exactly need to know about finite-state machines, but structuring an assembly program to resemble this concept helps significantly to produce listings that are easy to read and debug. Exposure to other models of computation doesn't have any immediate benefits, but if one familiarize themselves with Forth (an interpreter of which the book suggests to write), they are bound to use some little tricks inspired by it from time to time. How does knowing about parsing of formal languages help with low-level programming if one doesn't expect to write compilers? Well, it makes compiler messages more intuitive. And so on; I suggest that you look at the table of contents, available freely by clicking on the book cover, and observe the sheer breadth of the covered material.
Of course, the book isn't limited to things that are only marginally connected to low-level programming. The programming itself is described definitively, with many helpful examples, assignments, and useful asides which warn about important caveats. I was sold the moment I saw a warning about a names of sections in assembly not being case-insensitive, because first, I've once spent an evening fighting with a mysterious segfault because of this, and second, I haven't seen a similar warning in any other resources. The book is good; however, I still believe that its greatest strength is in acquainting readers with indirectly related concepts, and reading it solely for the sake of learning how to write C isn't practical as there are many easily googlable free resources providing the means to acquire this skill.
With all that said, I still believe that even though exposure to many different topics indirectly connected to low-level programming makes one a better programmer, beginners would be overwhelmed by the amount of content they have to absorb in addition to learning the basic concepts.
+ Interesting examples and assignments
+ Instructions for tooling (often discarded in other books)
- The book is quite terse (the consequence of being deep and broad)
- The language in which the book is written is sometimes weird due to the Russian origin (for example, 'loop' is 'цикл' in Russian which is incorrectly translated as 'cycle' in some places, but 'loop' isn't even nearly the same as 'cycle'')
DISCLOSURE: I'm personally acquainted with the author and have read the book before it went to print. However, I'm not currently one of his students and so will not receive good grades for this review.
Let me list all the drawbacks I noticed. The minor ones are the format of the book (taller, and narrower than usual) and persistently printing copyright notice over the pages. I don't know where APress is heading with it but I see it again and I am really tired of this. What next -- "you wouldn't steal a car..." warning?
The big one starts with author's statement that there is no point in duplicating info about assembly language because everybody can check Intel spec. As the effect you get as little info as possible in a book about assembly. This decision made me really angry -- I paid for the printed book just to be reminded about existence of the internet? Now I have to switch constantly between book and computer monitor -- yeah, new dimension of comfortable reading.
But what really broke the straw was page 127 -- beginning of the C part. Author included just a little info about asm because there is one spec available ("Many books try to include exhaustive information about instruction set. it gets outdated quite soon; moreover, it BLOATS the book unnecessarily.", upper case is from me)? Hear this -- there is entire C tutorial included, 140 pages long, even with programming style tips. It is probably because there is no other book about C on the planet, and K&R is about to be written yet. Yes, I am buying this reasoning, sure.
Author also included such rare gems as description of regular expressions and finite state machines. But asm... oh big no-no, there is Intel spec already, every line of duplication is a crime ("There is no virtue in copying the instruction descriptions from the “original” place they appear in; it is much more mature to learn to work with the source.") Why a reader cannot work with the sources about regexes or grammars?
As for wasting space I was also not happy seeing questions supposed to help me learn -- I read books because I am curious, to learn more, so my mind is already set on asking. I think it is more valuable to provide information than to ask and ask (because I am already doing that). "What does instruction xor rdi, rdi do" -- is it really valuable? There are 423 questions in total and I think they are geared more to make this book a textbook (making life easier for lazy lecturer) than to truly help any self-taught reader.
It is not the book is not useful, far from it, author relies solely on open-source tools, I have learned about Intel asm (and Forth), part 3 (C+asm) showed me new low-level details. But despite all those good things this book is too heavily ill-balanced to get a higher score. The second edition will be good with the second part completely removed, or really great with expanded part one at the expense of removing part two. Until then we have to live with the average.