Skip to content

Assembly Language for Intel Based Computers

Best in textbook rentals since 2012!

ISBN-10: 0136603904

ISBN-13: 9780136603900

Edition: 3rd 1999

Authors: Kip R. Irvine

List price: $80.00
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Designed for undergraduate courses in assembly language programming. Concentrating on the MS-DOS operating system and using short applications, this complete and fully updated study of assembly language for the IBM-PC helps students learn the basics of operating systems and architecture in the context of a microprocessor, and teaches them how to approach programming problems with a machine-level mindset. Based on the Intel 80x86 processor family, it simplifies and demystifies concepts that must be understood before students go on to study computer architecture or computer operating systems in more advanced courses. The text provides hundreds of short examples that show how assembly…    
Customers also bought

Book details

List price: $80.00
Edition: 3rd
Copyright year: 1999
Publisher: Prentice Hall PTR
Publication date: 9/8/1998
Binding: Hardcover
Pages: 676
Size: 7.72" wide x 9.57" long x 1.14" tall
Weight: 3.058
Language: English

Kip Irvine has written four computer programming textbooks, for Intel Assembly Language, C++, Visual Basic, and COBOL. His "Assembly Language for Intel-Based Computers" has been translated to six languages, and has been a best seller since 1990. Kip grew up in Hawaii as a surfer, sailor, and surfboard maker. He studied classical guitar and music composition at University of Hawaii, eventually earning his music doctorate from the University of Miami. He began programming computers for music synthesis around 1982, and taught at Miami-Dade Community College. He has a Masters degree in Computer Science from the University of Miami, and is currently on the computer science faculty at Florida…    

Introduction
Context of Assembly Language
What Is Assembly Language?
Assembly Language Applications
Machine Language
Data Representation
Binary Numbers
Converting Binary to Decimal
Hexadecimal Numbers
Signed Numbers
Character Storage
Introducing Assembly Language
Assembly Language Instructions
A Sample Debug Program
Debug Commands
Review Questions
Hardware and Software Architecture
16-Bit Intel Processor Architecture
Central Processing Unit
Registers
Status and Control Registers
Flags
Instruction Execution Cycle
Intel Microprocessor Family
32-Bit Intel Processor Architecture
Improved Execution Cycle
32-bit Register Set
Operating System and Memory
History of PC Memory Usage
Memory Architecture
System Startup Procedure
Video Display
Serial Communications Ports
Read-Only Memory (ROM)
Absolute Address Calculation
Components of a Microcomputer
Internal Components
Motherboard Designs
Bus Architecture
Video Adapter
Memory (RAM)
Video RAM
Secondary Storage Devices
Review Questions
Programming Exercises
Assembly Language Fundamentals
Basic Elements of Assembly Language
Constants and Expressions
Statements
Names
Sample Hello Program
Assembling, Linking, and Debugging
Borland Turbo Assembler (TASM)
Microsoft Assembler (MASM)
Data Allocation Directives
Define Byte (DB)
Define Word (DW)
Define Doubleword (DD)
Symbolic Constants
Equal-Sign Directive
EQU Directive
TEXTEQU Directive
Data Transfer Instructions
MOV Instruction
Operands with Displacements
XCHG Instruction
Arithmetic Instructions
INC and DEC Instructions
ADD Instruction
SUB Instruction
Flags Affected by ADD and SUB
Basic Operand Types
Register Operands
Immediate Operands
Direct Operands
Direct - Offset Operands
Review Questions
Programming Exercises
Using the Assembler
More About the Assembler and Linker
Source Listing File
Map File
Assembling and Linking with MS-DOS Batch Files
Memory Models
Target Processor Directives
Operators and Expressions
Arithmetic Operators
OFFSET, SEG, PTR, LABEL, and EVEN
TYPE and SIZE Operators
Borland TASM's ENUM Directive
JMP and LOOP Instructions
JMP Instruction
LOOP Instruction
LOOP, LOOPW, LOOPD Instructions
Indirect Addressing
Indirect Operands
Based and Indexed Operands
Base-Index Operands
Base-Index with Displacement
Debugging Workshop
Operand Sizes and Addressing Errors
More 80386 and 80486 Instructions
MOVZX and MOVSX Instructions
XADD Instruction
Using a Link Library
Selected Procedures in the Book's Link Library
Displaying Random Integers
Timing Events
Review Questions
Programming Exercises
Procedures and Interrupts
Stack Operations
PUSH and POP Instructions
Procedures
PROC and ENDP Directives
Sample Program: SUBS.ASM
Nested Procedure Calls
Near and Far Procedures
Using Memory Models
Procedure Parameters
Passing Arguments in Registers
Software Interrupts
INT Instruction
Redirecting Input-Output
MS-DOS Function Calls
Output Functions
Input Functions
Date/Time Functions
Bios-Level Keyboard Input (INT 16H)
Bios-Level Video Control (INT 10H)
Displays, Modes, and Attributes
Color Text Mode
INT 10h Video Functions
Writing Directly to Video Memory
Recursion
Review Questions
Programming Exercises
Conditional Processing
Boolean and Comparison Instructions
The Flags Register
AND Instruction
OR Instruction
XOR Instruction
NOT Instruction
NEG Instruction
TEST Instruction
BT, BTC, BTR, BTS Instructions
BSF and BSR Instructions
CMP Instruction
CMPXCHG Instruction
Boolean Assembler Operators
Conditional Jumps
Jcond Instruction
Code Generation for Conditional Jumps
Conditional Jump Examples
The SETcondition Instruction
Conditional LOOPS
LOOPZ and LOOPE Instructions
LOOPNZ and LOOPNE Instructions
High-Level Logic Structures
Simple IF Statement
Compound IF Statement
WHILE Structure
REPEAT-UNTIL Structure
CASE Structure
Table of Procedure Offsets
Finite State Machines
Review Questions
Programming Exercises
Integer Arithmetic
Shift and Rotate Instructions
SHL Instruction
SHLD/SHRD Instructions
SHR Instruction
SAL and SAR Instructions
ROL Instruction
ROR Instruction
RCL and RCR Instructions
Sample Applications
Shifting Multiple Bytes on the 8086
Fast Multiplication and Division
Displaying Binary Bits
Isolating a Bit String
RECORD Directive
Extended Addition and Substraction
ADC Instruction
SBB Instruction
Multiplication and Division
MUL Instruction
IMUL Instruction
DIV Instruction
IDIV Instruction
CBW, CWD, CDQ, and CWDE Instructions
Preventing Divide Overflow
Application: Direct Video Output
Set_videoseg Procedure
Writechar_direct Procedure
Writestring_direct Procedure
ASCII and Packed Decimal Arithmetic
AAA Instruction
AAS Instruction
AAM Instruction
AAD Instruction
DAA, DAS Instructions
Review Questions
Programming Exercises
Bit Manipulation
Bit-Mapped Sets
Prime Numbers
Arithmetic with Large Numbers
Direct Video Output
Structures and Macros
Structures
Introducing Macros
Macros with Parameters
Defining a Macro
Example: mDisplayStr Macro
Example: mGotoRowCol Macro
Macros That Allocate Storage
LOCAL Directive
Special Macro Techniques
Nested Macros
Macros Calling Procedures
Conditional-Assembly Directives
EXITM Directive
Macro Operators
A Simple Macro Library
mWriteliteral (Write Literal)
mCondCall (Conditional Call)
mCompJmp (Compare and Jump)
mMult16 (Memory Multiply/16)
mMOVE (Memory to Memory Move)
mLongLoop (Long Loop)
Advanced Macros and Directives
REPT Directive
Linked List Example
IRP Directive
Extended Jump Macro
Generic Shift/Rotate Macro
Additional Tips
Review Questions
Programming Exercises
Numeric Conversions and Libraries
Introduction
Character Translation Methods
The XLAT Instruction
Character Filtering
Character Encoding
Stack Parameters
Creating a Stack Frame
Passing Arguments by Reference
LDS/LES/LFS/LGS/LSS (Load Far Pointer)
ENTER Instruction
LEAVE Instruction
Passing Arguments the 'C' Language Way
Procedure Declarations in Borland TASM
Function Procedures (TASM)
Procedure Declarations in Microsoft MASM
Separately Assembled Modules
The PUBLIC Directive
Creating a MultiModule Program
Creating a Link Library
Binary to ASCII Conversion
The Writeint Procedure
ASCII to Binary Conversion
The Readint Procedure
Review Questions
Programming Exercises
Strings and Arrays
String Storage Methods
Overview
Types of Strings
String Primitive Instructions
MOVS (Move String Data)
The Need for Speed
CMPS (Compare Strings)
SCAS (Scan String)
STOS (Store in String)
LODS (Load String)
A Library of String Procedures
Str_compare Procedure
Str_copy Procedure
Str_length Procedure
Str_getline Procedure
Readstring Procedure
Str_ucase Procedure
Writestring Procedure
The Str_write Procedure
String Library Test Program
Review Questions
Programming Exercises
Disk Storage
Disk Storage Fundamentals
Physical and Logical Characteristics
Types of Disks
Disk Directory
Directory Structure
Sample Disk Directory
File Allocation Table (FAT)
Reading and Writing Disk Sectors
Sector Display Program
Decoding the File Allocation Table
Cluster Display Program
System-Level File Functions
DOS Error Codes
Displaying Error Messages
File Specifications
Reading the DOS Command Tail
Drive and Directory Manipulation
Set Default Drive (0Eh)
Get Default Drive (19h)
Get Disk Free Space (36h)
Get Current Directory (47h)
Set Current Directory (3Bh)
Create Subdirectory (39h)
Remove Subdirectory (3Ah)
Get Device Parameters (44h)
Review Questions
Programming Exercises
Sector Display Exercises
File Processing
File Manipulation
Introduction
Get/Set File Attribute (43h)
Delete File (41h)
Rename File (56h)
Get/Set File Date/Time (57h)
Find First Matching File (4Eh)
Find Next Matching File (4Fh)
Set Disk Transfer Address (1Ah)
Application: Display Filenames and Dates
File I/O Services
Create File (3Ch)
Open File (3Dh)
Close File (3Eh)
Read From File or Device (3Fh)
Write to File or Device (40h)
Random File Access
Move File Pointer (42h)
Reading a Bitmap File
Review Questions
Programming Exercises
Manipulating Disk Directories
High-Level Language Interface
Introduction
General Conventions
Writing Inline Assembly Code
Microsoft Visual C++ 5.0
File Encryption Example
Linking to C++ Programs
Linking to Borland C++
ReadSector Example
Large Random Number Example
Linking to Visual C++ in Protected Mode
Review Questions
Programming Exercises
Advanced Topics I
Pointers and Indirection
LEA (Load Effective Address)
Indirect Jumps and Calls
32-Bit Pointer Table
Processor Control and I/O
ESC, HLT, LOCK, and WAIT
Input-Output Ports
Flag Manipulation Instructions
Defining Segments
Explicit Segment Definitions
Segment Definition Syntax
The ASSUME Directive
Segment Override Operator
Combining Segments
Dynamic Memory Allocation
Modify Memory Blocks
Allocate Memory
Release Allocated Memory
Runtime Program Structure
COM Programs
EXE Programs
Review Questions
Programming Exercises
Advanced Topics II
System Hardware
Real-Time Clock
CPU
Calculating Instruction Timings
Reading From Memory
Instruction Encoding (8086/8088)
Single-Byte Instructions
Immediate Operands
Register-Mode Instructions
Memory-Mode Instructions
Interrupt Handling
Hardware Interrupts
Interrupt Control Instructions
Writing an Interrupt Handler Procedure
Memory-Resident Programs (TSR)
Application: The No Reset program
Defining Real Numbers
Define Doubleword (DD)
Define Quadword (DQ)
Define Tenbyte (DT)
Floating-Point Instructions
Floating-Point Coprocessors
Instruction Formats
Example: Evaluating an Expression
Application: Payroll Calculation Program
Review Questions
Programming Exercises
Binary and Hexadecimal Tutorial
Binary Numbers
Addition Examples
Binary to Decimal Conversion
Decimal to Binary Conversion
Hexadecimal Numbers
Binary to Hexadecimal Conversion
Hexadecimal to Decimal Conversion
Hexadecimal Digit Position Values
Decimal to Hexadecimal Conversion
Arithmetic
Signed and Unsigned Numbers
Twos Complement Notation
Binary Subtraction
Hexadecimal Addition and Subtraction
Review Questions
Answers to Review Questions
Using Debug
Introducing Debug
Debug Command Summary
Command Parameters
Individual Commands
? (Help)
A (Assemble)
C (Compare)
D (Dump)
E (Enter)
F (Fill)
G (Go)
H (Hexarithmetic)
I (Input)
L (Load)
M (Move)
N (Name)
P (Proceed)
Q (Quit)
R (Register)
S (Search)
T (Trace)
U (Unassemble)
W (Write)
Segment Defaults
Using Script Files with Debug
Microsoft CodeView
Introduction
Expressions
Keyboard Commands
Controlling Program Execution
Examining and Modifying Data
Examining and Modifying Data and Expressions
Watching Variables During Program Execution
Direct Dialog Output to File/Printer
Hands-on Tutorial
Borland Turbo Debugger
Preparing a Program to be Debugged
Selected Command-Line Options
Tracing Programs
Stack Window (View/Stack)
Execution History Window (View/Execution)
The Run Menu
Setting Breakpoints
Assembler Expressions
Examining and Modifying Data
Variables Window (View/Variables)
Watch Window (View/Watches)
Viewing a Memory Dump
Inspector Windows
Evaluate/Modify Dialog Box
Configuring Turbo Debugger
Guide to the Sample Programs
Information About the Sample Program Files
Contents of the Macros.inc File
Link Library Procedures
Sample Programs from the Charters
The Intel Instruction Set
Introduction
Flags
Instruction Descriptions and Formats
The Instruction Set
BIOS and DOS Interrupts
Overall Interrupt List
Interrupt 21H Functions (DOS Services)
Interrupt 10H Functions (Video Bios)
Interrupt 16H Functions (Keyboard)