Book description
Presents assembly language from the high-level programmer's point of view, so you can start writing meaningful programs within days. The High Level Assembler (HLA) that accompanies the book is the first assembler that allows you to write portable assembly language programs that run under either Linux or Windows with nothing more than a recompile. The CD-ROM includes the HLA and the HLA Standard Library, all the source code from the book, and over 50,000 lines of additional sample code, all well-documented and tested. The code compiles and runs as-is under Windows and Linux.
Table of contents
- Copyright
- ACKNOWLEDGMENTS
-
HELLO, WORLD OF ASSEMBLY LANGUAGE
- 1.1 Chapter Overview
- 1.2 The Anatomy of an HLA Program
- 1.3 Running Your First HLA Program
- 1.4 Some Basic HLA Data Declarations
- 1.5 Boolean Values
- 1.6 Character Values
- 1.7 An Introduction to the Intel 80×86 CPU Family
- 1.8 Some Basic Machine Instructions
- 1.9 Some Basic HLA Control Structures
- 1.10 Introduction to the HLA Standard Library
- 1.11 Additional Details About TRY..ENDTRY
- 1.12 High Level Assembly Language vs. Low Level Assembly
- 1.13 For More Information
-
DATA REPRESENTATION
- 2.1 Chapter Overview
- 2.2 Numbering Systems
- 2.3 The Hexadecimal Numbering System
- 2.4 Data Organization
- 2.5 Arithmetic Operations on Binary and Hexadecimal Numbers
- 2.6 A Note About Numbers vs. Representation
- 2.7 Logical Operations on Bits
- 2.8 Logical Operations on Binary Numbers and Bit Strings
- 2.9 Signed and Unsigned Numbers
- 2.10 Sign Extension, Zero Extension, Contraction, and Saturation
- 2.11 Shifts and Rotates
- 2.12 Bit Fields and Packed Data
- 2.13 An Introduction to Floating Point Arithmetic
- 2.14 Binary Coded Decimal (BCD) Representation
- 2.15 Characters
- 2.16 The Unicode Character Set
- 2.17 For More Information
-
MEMORY ACCESS AND ORGANIZATION
- 3.1 Chapter Overview
- 3.2 The 80×86 Addressing Modes
- 3.3 Run-Time Memory Organization
- 3.4 How HLA Allocates Memory for Variables
- 3.5 HLA Support for Data Alignment
- 3.6 Address Expressions
- 3.7 Type Coercion
- 3.8 Register Type Coercion
- 3.9 The Stack Segment and the PUSH and POP Instructions
- 3.10 Dynamic Memory Allocation and the Heap Segment
- 3.11 The INC and DEC Instructions
- 3.12 Obtaining the Address of a Memory Object
- 3.13 For More Information
-
CONSTANTS, VARIABLES, AND DATA TYPES
- 4.1 Chapter Overview
- 4.2 Some Additional Instructions: INTMUL, BOUND, INTO
- 4.3 The TBYTE Data Types
- 4.4 HLA Constant and Value Declarations
- 4.5 The HLA TYPE Section
- 4.6 ENUM and HLA Enumerated Data Types
- 4.7 Pointer Data Types
- 4.8 The HLA Standard Library CHARS.HHF Module
- 4.9 Composite Data Types
- 4.10 Character Strings
- 4.11 HLA Strings
- 4.12 Accessing the Characters Within a String
- 4.13 The HLA String Module and Other String-Related Routines
- 4.14 In-Memory Conversions
- 4.15 Character Sets
- 4.16 Character Set Implementation in HLA
- 4.17 HLA Character Set Constants and Character Set Expressions
- 4.18 The IN Operator in HLA HLL Boolean Expressions
- 4.19 Character Set Support in the HLA Standard Library
- 4.20 Using Character Sets in Your HLA Programs
- 4.21 Arrays
- 4.22 Declaring Arrays in Your HLA Programs
- 4.23 HLA Array Constants
- 4.24 Accessing Elements of a Single Dimension Array
- 4.25 Multidimensional Arrays
- 4.26 Allocating Storage for Multidimensional Arrays
- 4.27 Accessing Multidimensional Array Elements in Assembly Language
- 4.28 Large Arrays and MASM (Windows Programmers Only)
- 4.29 Records
- 4.30 Record Constants
- 4.31 Arrays of Records
- 4.32 Arrays/Records as Record Fields
- 4.33 Controlling Field Offsets Within a Record
- 4.34 Aligning Fields Within a Record
- 4.35 Pointers to Records
- 4.36 Unions
- 4.37 Anonymous Unions
- 4.38 Variant Types
- 4.39 Union Constants
- 4.40 Namespaces
- 4.41 Dynamic Arrays in Assembly Language
- 4.42 HLA Standard Library Array Support
- 4.43 For More Information
-
PROCEDURES AND UNITS
- 5.1 Chapter Overview
- 5.2 Procedures
- 5.3 Saving the State of the Machine
- 5.4 Prematurely Returning from a Procedure
- 5.5 Local Variables
- 5.6 Other Local and Global Symbol Types
- 5.7 Parameters
- 5.8 Functions and Function Results
- 5.9 Recursion
- 5.10 Forward Procedures
- 5.11 Low Level Procedures and the CALL Instruction
- 5.12 Procedures and the Stack
- 5.13 Activation Records
- 5.14 The Standard Entry Sequence
- 5.15 The Standard Exit Sequence
- 5.16 Low Level Implementation of Automatic (Local) Variables
- 5.17 Low Level Parameter Implementation
- 5.18 Procedure Pointers
- 5.19 Procedure Parameters
- 5.20 Untyped Reference Parameters
- 5.21 Managing Large Programs
- 5.22 The #INCLUDE Directive
- 5.23 Ignoring Duplicate #INCLUDE Operations
- 5.24 UNITs and the EXTERNAL Directive
- 5.25 Namespace Pollution
- 5.26 For More Information
-
ARITHMETIC
- 6.1 Chapter Overview
- 6.2 80×86 Integer Arithmetic Instructions
- 6.3 Arithmetic Expressions
- 6.4 Logical (Boolean) Expressions
- 6.5 Machine and Arithmetic Idioms
- 6.6 Floating Point Arithmetic
- 6.7 Converting Floating Point Expressions to Assembly Language
- 6.8 HLA Standard Library Support for Floating Point Arithmetic
- 6.9 Putting It All Together
-
LOW LEVEL CONTROL STRUCTURES
- 7.1 Chapter Overview
- 7.2 Low Level Control Structures
- 7.3 Statement Labels
- 7.4 Unconditional Transfer of Control (JMP)
- 7.5 The Conditional Jump Instructions
- 7.6 "Medium Level" Control Structures: JT and JF
- 7.7 Implementing Common Control Structures in Assembly Language
- 7.8 Introduction to Decisions
- 7.9 State Machines and Indirect Jumps
- 7.10 Spaghetti Code
- 7.11 Loops
- 7.12 Performance Improvements
- 7.13 Hybrid Control Structures in HLA
- 7.14 For More Information
- FILES
- ADVANCED ARITHMETIC
-
MACROS AND THE HLA COMPILE TIME LANGUAGE
- 10.1 Chapter Overview
- 10.2 Introduction to the Compile Time Language (CTL)
- 10.3 The #PRINT and #ERROR Statements
- 10.4 Compile Time Constants and Variables
- 10.5 Compile Time Expressions and Operators
- 10.6 Compile Time Functions
- 10.7 Conditional Compilation (Compile Time Decisions)
- 10.8 Repetitive Compilation (Compile Time Loops)
- 10.9 Macros (Compile Time Procedures)
- 10.10 Writing Compile Time "Programs"
- 10.11 Using Macros in Different Source Files
- 10.12 For More Information
-
BIT MANIPULATION
- 11.1 Chapter Overview
- 11.2 What Is Bit Data, Anyway?
- 11.3 Instructions That Manipulate Bits
- 11.4 The Carry Flag as a Bit Accumulator
- 11.5 Packing and Unpacking Bit Strings
- 11.6 Coalescing Bit Sets and Distributing Bit Strings
- 11.7 Packed Arrays of Bit Strings
- 11.8 Searching for a Bit
- 11.9 Counting Bits
- 11.10 Reversing a Bit String
- 11.11 Merging Bit Strings
- 11.12 Extracting Bit Strings
- 11.13 Searching for a Bit Pattern
- 11.14 The HLA Standard Library Bits Module
- 11.15 For More Information
- THE STRING INSTRUCTIONS
-
THE MMX INSTRUCTION SET
- 13.1 Chapter Overview
- 13.2 Determining Whether a CPU Supports the MMX Instruction Set
- 13.3 The MMX Programming Environment
- 13.4 The Purpose of the MMX Instruction Set
- 13.5 Saturation Arithmetic and Wrap-Around Mode
- 13.6 MMX Instruction Operands
- 13.7 MMX Technology Instructions
- 13.8 The MMX Programming Paradigm
- 13.9 For More Information
-
CLASSES AND OBJECTS
- 14.1 Chapter Overview
- 14.2 General Principles
- 14.3 Classes in HLA
- 14.4 Objects
- 14.5 Inheritance
- 14.6 Overriding
- 14.7 Virtual Methods vs. Static Procedures
- 14.8 Writing Class Methods and Procedures
- 14.9 Object Implementation
- 14.10 Constructors and Object Initialization
- 14.11 Destructors
- 14.12 HLA's "_initialize_" and "_finalize_" Strings
- 14.13 Abstract Methods
- 14.14 Run-Time Type Information (RTTI)
- 14.15 Calling Base Class Methods
- 14.16 For More Information
- MIXED LANGUAGE PROGRAMMING
- ASCII CHARACTER SET
- THE 80×86 INSTRUCTION SET
- Index
Product information
- Title: Art of Assembly Language, 1st Edition
- Author(s):
- Release date: September 2003
- Publisher(s): No Starch Press
- ISBN: 9781886411975
You might also like
book
Introduction to 80x86 Assembly Language and Computer Architecture, 2nd Edition
Thoroughly revised and updated throughout, the Second Edition of Introduction to 80x86 Assembly Language and Computer …
book
Introduction to 80x86 Assembly Language and Computer Architecture, 3rd Edition
A Revised and Updated Edition of the Authoritative Text This revised and updated Third Edition of …
book
Professional Assembly Language
Unlike high-level languages such as Java and C++, assembly language is much closer to the machine …
book
Assembly Language Step-by-Step: Programming with Linux®, Third Edition
The eagerly anticipated new edition of the bestselling introduction to x86 assembly language The long-awaited third …