Book description
Designed as a tutorial, this book explains how to write programs in the X86 language, the C programming language, and the X86 assembly language modules embedded in a C program. It presents the general computer architecture of the X86 microprocessor, individual addressing modes, stack operations, procedures, arrays, macros, and input/output operations. The book also details the most commonly used X86 assembly language instructions. A wealth of program design examples-including the complete assembly language code and actual outputs-help you grasp the concepts more easily.
Table of contents
- Preliminaries
- By the same Author
- Preface
- Chapter 1 Number Systems and Number Representations
-
Chapter 2 X86 Processor Architecture
- 2.1 General Architecture
- 2.2 Arithmetic and Logic Unit
- 2.3 Control Unit
- 2.4 Memory Unit
- 2.5 Input/Output
- 2.6 Register Set
- 2.7 Translation Lookaside Buffer
- 2.8 The Assembler
- 2.9 Problems
-
- Figure 2.1
- Figure 2.2
- Figure 2.3
- Figure 2.4
- Figure 2.5
- Figure 2.6
- Figure 2.7
- Figure 2.8
- Figure 2.9
- Figure 2.10
- Figure 2.11
- Figure 2.12
- Figure 2.13
- Figure 2.14
- Figure 2.15
- Figure 2.16
- Figure 2.17
- Figure 2.18
- Figure 2.19
- Figure 2.20
- Figure 2.21
- Figure 2.22
- Figure 2.23
- Figure 2.24
- Figure 2.25
- Figure 2.26
- Figure 2.27
- Figure 2.28
-
Chapter 3 Addressing Modes
- 3.1 Register Addressing
- 3.2 Immediate Addressing
- 3.3 Direct Memory Addressing
- 3.4 Base (Register Indirect) Memory Addressing
- 3.5 Base or Index Plus Displacement Addressing
- 3.6 Base and Index Plus Displacement Addressing
- 3.7 Scale Factor
- 3.8 Segment Override Prefix
- 3.9 X86 Operation Modes
- 3.10 Problems
-
Chapter 4 C Programming Fundamentals
- 4.1 Structure of a C Program
- 4.2 Variables and Constants
- 4.3 Input and Output
- 4.4 Operators
- 4.5 While Loop
- 4.6 For Loop
- 4.7 Additional C Constructs
- 4.8 Problems
-
- Figure 4.1
- Figure 4.2
- Figure 4.3
- Figure 4.4
- Figure 4.5
- Figure 4.6
- Figure 4.7
- Figure 4.8
- Figure 4.9
- Figure 4.10
- Figure 4.11
- Figure 4.12
- Figure 4.13
- Figure 4.14
- Figure 4.15
- Figure 4.16
- Figure 4.17
- Figure 4.18
- Figure 4.19
- Figure 4.20
- Figure 4.21
- Figure 4.22
- Figure 4.23
- Figure 4.24
- Figure 4.25
- Figure 4.26
- Figure 4.27
- Figure 4.28
- Figure 4.29
- Figure 4.30
- Figure 4.31
- Figure 4.32
- Figure 4.33
- Figure 4.34
- Figure 4.35
- Figure 4.36
- Figure 4.37
- Figure 4.38
- Figure 4.39
- Figure 4.40
- Figure 4.41
- Figure 4.42
- Figure 4.43
- Figure 4.44
- Figure 4.45
- Figure 4.46
- Figure 4.47
- Figure 4.48
- Figure 4.49
- Figure 4.50
- Figure 4.51
- Figure 4.52
- Figure 4.53
- Figure 4.54
- Figure 4.55
- Figure 4.56
- Chapter 5 Data Transfer Instructions
- Chapter 6 Branching and Looping Instructions
- Chapter 7 Stack Operations
-
Chapter 8 Logical, Bit, Shift, and Rotate Instructions
- 8.1 Logical AND Instruction
- 8.2 Logical Inclusive-OR Instruction
- 8.3 Logical Exclusive-OR Instruction
- 8.4 Logical NOT Instruction — 1s Complement
- 8.5 NEG Instruction — 2s Complement
- 8.6 TEST and Set Byte on Condition Instructions
- 8.7 Bit Test Instructions
- 8.8 Bit Scan Instructions
- 8.9 Shift Instructions
- 8.10 Rotate Instructions
- 8.11 Problems
-
- Figure 8.1
- Figure 8.2
- Figure 8.3
- Figure 8.4
- Figure 8.5
- Figure 8.6
- Figure 8.7
- Figure 8.8
- Figure 8.9
- Figure 8.10
- Figure 8.11
- Figure 8.12
- Figure 8.13
- Figure 8.14
- Figure 8.15
- Figure 8.16
- Figure 8.17
- Figure 8.18
- Figure 8.19
- Figure 8.20
- Figure 8.21
- Figure 8.22
- Figure 8.23
- Figure 8.24
- Figure 8.25
- Figure 8.26
- Figure 8.27
- Figure 8.28
- Figure 8.29
- Figure 8.30
- Figure 8.31
- Figure 8.32
-
Chapter 9 Fixed-Point Arithmetic Instructions
- 9.1 Addition
- 9.2 Subtraction
- 9.3 Multiplication
- 9.4 Division
- 9.5 Problems
-
- Figure 9.1
- Figure 9.2
- Figure 9.3
- Figure 9.4
- Figure 9.5
- Figure 9.6
- Figure 9.7
- Figure 9.8
- Figure 9.9
- Figure 9.10
- Figure 9.11
- Figure 9.12
- Figure 9.13
- Figure 9.14
- Figure 9.15
- Figure 9.16
- Figure 9.17
- Figure 9.18
- Figure 9.19
- Figure 9.20
- Figure 9.21
- Figure 9.22
- Figure 9.23
- Figure 9.24
- Figure 9.25
- Figure 9.26
- Figure 9.27
- Figure 9.28
-
Chapter 10 Binary-Coded Decimal Arithmetic Instructions
- 10.1 ASCII Adjust After Addition (AAA) Instruction
- 10.2 Decimal Adjust AL after Addition (DAA) Instruction
- 10.3 ASCII Adjust AL after Subtraction (AAS) Instruction
- 10.4 Decimal Adjust AL after Subtraction (DAS) Instruction
- 10.5 ASCII Adjust AX after Multiplication (AAM) Instruction
- 10.6 ASCII Adjust AX before Division (AAD) Instruction
- 10.7 Problems
-
Chapter 11 Floating-Point Arithmetic Instructions
- 11.1 Floating-Point Fundamentals
- 11.2 Load Data Instructions
-
11.3 Store Data Instructions
- 11.3.1 Store BCD Integer and Pop (FBSTP) Instruction
- 11.3.2 Store Integer (FIST) Instruction
- 11.3.3 Store Integer and Pop (FISTP) Instruction
- 11.3.4 Store Integer with Truncation and Pop (FISTTP) Instruction
- 11.3.5 Store Floating-Point Value (FST) Instruction
- 11.3.6 Store Floating-Point Value and Pop (FSTP) Instruction
- 11.3.7 Store X87 FPU Control Word (FSTCW) Instruction
- 11.3.8 Store X87 FPU Environment (FSTENV) Instruction
- 11.3.9 Store X87 FPU Status Word (FSTSW) Instruction
- 11.4 Addition Instructions
- 11.5 Subtraction Instructions
- 11.6 Multiplication Instructions
- 11.7 Division Instructions
- 11.8 Compare Instructions
- 11.9 Trigonometric Instructions
- 11.10 Additional Instructions
- 11.11 Problems
-
- Figure 11.1
- Figure 11.2
- Figure 11.3
- Figure 11.4
- Figure 11.5
- Figure 11.6
- Figure 11.7
- Figure 11.8
- Figure 11.9
- Figure 11.10
- Figure 11.11
- Figure 11.12
- Figure 11.13
- Figure 11.14
- Figure 11.15
- Figure 11.16
- Figure 11.17
- Figure 11.18
- Figure 11.19
- Figure 11.20
- Figure 11.21
- Figure 11.22
- Figure 11.23
- Figure 11.24
- Figure 11.25
- Figure 11.26
- Figure 11.27
- Figure 11.28
- Figure 11.29
- Figure 11.30
- Figure 11.31
- Figure 11.32
- Figure 11.33
- Figure 11.34
- Figure 11.35
- Figure 11.36
- Figure 11.37
- Figure 11.38
- Chapter 12 Procedures
- Chapter 13 String Instructions
- Chapter 14 Arrays
- Chapter 15 Macros
- Chapter 16 Interrupts and Input/Output Operations
-
Chapter 17 Additional Programming Examples
- 17.1 Programming Examples
- 17.2 Problems
-
- Figure 17.1
- Figure 17.2
- Figure 17.3
- Figure 17.4
- Figure 17.5
- Figure 17.6
- Figure 17.7
- Figure 17.8
- Figure 17.9
- Figure 17.10
- Figure 17.11
- Figure 17.12
- Figure 17.13
- Figure 17.14
- Figure 17.15
- Figure 17.16
- Figure 17.17
- Figure 17.18
- Figure 17.19
- Figure 17.20
- Figure 17.21
- Figure 17.22
- Figure 17.23
- Figure 17.24
- Figure 17.25
- Figure 17.26
- Appendix A ASCII Character Codes
-
Appendix B Answers to Select Problems
- Chapter 1 Number Systems and Number Representations
- Chapter 2 X86 Processor Architecture
- Chapter 3 Addressing Modes
- Chapter 4 C Programming Fundamentals
- Chapter 5 Data Transfer Instructions
- Chapter 6 Branching and Looping Instructions
- Chapter 7 Stack Operations
- Chapter 8 Logical, Bit, Shift, and Rotate Instructions
- Chapter 9 Fixed-Point Arithmetic Instructions
- Chapter 10 Binary-Coded Decimal Arithmetic Instructions
- Chapter 11 Floating-Point Arithmetic Instructions
- Chapter 12 Procedures
- Chapter 13 String Instructions
- Chapter 14 Arrays
- Chapter 15 Macros
- Chapter 16 Interrupts and Input/Output Operations
- Chapter 17 Additional Programming Examples
Product information
- Title: X86 Assembly Language and C Fundamentals
- Author(s):
- Release date: January 2013
- Publisher(s): CRC Press
- ISBN: 9781498759748
You might also like
book
Modern X86 Assembly Language Programming: 32-bit, 64-bit, SSE, and AVX
shows the fundamentals of x86 assembly language programming. It focuses on the aspects of the x86 …
book
Modern X86 Assembly Language Programming: Covers x86 64-bit, AVX, AVX2, and AVX-512
Gain the fundamentals of x86 64-bit assembly language programming and focus on the updated aspects of …
book
Computer Fundamentals and Programming in C (RMK)
Computer Fundamentals and Programming in C, with its abounding, extensive chapter-end questions and unique pedagogy, is …
book
Modern Arm Assembly Language Programming: Covers Armv8-A 32-bit, 64-bit, and SIMD
Gain the fundamentals of Armv8-A 32-bit and 64-bit assembly language programming. This book emphasizes Armv8-A assembly …