CART

(0) items

Assembly Language for Intel-Based Computers,9780130910134
This item qualifies for
FREE SHIPPING!

FREE SHIPPING OVER $59!

Your order must be $59 or more, you must select US Postal Service Shipping as your shipping preference, and the "Group my items into as few shipments as possible" option when you place your order.

Bulk sales, PO's, Marketplace Items, eBooks, Apparel, and DVDs not included.

Assembly Language for Intel-Based Computers

by
ISBN13:

9780130910134

ISBN10:
0130910139
Format:
Hardcover
Pub. Date:
1/1/2003
Publisher(s):
PRENTICE HALL
List Price: $97.00

Buy New Textbook

Currently Available, Usually Ships in 24-48 Hours
N9780130910134
$94.58

Rent Textbook

We're Sorry
Sold Out

Used Textbook

We're Sorry
Sold Out

eTextbook

We're Sorry
Not Available

More New and Used
from Private Sellers
Starting at $0.01
See Prices

Questions About This Book?

What version or edition is this?
This is the edition with a publication date of 1/1/2003.
What is included with this book?
  • The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any CDs, lab manuals, study guides, etc.

Related Products


  • Assembly Language for Intel-Based Computers
    Assembly Language for Intel-Based Computers
  • Assembly Language for Intel-Based Computers
    Assembly Language for Intel-Based Computers
  • Assembly Language for x86 Processors
    Assembly Language for x86 Processors
  • Assembly Language for x86 Processors
    Assembly Language for x86 Processors




Summary

This text is designed for students and professionals interested in learning the basics of operating systems, architecture, and programming in the context of a microprocessor. Irvine concentrates on the combined Windows/MS-DOS operating system and thoroughly covers 32-bit assembly language applications for Intel-based computers.

Table of Contents

Preface xxiii
Basic Concepts
1(30)
Welcome to Assembly Language
1(7)
Some Good Questions to Ask
2(5)
Assembly Language Applications
7(1)
Section Review
8(1)
Virtual Machine Concept
8(4)
The History of PC Assemblers
11(1)
Section Review
12(1)
Data Representation
12(13)
Binary Numbers
13(1)
Unsigned Binary Integers
13(1)
Translating Unsigned Binary Integers to Decimal
14(1)
Translating Unsigned Decimal Integers to Binary
14(1)
Binary Addition
15(1)
Integer Storage Sizes
16(1)
Hexadecimal Integers
16(1)
Converting Unsigned Hexadecimal to Decimal
17(1)
Converting Unsigned Decimal to Hexadecimal
18(1)
Signed Integers
18(1)
Two's Complement Notation
19(2)
Maximum and Minimum Values
21(1)
Character Storage
21(2)
Section Review
23(2)
Boolean Operations
25(4)
Truth Tables for Boolean Functions
27(2)
Section Review
29(1)
Chapter Summary
29(2)
IA-32 Processor Architecture
31(32)
General Concepts
31(10)
Basic Microcomputer Design
32(1)
Instruction Execution Cycle
33(1)
Multi-Stage Pipeline
34(2)
Superscalar Architecture
36(1)
Reading from Memory
37(1)
How Programs Run
38(1)
Load and Execute Process
38(1)
Multitasking
39(1)
Section Review
40(1)
IA-32 Processor Architecture
41(7)
Modes of Operation
41(1)
Basic Execution Environment
41(1)
Address Space
41(1)
Basic Program Execution Registers
42(2)
Floating-Point Unit
44(1)
Other Registers
44(1)
Intel Microprocessor History
45(1)
IA-32 Processor Family
46(1)
P6 Processor Family
46(1)
CISC and RISC
46(1)
Section Review
47(1)
IA-32 Memory Management
48(5)
Real-address Mode
48(1)
20-bit Linear Address Calculation
49(1)
Protected Mode
50(1)
Flat Segmentation Model
50(1)
Multi-Segment Model
51(1)
Paging
52(1)
Section Review
53(1)
Components of an IA-32 Microcomputer
53(4)
Motherboard
53(1)
PCI Bus Architecture
54(1)
Motherboard Chipset
54(1)
Video Output
55(1)
Memory
55(1)
Input-Output Ports
56(1)
Section Review
57(1)
Input-Output System
57(3)
How It All Works
57(3)
Section Review
60(1)
Chapter Summary
60(3)
Assembly Language Fundamentals
63(34)
Basic Elements of Assembly Language
64(8)
Integer Constants
64(1)
Integer Expressions
65(1)
Real Number Constants
66(1)
Character Constants
67(1)
String Constants
67(1)
Reserved Words
67(1)
Identifiers
67(1)
Directives
68(1)
Instructions
68(1)
Label
69(1)
Instruction Mnemonic
70(1)
Operands
70(1)
Comments
71(1)
Section Review
71(1)
Example: Adding Three Integers
72(5)
Program Listing
72(1)
Program Output
72(1)
Program Description
73(1)
Alternative Version of AddSub
74(2)
Program Template
76(1)
Section Review
76(1)
Assembling, Linking, and Running Programs
77(3)
The Assemble-Link-Execute Cycle
77(1)
Listing File
78(1)
Files Created or Updated by the Linker
79(1)
Section Review
80(1)
Defining Data
80(9)
Intrinsic Data Types
80(1)
Data Definition Statement
81(1)
Defining Byte and Sbyte Data
81(1)
Multiple Initializers
82(1)
Defining Strings
83(1)
Using the Dup Operator
83(1)
Defining Word and Sword Data
84(1)
Defining Dword and Sdword Data
84(1)
Defining Qword Data
85(1)
Defining Tbyte Data
85(1)
Defining Real Number Data
85(1)
Little Endian Order
86(1)
Adding Variables to the AddSub Program
87(1)
Declaring Uninitialized Data
87(1)
Section Review
88(1)
Symbolic Constants
89(4)
Equal-Sign Directive
89(1)
Calculating the Sizes of Arrays and Strings
90(1)
EQU Directive
91(1)
Textequ Directive
92(1)
Section Review
93(1)
Real-Address Mode Programming (Optional)
93(2)
Basic Changes
94(1)
The AddSub2 Program
94(1)
Chapter Summary
95(1)
Programming Exercises
96(1)
Data Transfers, Addressing, and Arithmetic
97(40)
Data Transfer Instructions
98(9)
Introduction
98(1)
Operand Types
98(1)
Direct Memory Operands
99(1)
MOV Instruction
100(1)
Zero/Sign Extension of Integers
101(1)
Copying Smaller Values to Larger Ones
101(1)
MOVZX Instruction
102(1)
MOVSX Instruction
103(1)
LAHF and SAHF Instructions
103(1)
XCHG Instruction
104(1)
Direct-Offset Operands
104(1)
Example Program (Moves)
105(1)
Section Review
106(1)
Addition and Subtraction
107(8)
INC and DEC Instructions
107(1)
ADD Instruction
108(1)
SUB Instruction
108(1)
NEG Instruction
109(1)
Implementing Arithmetic Expressions
109(1)
Flags Affected by Arithmetic
110(1)
Zero and Sign Flags
110(1)
Garry Flag (unsigned arithmetic)
110(1)
Overflow Flag (signed arithmetic)
111(2)
Example Program (AddSub3)
113(1)
Section Review
114(1)
Data-Related Operators and Directives
115(5)
Offset Operator
115(1)
Offset Example
115(1)
Align Directive
116(1)
PTR Operator
117(1)
Type Operator
118(1)
Lengthof Operator
118(1)
Sizeof Operator
119(1)
Label Directive
119(1)
Section Review
120(1)
Indirect Addressing
120(7)
Indirect Operands
121(1)
Arrays
122(1)
Indexed Operands
123(1)
Pointers
124(1)
Using the Typdef Operator
125(1)
Section Review
126(1)
JMP and Loop Instructions
127(5)
JMP Instruction
127(1)
Loop Instruction
128(1)
Summing an Integer Array
129(1)
Copying a String
130(1)
Section Review
131(1)
Chapter Summary
132(1)
Programming Exercises
133(4)
Procedures
137(42)
Introduction
137(1)
Linking to an External Library
138(2)
Background Information
138(1)
Section Review
139(1)
The Book's Link Library
140(13)
Overview
140(1)
Individual Procedure Descriptions
141(6)
The Irvine32.inc Include File
147(1)
Library Test Program
148(4)
Section Review
152(1)
Stack Operations
153(6)
Runtime Stack
153(1)
Push Operation
154(1)
Pop Operation
155(1)
Stack Applications
155(1)
PUSH and POP Instructions
156(1)
PUSH Instruction
156(1)
POP Instruction
156(1)
Pushfd and POPFD Instructions
156(1)
Pushad, Pusha, Popad, and Popa
157(1)
Example: Reversing a String
157(1)
Section Review
158(1)
Defining and Using Procedures
159(10)
PROC Directive
159(1)
Defining a Procedure
159(1)
Example: Sum of Three Integers
160(1)
Documenting Procedures
160(1)
CALL and RET Instructions
161(1)
Call and Return Example
161(1)
Nested Procedure Calls
162(1)
Local Labels and Global Labels
163(1)
Passing Register Arguments to Procedures
164(1)
Example: Summing an Integer Array
164(1)
Flowcharts
165(1)
Saving and Restoring Registers
166(1)
USES Operator
166(2)
Section Review
168(1)
Program Design Using Procedures
169(6)
Integer Summation Program (Design)
170(2)
Integer Summation Implementation
172(3)
Section Review
175(1)
Chapter Summary
175(1)
Programming Exercises
176(3)
Conditional Processing
179(48)
Introduction
180(1)
Boolean and Comparison Instructions
180(9)
The CPU Flags
181(1)
AND Instruction
181(1)
Converting Characters to Upper Case
182(1)
OR Instruction
183(1)
XOR Instruction
184(2)
NOT Instruction
186(1)
TEST Instruction
186(1)
CMP Instruction
186(2)
Setting and Clearing Individual CPU Flags
188(1)
Section Review
188(1)
Conditional Jumps
189(11)
Conditional Structures
189(1)
Jcond Instruction
190(1)
Types of Conditional Jump Instructions
191(1)
Equality Comparisons
192(1)
Unsigned Comparisons
192(1)
Signed Comparisons
192(1)
Conditional Jump Applications
193(1)
Testing Status Bits
193(1)
Application: Scanning an Array
194(1)
Application: String Encryption
195(3)
Bit Testing Instructions (Optional)
198(1)
BT Instruction
198(1)
BTC Instruction
199(1)
BTR Instruction
199(1)
BTS Instruction
199(1)
Section Review
200(1)
Conditional Loop Instructions
200(2)
Loopz and Loope Instructions
200(1)
Loopnz and Loopne Instructions
201(1)
Section Review
202(1)
Conditional Structures
202(9)
Block-Structured IF Statements
202(2)
Compound Expressions
204(1)
Logical and Operator
204(1)
Logical or Operator
205(1)
While Loops
205(1)
Example: If statement Nested in a Loop
206(2)
Table-Driven Selection
208(2)
Section Review
210(1)
Application: Finite-State Machines
211(6)
Validating an Input String
212(1)
Validating a Signed Integer
213(3)
Section Review
216(1)
Using the .IF Directive (Optional)
217(6)
Signed and Unsigned Comparisons
219(1)
Compound Expressions
220(1)
SetCursorPosition Example
220(1)
College Registration Example
221(1)
.Repeat and .While Directives
222(1)
Example: Loop Containing an IF Statement
222(1)
Chapter Summary
223(1)
Programming Exercises
224(3)
Integer Arithmetic
227(32)
Introduction
228(1)
Shift and Rotate Instructions
228(8)
Logical Shifts versus Arithmetic Shifts
229(1)
SHL Instruction
229(1)
SHR Instruction
230(1)
SAL and SAR Instructions
231(1)
ROL Instruction
231(1)
ROR Instruction
232(1)
RCL and RCR Instructions
232(1)
SHLD/SHRD Instructions
233(2)
Section Review
235(1)
Shift and Rotate Applications
236(3)
Shifting Multiple Doublewords
236(1)
Binary Multiplication
237(1)
Displaying Binary Bits
237(1)
Isolating a Bit String
238(1)
Section Review
239(1)
Multiplication and Division Instructions
239(9)
MUL Instruction
240(1)
IMUL Instruction
241(1)
DIV Instruction
242(1)
Signed Integer Division
243(1)
CBW, CWD, CDQ Instructions
243(1)
The IDIV Instruction
243(1)
Divide Overflow
244(1)
Implementing Arithmetic Expressions
245(2)
Section Review
247(1)
Extended Addition and Subtraction
248(3)
ADC Instruction
248(1)
Extended Addition Example
249(1)
SBB Instruction
250(1)
Section Review
250(1)
ASCII and Packed Decimal Arithmetic (Optional)
251(4)
AAA Instruction
252(1)
AAS Instruction
253(1)
AAM Instruction
253(1)
AAD Instruction
253(1)
Packed Decimal Integers
254(1)
DAA Instruction
254(1)
DAS Instruction
254(1)
Chapter Summary
255(1)
Programming Exercises
256(3)
Advanced Procedures
259(42)
Introduction
259(1)
Local Variables
260(3)
Local Directive
261(2)
Section Review
263(1)
Stack Parameters
263(12)
Invoke Directive
264(1)
DDR Operator
265(1)
PROC Directive
266(1)
Examples
267(1)
Proto Directive
268(1)
ArraySum Example
269(1)
Passing by Value or by Reference
269(2)
Parameter Classifications
271(1)
Example: Exchanging Two Integers
271(1)
Trouble-Shooting Tips
272(1)
Saving and Restoring Registers
272(1)
Wrong Operand Sizes
273(1)
Passing the Wrong Type of Pointer
274(1)
Passing Immediate Values
274(1)
Section Review
274(1)
Stack Frames
275(10)
Memory Models
276(1)
Language Specifiers
277(1)
Stdcall Specifier
277(1)
Specifier
278(1)
Pascal Specifier
278(1)
Explicit Access to Stack Parameters
278(2)
Saving and Restoring Registers
280(1)
Passing Arguments by Reference
280(1)
ArrayFill Example
281(1)
LEA Instruction
282(1)
Creating Local Variables
282(1)
Enter and Leave Instructions (Optional)
283(2)
Section Review
285(1)
Recursion
285(5)
Recursively Calculating a Sum
286(2)
Calculating a Factorial
288(2)
Section Review
290(1)
Creating Multimodule Programs
290(6)
Example: ArraySum Program
291(1)
Include File: Function Prototypes
292(1)
Main Module
292(1)
PromptForIntegers Module
293(1)
ArraySum Module
294(1)
DisplaySum Module
295(1)
Batch File for Assembling and linking
295(1)
Section Review
296(1)
Chapter Summary
296(2)
Programming Exercises
298(3)
Strings and Arrays
301(32)
Introduction
301(1)
String Primitive Instructions
302(7)
MOVSB, MOVSW and MOVSD
304(1)
CMPSB, CMPSW, and CMPSD
304(2)
Example: Comparing Two Strings
306(1)
SCASB, SCASW, and SCASD
307(1)
STOSB, STOSW, and STOSD
308(1)
LODSB, LODSW, and LODSD
308(1)
Section Review
309(1)
Selected String Procedures
309(6)
Str_compare Procedure
310(1)
Str_length Procedure
311(1)
Str_copy Procedure
311(1)
Str_trim Procedure
312(2)
Str_ucase Procedure
314(1)
Section Review
315(1)
Two-Dimensional Arrays
315(3)
Base-Index Operands
315(2)
Base-Index Displacement
317(1)
Section Review
318(1)
Searching and Sorting Integer Arrays
318(10)
Bubble Sort
319(2)
Binary Search
321(3)
Test Program
324(4)
Section Review
328(1)
Chapter Summary
328(2)
Programming Exercises
330(3)
Structures and Macros
333(46)
Structures
334(13)
Defining Structures
334(1)
Declaring Structure Variables
335(1)
Referencing Structure Variables
336(2)
Example: Displaying the System Time
338(2)
Nested Structures
340(1)
Example: Drunkard's Walk
341(3)
Declaring and Using Unions
344(2)
Section Review
346(1)
Macros
347(11)
Overview
347(1)
Defining Macros
348(1)
Invoking Macros
349(1)
Macro Examples
350(1)
mWriteStr Macro
351(1)
mReadStr Macro
352(1)
mGotoxy Macro
352(1)
mDumpMem Macro
353(1)
Macros Containing Code and Data
354(1)
Nested Macros
355(1)
Example Program: Wrappers
356(1)
Section Review
357(1)
Conditional-Assembly Directives
358(12)
Checking for Missing Arguments
359(1)
Default Argument Initializers
360(1)
Boolean Expressions
360(1)
IF ELSE, and ENDIF Directives
361(1)
The IFIDN and IFIDNI Directives
362(1)
Special Operators
363(1)
Substitution Operator (&)
363(1)
Expansion Operator (%)
364(2)
Literal-Text Operator (<>)
366(1)
Literal-Character Operator (!)
366(1)
Macro Functions
367(2)
Section Review
369(1)
Defining Repeat Blocks
370(5)
While Directive
370(1)
Repeat Directive
371(1)
For Directive
371(1)
Forc Directive
372(1)
Example: Linked List
373(2)
Section Review
375(1)
Chapter Summary
375(1)
Programming Exercises
376(3)
32-Bit Windows Programming
379(52)
Win32 Console Programming
379(32)
Background Information
381(1)
Windows Data Types
382(1)
Console Handles
383(1)
Win32 Console Functions
384(2)
Console Input
386(1)
ReadConsole Function
387(1)
Single-Character Input
388(1)
Console Output
389(1)
Data Structures
390(1)
WriteConsole Function
390(1)
Example Program: Console 1
390(1)
WriteConsoleOutputCharacter Function
391(1)
Reading and Writing Files
392(1)
CreateFile Function
392(3)
CloseHandle Function
395(1)
ReadFile Function
395(1)
WriteFile Function
395(1)
Example WriteFile Program
396(1)
Moving the File Pointer
397(1)
Example ReadFile Program
397(1)
Console Window Manipulation
398(1)
SetConsoleTitle
399(1)
GetConsoleScreenBufferInfo
399(1)
SetConsoleWindowInfo Function
400(2)
SetConsoleScreenBufferSize Function
402(1)
Controlling the Cursor
402(1)
GetConsoleCursorInfo Function
402(1)
SetConsoleCursorInfo Function
402(1)
SetConsoleCursorPosition
403(1)
Controlling the Text Color
403(1)
SetConsoleTextAttribute Function
403(1)
WriteConsoleOutputAttribute Function
403(1)
Example WriteColors Program
403(2)
Time and Date Functions
405(1)
GetLocalTime and SetLocalTime
406(1)
GetTickCount Function
407(1)
Sleep Function
407(1)
GetDateTime Procedure
408(1)
Creating a Stopwatch Timer
409(1)
Section Review
410(1)
Writing a Graphical Windows Application
411(10)
Necessary Structures
412(1)
The MessageBox Function
413(1)
The WinMain Procedure
414(1)
The WinProc Procedure
414(1)
The ErrorHandler Procedure
415(1)
Program Listing
416(3)
Running the Program
419(1)
Section Review
420(1)
IA-32 Memory Management
421(7)
Linear Addresses
421(1)
Translating Logical Addresses to Linear Addresses
421(2)
Paging
423(1)
Descriptor Tables
424(1)
Segment Descriptor Details
425(1)
Page Translation
425(1)
MS-Windows Virtual Machine Manager
426(1)
Section Review
427(1)
Chapter Summary
428(1)
Programming Exercises
429(2)
High-Level Language Interface
431(26)
Introduction
431(2)
General Conventions
431(2)
Section Review
433(1)
Inline Assembly Code
433(6)
_asm Directive in Microsoft Visual C++
433(2)
Using the Length, Type, and Size Operators
435(1)
File Encryption Example
436(1)
Procedure Call Overhead
437(2)
Section Review
439(1)
Linking to C++ Programs
439(16)
Linking to Borland C++
440(1)
ReadSector Example
441(1)
Main C++ Program That Galls ReadSector
442(2)
Assembly Language Module
444(2)
Example: Large Random Integers
446(2)
Using Assembly Language to Optimize C++ Code
448(1)
FindArray Code Generated by Visual C++
449(1)
Linking MASM to Visual C++
450(4)
Section Review
454(1)
Chapter Summary
455(1)
Programming Exercises
456(1)
16-Bit MS-DOS Programming
457(38)
MS-DOS and the IBM-PC
457(6)
Memory Organization
458(2)
Redirecting Input-Output
460(1)
Software Interrupts
461(1)
INT Instruction
461(1)
Interrupt Vectoring
461(1)
Common Interrupts
462(1)
Section Review
462(1)
MS-DOS Function Calls (INT 21h)
463(13)
Selected Output Functions
464(3)
Hello World Program Example
467(1)
Selected Input Functions
467(2)
Example: String Encryption Program
469(1)
Int 21h Function 3Fh
470(2)
Date/Time Functions
472(2)
Example: Displaying the Time and Date
474(2)
Section Review
476(1)
Standard MS-DOS File I/O Services
476(15)
Create or Open File (716Ch)
478(1)
Close File Handle (3Eh)
479(1)
Move File Pointer (42h)
480(1)
Get File Creation Date and Time
481(1)
Selected Library Procedures
481(1)
ReadString
482(1)
WriteString
482(1)
Example: Read and Copy a Text File
483(2)
Reading the MS-DOS Command Tail
485(2)
Example: Creating a Binary File
487(3)
Section Review
490(1)
Chapter Summary
491(1)
Chapter Exercises
492(3)
Disk Fundamentals
495(32)
Disk Storage Systems
495(5)
Tracks, Cylinders, and Sectors
496(2)
Disk Partitions (Volumes)
498(1)
Section Review
499(1)
File Systems
500(5)
FAT12
501(1)
FAT16
501(1)
FAT32
501(1)
NTFS
502(1)
Primary Disk Areas
503(1)
Section Review
504(1)
Disk Directory
505(6)
MS-DOS Directory Structure
505(3)
Long Filenames in MS-Windows
508(2)
File Allocation Table (FAT)
510(1)
Section Review
511(1)
Reading and Writing Disk Sectors (7305h)
511(6)
Sector Display Program
513(4)
Section Review
517(1)
System-Level File Functions
517(6)
Get Disk Free Space (7303h)
518(1)
Disk Free Space Program
519(2)
Create Subdirectory (39h)
521(1)
Remove Subdirectory (3Ah)
521(1)
Set Current Directory (3Bh)
522(1)
Get Current Directory (47h)
522(1)
Section Review
522(1)
Chapter Summary
523(1)
Programming Exercises
524(3)
BIOS-Level Programming
527(56)
Introduction
527(2)
BIOS Data Area
528(1)
Keyboard Input with INT 16h
529(8)
How the Keyboard Works
530(1)
INT 16h Functions
531(1)
Set Typematic Rate (03h)
531(1)
Push Key into Keyboard Buffer (05h)
531(1)
Wait for Key (10h)
532(1)
Check Keyboard Buffer (11h)
533(1)
Get Keyboard Flags
534(1)
Clearing the Keyboard Buffer
535(2)
Section Review
537(1)
Video Programming with INT 10h
537(18)
Basic Background
537(1)
Three Levels of Access
537(1)
Running Programs in Full-Screen Mode
538(1)
Understanding Video Text
538(1)
Controlling the Color
539(1)
Mixing Primary Colors
539(1)
Attribute Byte
540(1)
INT 10h Video Functions
541(1)
Set Video Mode (00h)
542(1)
Set Cursor Lines (01h)
543(1)
Set Cursor Position (02h)
544(1)
Get Cursor Position and Size (03h)
544(2)
Scroll Window Up (06h)
546(1)
Example: Writing Text to a Window
547(1)
Scroll Window Down (07h)
548(1)
Read Character and Attribute (08h)
548(1)
Write Character and Attribute (09h)
548(1)
Write Character (0Ah)
549(1)
Toggle Blinking and Intensity Modes
550(1)
Get Video Mode Information (OFh)
550(1)
Write String in Teletype Mode (13h)
551(1)
Example: Displaying a Color String
552(2)
Library Procedure Examples
554(1)
Gotoxy Procedure
554(1)
Clrscr Procedure
554(1)
Section Review
555(1)
Drawing Graphics Using INT 10h
555(8)
INT 10h Pixel-Related Functions
556(1)
Write Graphics Pixel (0Ch)
556(1)
Read Graphics Pixel (0Dh)
557(1)
DrawLine Program
557(2)
Cartesian Coordinates Program
559(3)
Converting Cartesian Coordinates to Screen Coordinates
562(1)
Section Review
563(1)
Memory-Mapped Graphics
563(5)
Mode 13h: 320 X 200, 256 Colors
563(2)
Memory-Mapped Graphics Program
565(3)
Section Review
568(1)
Mouse Programming
568(12)
Mouse INT 33h Functions
568(1)
Reset Mouse and Get Status
568(1)
Showing and Hiding the Mouse Pointer
569(1)
Get Mouse Position and Status
570(1)
Set Mouse Position
571(1)
Get Button Presses and Releases
571(2)
Setting Horizontal and Vertical Limits
573(1)
Miscellaneous Mouse Functions
573(1)
Mouse Tracking Program
574(5)
Section Review
579(1)
Chapter Summary
580(1)
Chapter Exercises
580(3)
Expert MS-DOS Programming
583(28)
Introduction
583(1)
Defining Segments
584(8)
Simplified Segment Directives
584(2)
Explicit Segment Definitions
586(1)
Align Type
587(1)
Combine Type
587(1)
Class Type
588(1)
Assume Directive
588(1)
Example: Multiple Data Segments
588(1)
Segment Overrides
589(1)
Combining Segments
590(2)
Section Review
592(1)
Runtime Program Structure
592(5)
COM Programs
593(2)
EXE Programs
595(1)
Memory Usage
595(1)
EXE Header
596(1)
Section Review
597(1)
Interrupt Handling
597(12)
Hardware Interrupts
599(1)
Interrupt Control Instructions
600(1)
Writing a Custom Interrupt Handler
601(1)
Ctrl-Break Handler Example
602(2)
Terminate and Stay Resident Programs
604(1)
Keyboard Example
604(1)
Application: The No Reset Program
605(4)
Section Review
609(1)
Chapter Summary
609
Advanced Topics
Hardware Control Using I/O Ports
1(3)
Input-Output Ports
1(1)
PC Sound Program
2(2)
Intel Instruction Encoding
4(8)
Single-Byte Instructions
5(1)
Immediate Operands
6(1)
Register-Mode Instructions
6(1)
Memory-Mode Instructions
7(2)
MOV Instruction Examples
9(2)
Section Review
11(1)
Floating-Point Arithmetic
12(599)
IEEE Binary Floating-Point Representation
12(1)
The Sign
12(1)
The Mantissa
12(1)
The Exponent
13(1)
Normalizing the Mantissa
14(1)
Creating the IEEE Bit Representation
15(1)
Converting Decimal Fractions to Binary Reals
15(2)
IA-32 Floating Point Architecture
17(1)
Instruction Formats
18(3)
Floating-Point Code Examples
21(1)
Example 1: Evaluating an Expression
21(590)
Appendix A: Installing and Using the Assembler 611(6)
Appendix B: The Intel Instruction Set 617(32)
Appendix C: BIOS and MS-DOS Interrupts 649(12)
Appendix D: MASM Reference 661(28)
Index 689

Excerpts

Assembly Language for Intel-Based Computers, Fourth Editionis based on the Intel IA-32 Processor architecture, seen from a programmer's point of view. It is appropriate as a text in the following types of college courses for computer science majors: Assembly Language Programming Fundamentals of Computer Systems Fundamentals of Computer Architecture Although this book was originally designed as a programming textbook for community college students, it has gradually developed into much more. Currently, many universities use the book for their introductory computer architecture courses. At Florida International University, for example, this book is used in a course namedFundamentals of Computer Systems,which leads to a more comprehensive course in Computer Architecture. The present edition includes topics that lead naturally into subsequent courses in computer architecture, operating systems, and compiler writing: Virtual machine concept Elementary boolean operations Instruction execution cycle Memory access using clock cycles Interrupts and polling Multi-stage pipeline Superscalar architecture Multitasking Loading and executing programs Floating-point binary representation Other topics relate specifically to Intel IA-32 architecture, using information gained from its manuals: IA-32 Protected Memory addressing and paging Memory segmentation in Real-address mode Interrupt handling Direct hardware I/O Instruction encoding Certain examples presented in the book lend themselves to courses that occur later in a computer science curriculum: Searching and sorting algorithms High-level language structures Finite-state machines Code optimization examples There are a number of new features in this edition that relate to programming: A more comprehensive and logical explanation of data definition. A more careful explanation of addressing modes. A simplified link library that requires fewer input parameters for nearly all procedures. There are new procedures to dump the CPU registers and sections of memory, as well as a delay timer. An explanation and demonstration of top-down program design. Use of flowcharts as code-generation tools. Even more thorough coverage of assembly language directives, macros, and operators. For example, the PROC, PROTO, and INVOKE directives are thoroughly explained and demonstrated. More complete coverage of structures, including nested structures and arrays of structures. Block-structured IF, WHILE, and REPEAT statements (an advanced feature of MASM). Introduction to video graphics, using both BIOS and direct-memory mapping techniques. Mouse programming. Win32 Console programming, using calls to the Kernel32 Windows library. More array manipulation examples. Still a Programming Book.It is important to note that this book is still focused on its original mission: to teach students how to write and debug programs at the machine level. It will never replace a complete book on computer architecture, but it does give students the first-hand experience of writing software in an environment that teaches them how the computer really works. The value of this cannot be underestimated, because they will retain a great deal more theoretical knowledge by having immediate contact with the machine. In an engineering course, students construct prototypes; in a software course, students write programs. In both cases, they have a memorable experience that gives them the confidence to work in any OS/machine-oriented environment. Real Mode and Protected Mode.Many


Please wait while the item is added to your cart...