Computers & Internet Books:

Writing a C Compiler

Build a Real Programming Language from Scratch
Click to share your rating 0 ratings (0.0/5.0 average) Thanks for your vote!

Format:

Paperback / softback
$128.99
RRP:
$130.00 save $1.01
Releases

Pre-order to reserve stock from our first shipment. Your credit card will not be charged until your order is ready to ship.

Available for pre-order now

Buy Now, Pay Later with:

4 payments of $32.25 with Afterpay Learn more

Pre-order Price Guarantee

If you pre-order an item and the price drops before the release date, you'll pay the lowest price. This happens automatically when you pre-order and pay by credit card.

If paying by PayPal, Afterpay, Zip or internet banking, and the price drops after you have paid, you can ask for the difference to be refunded.

If Mighty Ape's price changes before release, you'll pay the lowest price.

Availability

This product will be released on

Delivering to:

It should arrive:

  • 1-8 October using International Courier

Description

A hands-on, example-filled guide to the theory and practice of writing a C compiler- a computer program that translates code written by programmers into code the computer can read. A hands-on, example-filled guide to the theory and practice of writing a C compiler- a computer program that translates code written by programmers into code the computer can read. Compilers are at the heart of everything programmers do-and they're cool as heck-but they have an intimidating reputation. Writing a C Compiler makes this fascinating topic fun and accessible. This book is a step-by-step guide to writing your own compiler for a large subset of C. Your compiler will generate assembly code for the ubiquitous x64 processor architecture, so you'll learn what it takes to compile a real-world programming language to run on a real-world processor. You'll build a working compiler for the simplest possible C programs in Chapter 1, then add a new feature in each subsequent chapter. You won't need any prior knowledge of compiler construction or assembly code, and the implementation is presented in pseudocode, so you can write your compiler in whatever language you like. You'll learn how to- Write a lexer and recursive descent parser to turn source code into an abstract syntax tree (AST) Implement arithmetic operations, control-flow statements, and other C language constructs in x64 assembly Use your system's calling convention to call functions defined in external libraries Perform several common optimizations, including constant folding and dead store elimination Write a graph coloring register allocator to efficiently assign values to hardware registers In Writing a C Compiler, you'll tackle a fun, challenging project-and gain a deeper understanding of the code you write and the systems it runs on.

Author Biography:

Nora Sandler is a software engineer based in Seattle. She holds a BS in computer science from the University of Chicago, where she researched the implementation of parallel programming languages. After several years as a penetration tester, she found her way back to compilers. Most recently, she worked on domain-specific languages at an endpoint security company. You can read her blog about pranks, compilers, and other computer science topics at https-//norasandler.com.
Release date Australia
September 24th, 2024
Author
Pages
776
Audience
  • General (US: Trade)
ISBN-13
9781718500426
Product ID
36552518

Customer previews

Nobody has previewed this product yet. You could be the first!

Write a Preview

Help & options

Filed under...