x64 Assembly Language Step-by-Step: Programming with Linux. 4 Ed

x64 Assembly Language Step-by-Step: Programming with Linux. 4 Ed

x64 Assembly Language Step-by-Step: Programming with Linux. 4 Ed
Автор: Jeff Duntemann, Pai Suhas
Дата выхода: 2024
Издательство: John Wiley & Sons, Inc.
Количество страниц: 636
Размер файла: 4,4 МБ
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы

Title Page

Copyright Page

About the Author

Acknowledgments

Contents at a Glance

Contents

Introduction

Chapter 1: It’s All in the Plan: Understanding What Computers Really Do

  • Another Pleasant Valley Saturday
  • Steps and Tests
  • More Than Two Ways?
  • Computers Think Like Us
  • Had This Been the Real Thing...
  • Assembly Language Programming As a Square Dance
  • Assembly Language Programming As a Board Game
  • Code and Data
  • Addresses
  • Metaphor Check!

Chapter 2: Alien Bases: Getting Your Arms Around Binary and Hexadecimal

  • The Return of the New Math Monster
  • Counting in Martian
  • Dissecting a Martian Number
  • The Essence of a Number Base
  • Octal: How the Grinch Stole Eight and Nine
  • Who Stole Eight and Nine?
  • Hexadecimal: Solving the Digit Shortage
  • From Hex to Decimal and from Decimal to Hex
  • Practice. Practice! PRACTICE!
  • Arithmetic in Hex
  • Binary
  • Why Binary?
  • Hexadecimal as Shorthand for Binary
  • Prepare to Compute

Chapter 3: Lifting the Hood: Discovering What Computers Actually Are

  • RAXie, We Hardly Knew Ye
  • Switches, Transistors, and Memory
  • Random Access
  • The Shop Supervisor and the Assembly Line
  • Fetch and Execute
  • What vs. How: Architecture and Microarchitecture
  • Operating Systems: The Corner Office
  • Multitasking Magic
  • The Plan

Chapter 4: Location, Location, Location: Registers, Memory Addressing, and Knowing Where Things Are

  • The Joy of Memory Models
  • Backward Compatibility and Virtual 86 Mode
  • Segment Registers and x64
  • General-Purpose Registers
  • The Instruction Pointer
  • The Flags Register
  • Math Coprocessors and Their Registers
  • The Four Major Assembly Programming Models

Chapter 5: The Right to Assemble: The Process of Creating Assembly Language Programs

  • Files and What’s Inside Them
  • Binary vs. Text Files
  • Endianness
  • Assembly Language
  • Comments
  • Object Code, Linkers, and Libraries
  • The Assembly Language Development Process
  • Debuggers and Debugging
  • Installing the Software
  • Step-by-Step Compilation Process

Chapter 6: A Place to Stand, with Access to Tools: Linux and the Tools That Shape the Way You Work

  • Integrated Development Environments
  • Introducing SASM
  • Linux and Terminals
  • The Three Standard Unix Files
  • I/O Redirection
  • Terminal Control
  • Using Linux Make
  • Debugging with SASM

Chapter 7: Following Your Instructions: Meeting Machine Instructions Up Close and Personal

  • Instructions and Operands
  • Source and Destination Operands
  • Immediate, Register, and Memory Data
  • Watching Flags
  • Arithmetic Instructions
  • Signed vs. Unsigned
  • Division
  • Reading Assembly Language References

Chapter 8: Our Object All Sublime: Creating Programs That Work

  • Sections of an Assembly Program
  • Labels and Variables
  • The Stack
  • Linux Kernel Services via Syscall
  • The ABI’s Register Scheme
  • Designing Nontrivial Programs
  • From Pseudocode to Assembly

Chapter 9: Bits, Flags, Branches, and Tables: Easing Into Mainstream Assembly Coding

  • Bitwise Operations (AND, OR, XOR, NOT)
  • Shifts and Rotates
  • Lookup Tables
  • Conditional and Unconditional Jumps
  • CMP, TEST, BT Instructions
  • x64 Memory Addressing
  • LEA Instruction
  • Table Translation Techniques

Chapter 10: Dividing and Conquering: Using Procedures and Macros to Battle Program Complexity

  • Procedures and the Stack
  • Local Labels and Data
  • Include Files and Libraries
  • Creating and Using Macros
  • Macros vs. Procedures
  • Console Control Examples

Chapter 11: Strings and Things: Those Amazing String Instructions

  • Understanding Strings in Assembly
  • REP STOSB and Other String Instructions
  • Virtual Screens
  • The LOOP Family
  • String Searches
  • Command-Line Arguments
  • Stack Structure and Access
  • Program Prologs and Epilogs

Chapter 12: Heading Out to C: Calling External Functions Written in the C Language

  • Using GCC and libc Functions
  • Calling Conventions
  • Stack Frame Setup
  • printf, scanf, puts, fgets
  • Time Functions
  • Random Numbers
  • File I/O in C from Assembly
  • AT&T Syntax Overview
  • Passing More Than Six Parameters
  • Working with Command-Line Arguments

Conclusion: Not the End, But Only the Beginning

Appendix A: The Return of the Insight Debugger

  • Using Insight
  • Stack and Memory Views
  • Learn gdb!

Appendix B: Partial x64 Instruction Reference

  • What’s Removed from x64
  • Flag Results and Instruction Syntax
  • Instruction Index (e.g., ADD, AND, CMP, JMP, MOV, MUL, RET, etc.)

Appendix C: Character Set Charts

Index

EULA

The long-awaited x64 edition of the bestselling introduction to Intel assembly language

In the newly revised fourth edition of x64 Assembly Language Step-by-Step: Programming with Linux, author Jeff Duntemann delivers an extensively rewritten introduction to assembly language with a strong focus on 64-bit long-mode Linux assembler. The book offers a lighthearted, robust, and accessible approach to a challenging technical discipline, giving you a step-by-step path to learning assembly code that’s engaging and easy to read.

x64 Assembly Language Step-by-Step makes quick work of programmable computing basics, the concepts of binary and hexadecimal number systems, the Intel x86/x64 computer architecture, and the process of Linux software development to dive deep into the x64 instruction set, memory addressing, procedures, macros, and interface to the C-language code libraries on which Linux is built.

You’ll also find:

  • A set of free and open-source development and debugging tools you can download and put to use immediately

  • Numerous examples woven throughout the book to illustrate the practical implementation of the ideas discussed within

  • Practical tips on software design, coding, testing, and debugging

A one-stop resource for aspiring and practicing Intel assembly programmers, the latest edition of this celebrated text provides readers with an authoritative tutorial approach to x64 technology that’s ideal for self-paced instruction. Please note, the author's listings that accompany this book are available from the author website at www.contrapositivediary.com under his heading "My Assembly Language Books."


Похожее:

Список отзывов:

Нет отзывов к книге.