Front cover image for Modern assembly language programming with the ARM processor

Modern assembly language programming with the ARM processor

Larry D. Pyeatt (Author)
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
eBook, English, 2016
Newnes, London, UK, 2016
1 online resource
9780128037164, 0128037164
948780270
Front Cover; Modern Assembly Language Programming with the ARM Processor; Copyright; Contents; List of Tables; List of Figures; List of Listings; Preface; Choice of Processor Family; General Approach; Companion Website; Acknowledgments; Part I: Assembly as a Language; Chapter 1: Introduction; 1.1 Reasons to Learn Assembly; 1.2 The ARM Processor; 1.3 Computer Data; 1.3.1 Representing Natural Numbers; 1.3.2 Base Conversion; Base b to decimal; Decimal to base b; Conversion between arbitrary bases; Bases that are powers-of-two; 1.3.3 Representing Integers; Sign-magnitude representation. Excess-(2n-1 -1) representationComplement representation; 1.3.4 Representing Characters; Non-printing characters; Converting character strings to ASCII codes; Interpreting data as ASCII strings; ISO extensions to ASCII; Unicode and UTF-8; 1.4 Memory Layout of an Executing Program; 1.5 Chapter Summary; Exercises; Chapter 2: GNU Assembly Syntax; 2.1 Structure of an Assembly Program; 2.1.1 Labels; 2.1.2 Comments; 2.1.3 Directives; 2.1.4 Assembly Instructions; 2.2 What the Assembler Does; 2.3. GNU Assembly Directives; 2.3.1 Selecting the Current Section. 2.3.2 Allocating Space for Variables and Constants2.3.3 Filling and Aligning; 2.3.4 Setting and Manipulating Symbols; 2.3.5 Conditional Assembly; 2.3.6 Including Other Source Files; 2.3.7 Macros; Macro example; Recursive macro example; 2.4 Chapter Summary; Exercises; Chapter 3: Load/Store and Branch Instructions; 3.1 CPU Components and Data Paths; 3.2 ARM User Registers; 3.3 Instruction Components; 3.3.1 Setting and Using Condition Flags; 3.3.2 Immediate Values; 3.4 Load/Store Instructions; 3.4.1 Addressing Modes; 3.4.2 Load/Store Single Register; Syntax; Operations; Examples. 3.4.3 Load/Store Multiple RegistersSyntax; Operations; Examples; 3.4.4 Swap; Syntax; Operations; Example; 3.4.5 Exclusive Load/Store; Syntax; Operations; Example; 3.5 Branch Instructions; 3.5.1 Branch; Syntax; Operations; Examples; 3.5.2 Branch and Link; Syntax; Operations; Examples; 3.6 Pseudo-Instructions; 3.6.1 Load Immediate; Syntax; Operations; Example; 3.6.2 Load Address; Syntax; Operations; Examples; 3.7 Chapter Summary; Exercises; Chapter 4: Data Processing and Other Instructions; 4.1 Data Processing Instructions; 4.1.1 Operand2; 4.1.2 Comparison Operations; Syntax; Operations. Examples4.1.3 Arithmetic Operations; Syntax; Operations; Examples; 4.1.4 Logical Operations; Syntax; Operations; Examples; 4.1.5 Data Movement Operations; Syntax; Operations; Examples; 4.1.6 Multiply Operations with 32-bit Results; Syntax; Operations; Examples; 4.1.7 Multiply Operations with 64-bit Results; Syntax; Operations; Examples; 4.1.8 Division Operations; Syntax; Operations; Examples; 4.2 Special Instructions; 4.2.1 Count Leading Zeros; Syntax; Operations; Example; 4.2.2 Accessing the CPSR and SPSR; Syntax; Operations; Examples; 4.2.3 Software Interrupt; Syntax; Operations; Example
Includes index