Modern Assembly Language Programming with the ARM Processor

Book description

Modern Assembly Language Programming with the ARM Processor is a tutorial-based book on assembly language programming using the ARM processor. It presents the concepts of assembly language programming in different ways, slowly building from simple examples towards complex programming on bare-metal embedded systems.

The ARM processor was chosen as it has fewer instructions and irregular addressing rules to learn than most other architectures, allowing more time to spend on teaching assembly language programming concepts and good programming practice. In this textbook, careful consideration is given to topics that students struggle to grasp, such as registers vs. memory and the relationship between pointers and addresses, recursion, and non-integral binary mathematics. A whole chapter is dedicated to structured programming principles. Concepts are illustrated and reinforced with a large number of tested and debugged assembly and C source listings. The book also covers advanced topics such as fixed and floating point mathematics, optimization, and the ARM VFP and NEONTM extensions. PowerPoint slides and a solutions manual are included.

This book will appeal to professional embedded systems engineers, as well as computer engineering students taking a course in assembly language using the ARM processor.

  • Concepts are illustrated and reinforced with a large number of tested and debugged assembly and C source listing
  • Intended for use on very low-cost platforms, such as the Raspberry Pi or pcDuino, but with the support of a full Linux operating system and development tools
  • Includes discussions of advanced topics, such as fixed and floating point mathematics, optimization, and the ARM VFP and NEON extensions

Table of contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. List of Tables
  6. List of Figures
  7. List of Listings
  8. Preface
    1. Choice of Processor Family
    2. General Approach
  9. Companion Website
  10. Acknowledgments
  11. Part I: Assembly as a Language
    1. Chapter 1: Introduction
      1. Abstract
      2. 1.1 Reasons to Learn Assembly
      3. 1.2 The ARM Processor
      4. 1.3 Computer Data
      5. 1.4 Memory Layout of an Executing Program
      6. 1.5 Chapter Summary
      7. Exercises
    2. Chapter 2: GNU Assembly Syntax
      1. Abstract
      2. 2.1 Structure of an Assembly Program
      3. 2.2 What the Assembler Does
      4. 2.3 GNU Assembly Directives
      5. 2.4 Chapter Summary
      6. Exercises
    3. Chapter 3: Load/Store and Branch Instructions
      1. Abstract
      2. 3.1 CPU Components and Data Paths
      3. 3.2 ARM User Registers
      4. 3.3 Instruction Components
      5. 3.4 Load/Store Instructions
      6. 3.5 Branch Instructions
      7. 3.6 Pseudo-Instructions
      8. 3.7 Chapter Summary
      9. Exercises
    4. Chapter 4: Data Processing and Other Instructions
      1. Abstract
      2. 4.1 Data Processing Instructions
      3. 4.2 Special Instructions
      4. 4.3 Pseudo-Instructions
      5. 4.4 Alphabetized List of ARM Instructions
      6. 4.5 Chapter Summary
      7. Exercises
    5. Chapter 5: Structured Programming
      1. Abstract
      2. 5.1 Sequencing
      3. 5.2 Selection
      4. 5.3 Iteration
      5. 5.4 Subroutines
      6. 5.5 Aggregate Data Types
      7. 5.6 Chapter Summary
      8. Exercises
    6. Chapter 6: Abstract Data Types
      1. Abstract
      2. 6.1 ADTs in Assembly Language
      3. 6.2 Word Frequency Counts
      4. 6.3 Ethics Case Study: Therac-25
      5. 6.4 Chapter Summary
      6. Exercises
  12. Part II: Performance Mathematics
    1. Chapter 7: Integer Mathematics
      1. Abstract
      2. 7.1 Subtraction by Addition
      3. 7.2 Binary Multiplication
      4. 7.3 Binary Division
      5. 7.4 Big Integer ADT
      6. 7.5 Chapter Summary
      7. Exercises
    2. Chapter 8: Non-Integral Mathematics
      1. Abstract
      2. 8.1 Base Conversion of Fractional Numbers
      3. 8.2 Fractions and Bases
      4. 8.3 Fixed-Point Numbers
      5. 8.4 Fixed-Point Operations
      6. 8.5 Floating Point Numbers
      7. 8.6 Floating Point Operations
      8. 8.7 Computing Sine and Cosine
      9. 8.8 Ethics Case Study: Patriot Missile Failure
      10. 8.9 Chapter Summary
      11. Exercises
    3. Chapter 9: The ARM Vector Floating Point Coprocessor
      1. Abstract
      2. 9.1 Vector Floating Point Overview
      3. 9.2 Floating Point Status and Control Register
      4. 9.3 Register Usage Rules
      5. 9.4 Load/Store Instructions
      6. 9.5 Data Processing Instructions
      7. 9.6 Data Movement Instructions
      8. 9.7 Data Conversion Instructions
      9. 9.8 Floating Point Sine Function
      10. 9.9 Alphabetized List of VFP Instructions
      11. 9.10 Chapter Summary
      12. Exercises
    4. Chapter 10: The ARM NEON Extensions
      1. Abstract
      2. 10.1 NEON Intrinsics
      3. 10.2 Instruction Syntax
      4. 10.3 Load and Store Instructions
      5. 10.4 Data Movement Instructions
      6. 10.5 Data Conversion
      7. 10.6 Comparison Operations
      8. 10.7 Bitwise Logical Operations
      9. 10.8 Shift Instructions
      10. 10.9 Arithmetic Instructions
      11. 10.10 Multiplication and Division
      12. 10.11 Pseudo-Instructions
      13. 10.12 Performance Mathematics: A Final Look at Sine
      14. 10.13 Alphabetized List of NEON Instructions
      15. 10.14 Chapter Summary
  13. Part III: Accessing Devices
    1. Chapter 11: Devices
      1. Abstract
      2. 11.1 Accessing Devices Directly Under Linux
      3. 11.2 General Purpose Digital Input/Output
      4. 11.3 Chapter Summary
      5. Exercises
    2. Chapter 12: Pulse Modulation
      1. Abstract
      2. 12.1 Pulse Density Modulation
      3. 12.2 Pulse Width Modulation
      4. 12.3 Raspberry Pi PWM Device
      5. 12.4 pcDuino PWM Device
      6. 12.5 Chapter Summary
      7. Exercises
    3. Chapter 13: Common System Devices
      1. Abstract
      2. 13.1 Clock Management Device
      3. 13.2 Serial Communications
      4. 13.3 Chapter Summary
      5. Exercises
    4. Chapter 14: Running Without an Operating System
      1. Abstract
      2. 14.1 ARM CPU Modes
      3. 14.2 Exception Processing
      4. 14.3 The Boot Process
      5. 14.4 Writing a Bare-Metal Program
      6. 14.5 Using an Interrupt
      7. 14.6 ARM Processor Profiles
      8. 14.7 Chapter Summary
      9. Exercises
  14. Index

Product information

  • Title: Modern Assembly Language Programming with the ARM Processor
  • Author(s): Larry D Pyeatt
  • Release date: May 2016
  • Publisher(s): Newnes
  • ISBN: 9780128037164