|
|
xi | |
|
|
xiii | |
Preface |
|
|
|
1 | (32) |
|
1.1 Reasons to learn assembly |
|
|
2 | (3) |
|
|
5 | (2) |
|
|
7 | (20) |
|
1.4 Memory layout of an executing program |
|
|
27 | (2) |
|
|
29 | (1) |
|
|
30 | (3) |
|
Chapter 2 GNU assembly syntax |
|
|
33 | (20) |
|
2.1 Structure of an assembly program |
|
|
33 | (3) |
|
2.2 What the assembler does |
|
|
36 | (1) |
|
2.3 GNU assembly directives |
|
|
37 | (12) |
|
|
49 | (1) |
|
|
49 | (4) |
|
Chapter 3 Load/store and branch instructions |
|
|
53 | (30) |
|
3.1 CPU components and data paths |
|
|
53 | (1) |
|
3.2 AArch64 user registers |
|
|
54 | (4) |
|
3.3 Instruction components |
|
|
58 | (7) |
|
3.4 Load and store instructions |
|
|
65 | (5) |
|
|
70 | (10) |
|
|
80 | (1) |
|
|
80 | (3) |
|
Chapter 4 Data processing and other instructions |
|
|
83 | (30) |
|
|
83 | (3) |
|
4.2 Data processing instructions |
|
|
86 | (18) |
|
|
104 | (4) |
|
4.4 Alphabetized list of AArch64 instructions |
|
|
108 | (2) |
|
|
110 | (1) |
|
|
110 | (3) |
|
Chapter 5 Structured programming |
|
|
113 | (42) |
|
|
114 | (1) |
|
|
114 | (5) |
|
|
119 | (5) |
|
|
124 | (18) |
|
|
142 | (6) |
|
|
148 | (2) |
|
|
150 | (5) |
|
Chapter 6 Abstract data types |
|
|
155 | (1) |
|
6.1 ADTs in assembly language |
|
|
155 | (3) |
|
6.2 Word frequency counts |
|
|
158 | (20) |
|
6.3 Ethics case study: Therac-25 |
|
|
178 | (5) |
|
|
183 | (1) |
|
|
183 | (4) |
|
Chapter 7 Integer mathematics |
|
|
187 | (1) |
|
7.1 Subtraction by addition |
|
|
187 | (2) |
|
7.2 Binary multiplication |
|
|
189 | (9) |
|
|
198 | (14) |
|
|
212 | (24) |
|
|
236 | (1) |
|
|
236 | (3) |
|
Chapter 8 Non-integral mathematics |
|
|
239 | (54) |
|
8.1 Base conversion of fractional numbers |
|
|
239 | (4) |
|
|
243 | (3) |
|
|
246 | (6) |
|
8.4 Fixed point operations |
|
|
252 | (11) |
|
8.5 Fixed point input and output |
|
|
263 | (4) |
|
8.6 Computing sine and cosine |
|
|
267 | (16) |
|
8.7 Floating point numbers |
|
|
283 | (4) |
|
8.8 Floating point operations |
|
|
287 | (1) |
|
8.9 Ethics case study: patriot missile failure |
|
|
288 | (2) |
|
|
290 | (1) |
|
|
291 | (2) |
|
|
293 | (30) |
|
9.1 Floating point overview |
|
|
293 | (3) |
|
|
296 | (1) |
|
9.3 Floating point control and status registers |
|
|
296 | (3) |
|
9.4 Load/store instructions |
|
|
299 | (3) |
|
9.5 Data movement instructions |
|
|
302 | (2) |
|
9.6 Data conversion instructions |
|
|
304 | (3) |
|
9.7 Data processing instructions |
|
|
307 | (7) |
|
9.8 Floating point sine function |
|
|
314 | (3) |
|
9.9 Alphabetized list of FP/NEON instructions |
|
|
317 | (2) |
|
|
319 | (1) |
|
|
319 | (4) |
|
Chapter 10 Advanced SIMD instructions |
|
|
323 | (82) |
|
|
323 | (3) |
|
10.2 Load and store instructions |
|
|
326 | (7) |
|
10.3 Data movement instructions |
|
|
333 | (9) |
|
|
342 | (4) |
|
10.5 Bitwise logical operations |
|
|
346 | (2) |
|
10.6 Basic arithmetic instructions |
|
|
348 | (13) |
|
10.7 Multiplication and division |
|
|
361 | (11) |
|
|
372 | (10) |
|
|
382 | (3) |
|
10.10 Vector reduce instructions |
|
|
385 | (3) |
|
10.11 Comparison operations |
|
|
388 | (5) |
|
10.12 Performance mathematics: a final look at sine |
|
|
393 | (4) |
|
10.13 Alphabetized list of advanced SIMD instructions |
|
|
397 | (6) |
|
10.14 Advanced SIMD intrinsics |
|
|
403 | (1) |
|
|
403 | (1) |
|
|
404 | (1) |
|
|
405 | (40) |
|
11.1 Accessing devices directly under Linux |
|
|
405 | (7) |
|
11.2 General purpose digital input/output |
|
|
412 | (8) |
|
|
420 | (6) |
|
11.4 Common system devices |
|
|
426 | (4) |
|
11.5 Serial communications |
|
|
430 | (12) |
|
|
442 | (1) |
|
|
443 | (2) |
|
Chapter 12 Running without an operating system |
|
|
445 | (36) |
|
12.1 Exception processing |
|
|
446 | (1) |
|
12.2 AArch64 execution and exception states |
|
|
447 | (4) |
|
12.3 AArch64 vector table |
|
|
451 | (6) |
|
|
457 | (1) |
|
12.5 Writing a bare metal program |
|
|
457 | (9) |
|
|
466 | (11) |
|
12.7 ARM processor profiles |
|
|
477 | (1) |
|
|
478 | (1) |
|
|
478 | (3) |
Index |
|
481 | |