Art of 64 bit assembly

The Art of 64-Bit Assembly

x86-64 Machine Organization and Programming
by Randall Hyde
October 2021, 1032 pp.
ISBN-13: 
9781718501089

Download Chapter 6: ARITHMETIC

Randall Hyde's The Art of Assembly Language has long been the go-to guide for learning assembly language. In this long-awaited follow-up, Hyde presents a 64-bit rewrite of his seminal text. It not only covers the instruction set for today’s x86-64 class of processors in-depth (using MASM), but also leads you through the maze of assembly language programming and machine organization by showing you how to write code that mimics operations in high-level languages.

Beginning with a “quick-start” chapter that gets you writing basic ASM applications as rapidly as possible, Hyde covers the fundamentals of machine organization, computer data representation and operations, and memory access. He’ll teach you assembly language programming, starting with basic data types and arithmetic, progressing through control structures and arithmetic to advanced topics like table lookups and string manipulation. In addition to the standard integer instruction set, the book covers the x87 FPU, single-instruction, multiple-data (SIMD) instructions, and MASM’s very powerful macro facilities. Throughout, you’ll benefit from a wide variety of ready-to-use library routines that simplify the programming process.

You’ll learn how to:

  • Write standalone programs or link MASM programs with C/C++ code for calling routines in the C Standard Library
  • Organize variable declarations to speed up access to data, and how to manipulate data on the x86-64 stack
  • Implement HLL data structures and control structures in assembly language
  • Convert various numeric formats, like integer to decimal string, floating-point to string, and hexadecimal string to integer
  • Write parallel algorithms using SSE/AVX (SIMD) instructions
  • Use macros to reduce the effort needed to write assembly language code

The Art of 64-bit Assembly, Volume 1 builds on the timeless material of its iconic predecessor, offering a comprehensive masterclass on writing complete applications in low-level programming languages.

Author Bio 

Randall Hyde is an embedded software engineer who has worked in the medical, nuclear, consumer electronics, and entertainment industries. He taught assembly language programming at the University level for over 10 years and has written hundreds of thousands of lines of assembly code for embedded and commercial applications over the years.

Table of contents 

Part I: Machine Organization
Chapter 1: Hello, World of Assembly Language
Chapter 2: Computer Data Representation and Operations
Chapter 3: Memory Access and Organization
Chapter 4: Constants, Variables, and Data Types
Part II: Assembly Language Programming
Chapter5: Procedures
Chapter6: Arithmetic
Chapter 7: Low-Level Control Structures
Chapter 8: Advanced Arithmetic
Chapter 9: Numeric Conversion
Chapter 10: Table Lookups
Chapter 11: SIMD Instructions
Chapter 12: Bit Manipulation
Chapter 13: Macros and the MASM Compile-Time Language
Chapter 14: The String Instructions
Chapter 15: Managing Complex Projects
Chapter 16: Standalone Assembly Language Programs
Part III: Reference Material
Appendix A: ASCII Character Set
Appendix B: Glossary
Appendix C: Installing and Using Visual Studio Appendix D: The Windows Command-Line Interpreter Appendix E: Answers to Questions