Book Excerpt: Write Great Code—Think Low Level, Write High Level

Book Excerpt: Write Great Code—Think Low Level, Write High Level

o matter how well you write and understand high-level programming languages, your applications can probably benefit if you’re willing to dig down into the lower-level code that makes the computer work. And for most developers, that means learning assembly language and understanding compilers.

In Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level (No Starch Press, March 2006), author Randall Hyde speaks to a new generation of programmers who haven’t been taught assembly language, and many of whom haven’t been trained in a computer science curriculum. This book, the second installment in the popular Write Great Code series, explains how compilers work to translate high-level language statements and data structures into machine code. Armed with this understanding, programmers will be able to choose a proper mix of high-level language statements to produce more efficient software?all without having to give up the productivity and portability benefits of a high-level language.

The two chapters excerpted here should not only serve as a good introduction to the advantages of knowing lower-level programming, but also give you a good feel for the comprehensive coverage and the target audience level of this book.

Chapter 3, 80×86 Assembly for the High-level Language (HLL) Programmer, walks you through the 80×86 architecture, provides a basic overview of 80×86 assembly language, the addressing modes for this chip family, and then describes the various syntax forms used in common assemblers such as HLA, MASM/TASM, and Gas.

Chapter 8, Variables in a High-level Language, covers the low-level implementation of variables used in high-level languages, including the runtime memory organization, attributes that differentiate variables from other objects, the difference between static, automatic, and dynamic variables, and how machine instructions encode the address of a variable.

Reproduced from Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level by permission of No Starch Press. ISBN 1593270658, copyright 2006. All rights reserved.

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular