Muutke küpsiste eelistusi

E-raamat: Modern Assembly Language Programming with the ARM Processor

(Department of Electrical Engineering and Computer Science, South Dakota School of Mines and Technology, USA)
  • Formaat: PDF+DRM
  • Ilmumisaeg: 03-May-2016
  • Kirjastus: Newnes (an imprint of Butterworth-Heinemann Ltd )
  • Keel: eng
  • ISBN-13: 9780128037164
  • Formaat - PDF+DRM
  • Hind: 66,87 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Ilmumisaeg: 03-May-2016
  • Kirjastus: Newnes (an imprint of Butterworth-Heinemann Ltd )
  • Keel: eng
  • ISBN-13: 9780128037164

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Modern Assembly Language Programming with the ARM Processor carefully explains the concepts of assembly language programming, slowly building from simple examples towards complex programming on bare-metal embedded systems. Considerable emphasis is put on showing how to develop good, structured assembly code. More advanced topics, such as fixed and floating point mathematics, optimization, and the ARM VFP and NEON extensions are also covered, helping users understand representations of, and arithmetic operations on, integral and real numbers in any base, gain a basic understanding of processor architectures and instruction sets, write ARM assembly language programs, quickly learn any new assembly language, implement the procedures and mechanisms for handling interrupt processing and performing, interface assembly language with high-level languages such as C/C++, and explore ethical issues involving safety-critical applications.Concepts are illustrated and reinforced with a large number of tested and debugged assembly and C source listingIntended 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 toolsIncludes discussions of advanced topics, such as fixed and floating point mathematics, optimization, and the ARM VFP and NEON extensions

Muu info

Quickly master good structured assembly language programming practices with this tutorial-based book that carefully explains the concepts of assembly language programming, slowly building from simple examples towards complex programming on bare-metal embedded systems
List of Tables xiii
List of Figures xv
List of Listings xvii
Preface xxi
Companion Website xxv
Acknowledgments xxvii
Part I Assembly As A Language 1(168)
Chapter 1 Introduction
3(32)
1.1 Reasons to Learn Assembly
4(4)
1.2 The ARM Processor
8(1)
1.3 Computer Data
9(19)
1.3.1 Representing Natural Numbers
9(2)
1.3.2 Base Conversion
11(4)
1.3.3 Representing Integers
15(5)
1.3.4 Representing Characters
20(8)
1.4 Memory Layout of an Executing Program
28(3)
1.5
Chapter Summary
31(4)
Chapter 2 GNU Assembly Syntax
35(18)
2.1 Structure of an Assembly Program
36(2)
2.1.1 Labels
37(1)
2.1.2 Comments
37(1)
2.1.3 Directives
37(1)
2.1.4 Assembly Instructions
38(1)
2.2 What the Assembler Does
38(2)
2.3 GNU Assembly Directives
40(10)
2.3.1 Selecting the Current Section
40(1)
2.3.2 Allocating Space for Variables and Constants
41(2)
2.3.3 Filling and Aligning
43(2)
2.3.4 Setting and Manipulating Symbols
45(1)
2.3.5 Conditional Assembly
46(1)
2.3.6 Including Other Source Files
47(1)
2.3.7 Macros
48(2)
2.4
Chapter Summary
50(3)
Chapter 3 Load/Store and Branch Instructions
53(26)
3.1 CPU Components and Data Paths
54(1)
3.2 ARM User Registers
55(3)
3.3 Instruction Components
58(2)
3.3.1 Setting and Using Condition Flags
58(1)
3.3.2 Immediate Values
59(1)
3.4 Load/Store Instructions
60(10)
3.4.1 Addressing Modes
61(3)
3.4.2 Load/Store Single Register
64(1)
3.4.3 Load/Store Multiple Registers
65(3)
3.4.4 Swap
68(1)
3.4.5 Exclusive Load/Store
69(1)
3.5 Branch Instructions
70(3)
3.5.1 Branch
70(1)
3.5.2 Branch and Link
71(2)
3.6 Pseudo-Instructions
73(3)
3.6.1 Load Immediate
73(2)
3.6.2 Load Address
75(1)
3.7
Chapter Summary
76(3)
Chapter 4 Data Processing and Other Instructions
79(20)
4.1 Data Processing Instructions
79(11)
4.1.1 Operand2
80(1)
4.1.2 Comparison Operations
81(2)
4.1.3 Arithmetic Operations
83(2)
4.1.4 Logical Operations
85(1)
4.1.5 Data Movement Operations
86(1)
4.1.6 Multiply Operations with 32-bit Results
87(1)
4.1.7 Multiply Operations with 64-bit Results
88(1)
4.1.8 Division Operations
89(1)
4.2 Special Instructions
90(3)
4.2.1 Count Leading Zeros
90(1)
4.2.2 Accessing the CPSR and SPSR
91(1)
4.2.3 Software Interrupt
91(1)
4.2.4 Thumb Mode
92(1)
4.3 Pseudo-Instructions
93(2)
4.3.1 No Operation
93(1)
4.3.2 Shifts
94(1)
4.4 Alphabetized List of ARM Instructions
95(1)
4.5
Chapter Summary
96(3)
Chapter 5 Structured Programming
99(38)
5.1 Sequencing
100(1)
5.2 Selection
101(3)
5.2.1 Using Conditional Execution
101(1)
5.2.2 Using Branch Instructions
102(1)
5.2.3 Complex Selection
103(1)
5.3 Iteration
104(4)
5.3.1 Pre-Test Loop
105(1)
5.3.2 Post-Test Loop
106(1)
5.3.3 For Loop
106(2)
5.4 Subroutines
108(15)
5.4.1 Advantages of Subroutines
109(1)
5.4.2 Disadvantages of Subroutines
110(1)
5.4.3 Standard C Library Functions
110(1)
5.4.4 Passing Arguments
110(3)
5.4.5 Calling Subroutines
113(4)
5.4.6 Writing Subroutines
117(1)
5.4.7 Automatic Variables
118(1)
5.4.8 Recursive Functions
119(4)
5.5 Aggregate Data Types
123(8)
5.5.1 Arrays
124(1)
5.5.2 Structured Data
124(2)
5.5.3 Arrays of Structured Data
126(5)
5.6
Chapter Summary
131(6)
Chapter 6 Abstract Data Types
137(32)
6.1 ADTs in Assembly Language
138(1)
6.2 Word Frequency Counts
139(22)
6.2.1 Sorting by Word Frequency
147(3)
6.2.2 Better Performance
150(11)
6.3 Ethics Case Study: Therac-25
161(4)
6.3.1 History of the Therac-25
162(1)
6.3.2 Overview of Design Flaws
163(2)
6.4
Chapter Summary
165(4)
Part II Performance Mathematics 169(194)
Chapter 7 Integer Mathematics
171(48)
7.1 Subtraction by Addition
172(1)
7.2 Binary Multiplication
172(9)
7.2.1 Multiplication by a Power of Two
173(1)
7.2.2 Multiplication of Two Variables
173(4)
7.2.3 Multiplication of a Variable by a Constant
177(1)
7.2.4 Signed Multiplication
178(1)
7.2.5 Multiplying Large Numbers
179(2)
7.3 Binary Division
181(14)
7.3.1 Division by a Power of Two
181(1)
7.3.2 Division by a Variable
182(8)
7.3.3 Division by a Constant
190(4)
7.3.4 Dividing Large Numbers
194(1)
7.4 Big Integer ADT
195(21)
7.5
Chapter Summary
216(3)
Chapter 8 Non-Integral Mathematics
219(46)
8.1 Base Conversion of Fractional Numbers
220(3)
8.1.1 Arbitrary Base to Decimal
220(1)
8.1.2 Decimal to Arbitrary Base
220(3)
8.2 Fractions and Bases
223(3)
8.3 Fixed-Point Numbers
226(5)
8.3.1 Interpreting Fixed-Point Numbers
226(4)
8.3.2 Q Notation
230(1)
8.3.3 Properties of Fixed-Point Numbers
230(1)
8.4 Fixed-Point Operations
231(11)
8.4.1 Fixed-Point Addition and Subtraction
231(1)
8.4.2 Fixed Point Multiplication
232(2)
8.4.3 Fixed Point Division
234(2)
8.4.4 Division by a Constant
236(6)
8.5 Floating Point Numbers
242(4)
8.5.1 IEEE 754 Half-Precision
243(2)
8.5.2 IEEE 754 Single-Precision
245(1)
8.5.3 IEEE 754 Double-Precision
245(1)
8.5.4 IEEE 754 Quad-Precision
246(1)
8.6 Floating Point Operations
246(1)
8.6.1 Floating Point Addition and Subtraction
246(1)
8.6.2 Floating Point Multiplication and Division
247(1)
8.7 Computing Sine and Cosine
247(14)
8.7.1 Formats for the Powers of x
248(1)
8.7.2 Formats and Constants for the Factorial Terms
249(2)
8.7.3 Putting it All Together
251(8)
8.7.4 Performance Comparison
259(2)
8.8 Ethics Case Study: Patriot Missile Failure
261(2)
8.9
Chapter Summary
263(2)
Chapter 9 The ARM Vector Floating Point Coprocessor
265(32)
9.1 Vector Floating Point Overview
266(2)
9.2 Floating Point Status and Control Register
268(5)
9.2.1 Performance Versus Compliance
271(1)
9.2.2 Vector Mode
272(1)
9.3 Register Usage Rules
273(1)
9.4 Load/Store Instructions
274(3)
9.4.1 Load/Store Single Register
274(1)
9.4.2 Load/Store Multiple Registers
275(2)
9.5 Data Processing Instructions
277(2)
9.5.1 Copy, Absolute Value, Negate, and Square Root
277(1)
9.5.2 Add, Subtract, Multiply, and Divide
278(1)
9.5.3 Compare
279(1)
9.6 Data Movement Instructions
279(3)
9.6.1 Moving Between Two VFP Registers
279(1)
9.6.2 Moving Between VFP Register and One Integer Register
280(1)
9.6.3 Moving Between VFP Register and Two Integer Registers
281(1)
9.6.4 Move Between ARM Register and VFP System Register
282(1)
9.7 Data Conversion Instructions
282(3)
9.7.1 Convert Between Floating Point and Integer
282(2)
9.7.2 Convert Between Fixed Point and Single Precision
284(1)
9.8 Floating Point Sine Function
285(7)
9.8.1 Sine Function Using Scalar Mode
285(2)
9.8.2 Sine Function Using Vector Mode
287(4)
9.8.3 Performance Comparison
291(1)
9.9 Alphabetized List of VFP Instructions
292(1)
9.10
Chapter Summary
293(4)
Chapter 10 The ARM NEON Extensions
297(66)
10.1 NEON Intrinsics
299(1)
10.2 Instruction Syntax
299(3)
10.3 Load and Store Instructions
302(7)
10.3.1 Load or Store Single Structure Using One Lane
303(2)
10.3.2 Load Copies of a Structure to All Lanes
305(2)
10.3.3 Load or Store Multiple Structures
307(2)
10.4 Data Movement Instructions
309(12)
10.4.1 Moving Between NEON Scalar and Integer Register
309(1)
10.4.2 Move Immediate Data
310(1)
10.4.3 Change Size of Elements in a Vector
311(1)
10.4.4 Duplicate Scalar
312(1)
10.4.5 Extract Elements
313(1)
10.4.6 Reverse Elements
314(1)
10.4.7 Swap Vectors
315(1)
10.4.8 Transpose Matrix
316(1)
10.4.9 Table Lookup
317(2)
10.4.10 Zip or Unzip Vectors
319(2)
10.5 Data Conversion
321(1)
10.5.1 Convert Between Fixed Point and Single-Precision
321(1)
10.5.2 Convert Between Half-Precision and Single-Precision
322(1)
10.6 Comparison Operations
322(4)
10.6.1 Vector Compare
323(1)
10.6.2 Vector Absolute Compare
324(1)
10.6.3 Vector Test Bits
325(1)
10.7 Bitwise Logical Operations
326(3)
10.7.1 Bitwise Logical Operations
326(1)
10.7.2 Bitwise Logical Operations with Immediate Data
327(1)
10.7.3 Bitwise Insertion and Selection
328(1)
10.8 Shift Instructions
329(6)
10.8.1 Shift Left by Immediate
329(1)
10.8.2 Shift Left or Right by Variable
330(1)
10.8.3 Shift Right by Immediate
331(1)
10.8.4 Saturating Shift Right by Immediate
332(1)
10.8.5 Shift and Insert
333(2)
10.9 Arithmetic Instructions
335(8)
10.9.1 Vector Add and Subtract
335(1)
10.9.2 Vector Add and Subtract with Narrowing
336(1)
10.9.3 Add or Subtract and Divide by Two
337(1)
10.9.4 Add Elements Pairwise
338(1)
10.9.5 Absolute Difference
339(1)
10.9.6 Absolute Value and Negate
340(1)
10.9.7 Get Maximum or Minimum Elements
341(1)
10.9.8 Count Bits
342(1)
10.10 Multiplication and Division
343(8)
10.10.1 Multiply
343(2)
10.10.2 Multiply by Scalar
345(1)
10.10.3 Fused Multiply Accumulate
346(1)
10.10.4 Saturating Multiply and Double (Low)
347(1)
10.10.5 Saturating Multiply and Double (High)
348(1)
10.10.6 Estimate Reciprocals
348(1)
10.10.7 Reciprocal Step
349(2)
10.11 Pseudo-Instructions
351(3)
10.11.1 Load Constant
351(1)
10.11.2 Bitwise Logical Operations with Immediate Data
352(1)
10.11.3 Vector Absolute Compare
353(1)
10.12 Performance Mathematics: A Final Look at Sine
354(4)
10.12.1 Single Precision
354(1)
10.12.2 Double Precision
355(2)
10.12.3 Performance Comparison
357(1)
10.13 Alphabetized List of NEON Instructions
358(3)
10.14
Chapter Summary
361(2)
Part III Accessing Devices 363(104)
Chapter 11 Devices
365(30)
11.1 Accessing Devices Directly Under Linux
365(11)
11.2 General Purpose Digital Input/Output
376(16)
11.2.1 Raspberry Pi GPIO
378(4)
11.2.2 pcDuino GPIO
382(10)
11.3
Chapter Summary
392(3)
Chapter 12 Pulse Modulation
395(10)
12.1 Pulse Density Modulation
396(1)
12.2 Pulse Width Modulation
397(1)
12.3 Raspberry Pi PWM Device
398(2)
12.4 pcDuino PWM Device
400(3)
12.5
Chapter Summary
403(2)
Chapter 13 Common System Devices
405(26)
13.1 Clock Management Device
405(4)
13.1.1 Raspberry Pi Clock Manager
406(3)
13.1.2 pcDuino Clock Control Unit
409(1)
13.2 Serial Communications
409(20)
13.2.1 UART
410(3)
13.2.2 Raspberry Pi UARTO
413(5)
13.2.3 Basic Programming for the Raspberry Pi UART
418(4)
13.2.4 pcDuino UART
422(7)
13.3
Chapter Summary
429(2)
Chapter 14 Running Without an Operating System
431(36)
14.1 ARM CPU Modes
432(2)
14.2 Exception Processing
434(8)
14.2.1 Handling Exceptions
438(4)
14.3 The Boot Process
442(1)
14.4 Writing a Bare-Metal Program
442(7)
14.4.1 Startup Code
443(2)
14.4.2 Main Program
445(2)
14.4.3 The Linker Script
447(2)
14.4.4 Putting it All Together
449(1)
14.5 Using an Interrupt
449(12)
14.5.1 Startup Code
449(1)
14.5.2 Interrupt Controllers
449(9)
14.5.3 Timers
458(3)
14.5.4 Exception Handling
461(1)
14.5.5 Building the Interrupt-Driven Program
461(1)
14.6 ARM Processor Profiles
461(3)
14.7
Chapter Summary
464(3)
Index 467
Larry Pyeatt earned his doctorate in Computer Science, focusing on Artificial Intelligence, from Colorado State University in 1999. He spent 13 years as a professor at Texas Tech University before moving to the South Dakota School of Mines and Technology in 2012. He has programmed in over 15 assembly languages, from mainframes to 8-bit embedded systems, and teaches a variety of courses including assembly language, operating systems, computer architecture, and probabilistic artificial intelligence.