Skip to main content

Introducing new learning courses and educational videos from Apress. Start watching

  • Book
  • © 2017

Low-Level Programming

C, Assembly, and Program Execution on Intel® 64 Architecture

Apress

Authors:

(view affiliations)
  • Teaches how to use x64 assembly language to write low-level code for performance-critical programs

  • Shows how to compile and execute low-level code in C inside the Intel 64 hardware and OS framework

  • Provides practice of a variety of optimization, debugging, and performance-gain techniques

Buying options

eBook
USD 64.99
Price excludes VAT (USA)
  • ISBN: 978-1-4842-2403-8
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD 84.99
Price excludes VAT (USA)

This is a preview of subscription content, access via your institution.

Table of contents (22 chapters)

  1. Front Matter

    Pages i-xxvi
  2. Assembly Language and Computer Architecture

    1. Front Matter

      Pages 1-1
    2. Basic Computer Architecture

      • Igor Zhirkov
      Pages 3-16
    3. Assembly Language

      • Igor Zhirkov
      Pages 17-38
    4. Legacy

      • Igor Zhirkov
      Pages 39-46
    5. Virtual Memory

      • Igor Zhirkov
      Pages 47-61
    6. Compilation Pipeline

      • Igor Zhirkov
      Pages 63-90
    7. Interrupts and System Calls

      • Igor Zhirkov
      Pages 91-100
    8. Models of Computation

      • Igor Zhirkov
      Pages 101-126
  3. The C Programming Language

    1. Front Matter

      Pages 127-127
    2. Basics

      • Igor Zhirkov
      Pages 129-146
    3. Type System

      • Igor Zhirkov
      Pages 147-180
    4. Code Structure

      • Igor Zhirkov
      Pages 181-200
    5. Memory

      • Igor Zhirkov
      Pages 201-220
    6. Syntax, Semantics, and Pragmatics

      • Igor Zhirkov
      Pages 221-240
    7. Good Code Practices

      • Igor Zhirkov
      Pages 241-262
  4. Between C and Assembly

    1. Front Matter

      Pages 263-263
    2. Translation Details

      • Igor Zhirkov
      Pages 265-289
    3. Shared Objects and Code Models

      • Igor Zhirkov
      Pages 291-325
    4. Performance

      • Igor Zhirkov
      Pages 327-355

About this book

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

Keywords

  • von Neumann architecture
  • protection rings
  • procedure calling sequences
  • endianness
  • RISC
  • compilation cycle
  • finite automatons
  • Forth compiler
  • nonstrict dynamic typing
  • polymorphism in C
  • function pointers
  • string literals
  • BMP format
  • calling conventions
  • memory allocator
  • stack overflow
  • stack frames
  • stack guard
  • return value optimization
  • debugging with gdb

Authors and Affiliations

  • Saint Petersburg, Russia

    Igor Zhirkov

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.

Bibliographic Information

Buying options

eBook
USD 64.99
Price excludes VAT (USA)
  • ISBN: 978-1-4842-2403-8
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD 84.99
Price excludes VAT (USA)