Skip to Content
Write Great Code, Volume 2, 2nd Edition
book

Write Great Code, Volume 2, 2nd Edition

by Randall Hyde
August 2020
Intermediate to advanced
656 pages
16h 15m
English
No Starch Press
Content preview from Write Great Code, Volume 2, 2nd Edition

6CONSTANTS AND HIGH-LEVEL LANGUAGES

image

Some programmers may not realize it, but many CPUs do not treat constant and variable data identically at the machine code level. Most CPUs provide a special immediate addressing mode that allows a language translator to embed a constant value directly into a machine instruction rather than storing it in a memory location and accessing it as a variable. However, the CPU’s ability to represent constant data efficiently varies by CPU and, in fact, by the type of the data. By understanding how a CPU treats constant data at the machine code level, you can choose appropriate ways to represent constants in your HLL ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Write Great Code, Volume 3

Write Great Code, Volume 3

Randall Hyde

Publisher Resources

ISBN: 9781098125653