X86 Assembly Language and C Fundamentals  book cover
1st Edition

X86 Assembly Language and C Fundamentals

ISBN 9781466568242
Published January 22, 2013 by CRC Press
816 Pages 337 B/W Illustrations

FREE Standard Shipping
USD $170.00

Prices & shipping based on shipping country


Book Description

The predominant language used in embedded microprocessors, assembly language lets you write programs that are typically faster and more compact than programs written in a high-level language and provide greater control over the program applications. Focusing on the languages used in X86 microprocessors, X86 Assembly Language and C Fundamentals explains how to write programs in the X86 assembly language, the C programming language, and X86 assembly language modules embedded in a C program. A wealth of program design examples, including the complete code and outputs, help you grasp the concepts more easily. Where needed, the book also details the theory behind the design.

Learn the X86 Microprocessor Architecture and Commonly Used Instructions

Assembly language programming requires knowledge of number representations, as well as the architecture of the computer on which the language is being used. After covering the binary, octal, decimal, and hexadecimal number systems, the book presents the general architecture of the X86 microprocessor, individual addressing modes, stack operations, procedures, arrays, macros, and input/output operations. It highlights the most commonly used X86 assembly language instructions, including data transfer, branching and looping, logic, shift and rotate, and string instructions, as well as fixed-point, binary-coded decimal (BCD), and floating-point arithmetic instructions.

Get a Solid Foundation in a Language Commonly Used in Digital Hardware

Written for students in computer science and electrical, computer, and software engineering, the book assumes a basic background in C programming, digital logic design, and computer architecture. Designed as a tutorial, this comprehensive and self-contained text offers a solid foundation in assembly language for anyone working with the design of digital hardware.

Table of Contents

Number Systems and Number Representations
Number Systems
Number Representations

X86 Processor Architecture
General Architecture
Arithmetic and Logic Unit
Control Unit
Memory Unit
Register Set
Translation Lookaside Buffer
The Assembler

Addressing Modes
Register Addressing
Immediate Addressing
Direct Memory Addressing
Base (Register Indirect) Memory Addressing
Base or Index Plus Displacement Addressing
Base and Index Plus Displacement Addressing
Scale Factor
Segment Override Prefix
X86 Operation Modes

C Programming Fundamentals
Structure of a C Program
Variables and Constants
Input and Output
While Loop
For Loop
Additional C Constructs

Data Transfer Instructions
Data Types
Move Instructions
Load Effective Address
Load Segment Registers
Exchange Instructions
Conversion Instructions

Branching and Looping Instructions
Branching Instructions
Looping Instructions

Stack Operations
Stack Structure
Additional Push Instructions
Additional Pop Instructions

Logic, Bit, Shift, and Rotate Instructions
Logical AND Instruction
Logical Inclusive-OR Instruction
Logical Exclusive-OR Instruction
Logical NOT Instruction — 1s Complement
NEG Instruction — 2s Complement
TEST and Byte Set on Condition Instructions
Bit Test Instructions
Bit Scan Instructions
Shift Instructions
Rotate Instructions

Fixed-Point Arithmetic Instructions

Binary-Coded Decimal Arithmetic Instructions
ASCII Adjust After Addition (AAA) Instruction
Decimal Adjust AL After Addition (DAA) Instruction
ASCII Adjust AL After Subtraction (AAS) Instruction
Decimal Adjust AL After Subtraction (DAS) Instruction
ASCII Adjust AX After Multiplication (AAM) Instruction
ASCII Adjust AX Before Division (AAD) Instruction

Floating-Point Arithmetic Instructions
Floating-Point Fundamentals
Load Data Instructions
Store Data Instructions
Addition Instructions
Subtraction Instructions
Multiplication Instructions
Division Instructions
Compare Instructions
Trigonometric Instructions
Additional Instructions

Call a Procedure
Return from a Procedure
Passing Parameters to a Procedure

String Instructions
Repeat Prefixes
Move String Instructions
Load String Instructions
Store String Instructions
Compare Strings Instructions
Scan String Instructions

One-Dimensional Arrays
Multidimensional Arrays

Macro Definitions
Macro Examples

Interrupts and Input/Output Operations
Direct Memory Access
Memory-Mapped I/O
In/Out Instructions

Additional Programming Examples
Programming Examples

Appendix A ASCII Character Codes

Appendix B Answers to Select Problems


View More



Joseph Cavanagh is an adjunct professor in the computer engineering department at Santa Clara University in California. He is the author of several textbooks, including Computer Arithmetic and Verilog HDL Fundamentals (2009), Digital Design and Verilog HDL Fundamentals (2008), Verilog HDL: Digital Design and Modeling (2007), and Sequential Logic: Analysis and Synthesis (2006), as well as a novel, The Computer Conspiracy.