Art Of Intel x86 Assembly.

دانلود کتاب Art Of Intel x86 Assembly.

50000 تومان موجود

کتاب مونتاژ هنر اینتل x86. نسخه زبان اصلی

دانلود کتاب مونتاژ هنر اینتل x86. بعد از پرداخت مقدور خواهد بود
توضیحات کتاب در بخش جزئیات آمده است و می توانید موارد را مشاهده فرمایید


این کتاب نسخه اصلی می باشد و به زبان فارسی نیست.


امتیاز شما به این کتاب (حداقل 1 و حداکثر 5):

امتیاز کاربران به این کتاب:        تعداد رای دهنده ها: 11


توضیحاتی در مورد کتاب Art Of Intel x86 Assembly.

نام کتاب : Art Of Intel x86 Assembly.
عنوان ترجمه شده به فارسی : مونتاژ هنر اینتل x86.
سری :
نویسندگان :
ناشر :
سال نشر : 1994
تعداد صفحات : 1426

زبان کتاب : English
فرمت کتاب : pdf
حجم کتاب : 4 مگابایت



بعد از تکمیل فرایند پرداخت لینک دانلود کتاب ارائه خواهد شد. درصورت ثبت نام و ورود به حساب کاربری خود قادر خواهید بود لیست کتاب های خریداری شده را مشاهده فرمایید.


فهرست مطالب :


Brief TOC
Full TOC
Why Would Anyone Learn This Stuff?
WhatÌs Wrong With Assembly Language
WhatÌs Right With Assembly Language?
Organization of This Text and Pedagogical Concerns
Obtaining Program Source Listings and Other Materials in This Text
1. Data Representation
Chapter Overview
Numbering Systems
A Review of the Decimal System
The Binary Numbering System
Binary Formats
Data Organization
Bits
Nibbles
Bytes
Words
Double Words
The Hexadecimal Numbering System
Arithmetic Operations on Binary and Hexadecimal Numbers
Logical Operations on Bits
Logical Operations on Binary Numbers and Bit Strings
Signed and Unsigned Numbers
Sign and Zero Extension
Shifts and Rotates
Bit Fields and Packed Data
The ASCII Character Set
Summary
Laboratory Exercises
Installing the Software
Data Conversion Exercises
Logical Operations Exercises
Sign and Zero Extension Exercises
Packed Data Exercises
Questions
Programming Projects
2. Boolean Algebra
Chapter Overview
Boolean Algebra
Boolean Functions and Truth Tables
Algebraic Manipulation of Boolean Expressions
Canonical Forms
Simplification of Boolean Functions
What Does This Have To Do With Computers, Anyway?
Correspondence Between Electronic Circuits and Boolean Functions
Combinatorial Circuits
Sequential and Clocked Logic
Okay, What Does It Have To Do With Programming, Then?
Generic Boolean Functions
Laboratory Exercises
Truth Tables and Logic Equations Exercises
Canonical Logic Equations Exercises
Optimization Exercises
Logic Evaluation Exercises
Programming Projects
Summary
Questions
3. System Organization
Chapter Overview
The Basic System Components
The System Bus
The Data Bus
The Address Bus
The Control Bus
The Memory Subsystem
The I/O Subsystem
System Timing
The System Clock
Memory Access and the System Clock
Wait States
Cache Memory
The 886, 8286, 8486, and 8686 ÏHypotheticalÓ Processors
CPU Registers
The Arithmetic & Logical Unit
The Bus Interface Unit
The Control Unit and Instruction Sets
The x86 Instruction Set
Addressing Modes on the x86
Encoding x86 Instructions
Step-by-Step Instruction Execution
The Differences Between the x86 Processors
The 886 Processor
The 8286 Processor
The 8486 Processor
The 8486 Pipeline
Stalls in a Pipeline
Cache, the Prefetch Queue, and the 8486
Hazards on the 8486
The 8686 Processor
I/O (Input/Output)
Interrupts and Polled I/O
Laboratory Exercises
The SIMx86 Program Ò Some Simple x86 Programs
Simple I/O-Mapped Input/Output Operations
Memory Mapped I/O
DMA Exercises
Interrupt Driven I/O Exercises
Machine Language Programming & Instruction Encoding Exercises
Self Modifying Code Exercises
Programming Projects
Summary
Questions
4. Memory Layout and Access
Chapter Overview
The 80x86 CPUs:A ProgrammerÌs View
8086 General Purpose Registers
8086 Segment Registers
8086 Special Purpose Registers
80286 Registers
80386/80486 Registers
80x86 Physical Memory Organization
Segments on the 80x86
Normalized Addresses on the 80x86
Segment Registers on the 80x86
The 80x86 Addressing Modes
8086 Register Addressing Modes
8086 Memory Addressing Modes
The Displacement Only Addressing Mode
The Register Indirect Addressing Modes
Indexed Addressing Modes
Based Indexed Addressing Modes
Based Indexed Plus Displacement Addressing Mode
An Easy Way to Remember the 8086 Memory Addressing Modes
Some Final Comments About 8086 Addressing Modes
80386 Register Addressing Modes
80386 Memory Addressing Modes
Register Indirect Addressing Modes
80386 Indexed, Base/Indexed, and Base/Indexed/Disp Addressing Modes
80386 Scaled Indexed Addressing Modes
Some Final Notes About the 80386 Memory Addressing Modes
The 80x86 MOV Instruction
Some Final Comments on the MOV Instructions
Laboratory Exercises
The UCR Standard Library for 80x86 Assembly Language Programmers
Editing Your Source Files
The SHELL.ASM File
Assembling Your Code with MASM
Debuggers and CodeViewë
A Quick Look at CodeView
The Source Window
The Memory Window
The Register Window
The Command Window
The Output Menu Item
The CodeView Command Window
The Radix Command (N)
The Assemble Command
The Compare Memory Command
The Dump Memory Command
The Enter Command
The Fill Memory Command
The Move Memory Command
The Input Command
The Output Command
The Quit Command
The Register Command
The Unassemble Command
CodeView Function Keys
Some Comments on CodeView Addresses
A Wrap on CodeView
Laboratory Tasks
Programming Projects
Summary
Questions
5. Variables and Data Structures
Chapter Overview
Some Additional Instructions: LEA, LES, ADD, and MUL
Declaring Variables in an Assembly Language Program
Declaring and Accessing Scalar Variables
Declaring and using BYTE Variables
Declaring and using WORD Variables
Declaring and using DWORD Variables
Declaring and using FWORD, QWORD, and TBYTE Variables
Declaring Floating Point Variables with REAL4, REAL8, and REAL10
Creating Your Own Type Names with TYPEDEF
Pointer Data Types
Composite Data Types
Arrays
Declaring Arrays in Your Data Segment
Accessing Elements of a Single Dimension Array
Multidimensional Arrays
Row Major Ordering
Column Major Ordering
Allocating Storage for Multidimensional Arrays
Accessing Multidimensional Array Elements in Assembly Language
Structures
Arrays of Structures and Arrays/Structures as Structure Fields
Pointers to Structures
Sample Programs
Simple Variable Declarations
Using Pointer Variables
Single Dimension Array Access
Multidimensional Array Access
Simple Structure Access
Arrays of Structures
Structures and Arrays as Fields of Another Structure
Pointers to Structures and Arrays of Structures
Laboratory Exercises
Programming Projects
Summary
Questions
6. The 80x86 Instruction Set
Chapter Overview
The Processor Status Register (Flags)
Instruction Encodings
Data Movement Instructions
The MOV Instruction
The XCHG Instruction
The LDS, LES, LFS, LGS, and LSS Instructions
The LEA Instruction
The PUSH and POP Instructions
The LAHF and SAHF Instructions
Conversions
The MOVZX, MOVSX, CBW, CWD, CWDE, and CDQ Instructions
The BSWAP Instruction
The XLAT Instruction
Arithmetic Instructions
The Addition Instructions: ADD, ADC, INC, XADD, AAA, and DAA
The ADD and ADC Instructions
The INC Instruction
The XADD Instruction
The AAA and DAA Instructions
The Subtraction Instructions: SUB, SBB, DEC, AAS, and DAS
The CMP Instruction
The CMPXCHG, and CMPXCHG8B Instructions
The NEG Instruction
The Multiplication Instructions: MUL, IMUL, and AAM
The Division Instructions: DIV, IDIV, and AAD
Logical, Shift, Rotate and Bit Instructions
The Logical Instructions: AND, OR, XOR, and NOT
The Shift Instructions: SHL/SAL, SHR, SAR, SHLD, and SHRD
SHL/SAL
SAR
SHR
The SHLD and SHRD Instructions
The Rotate Instructions: RCL, RCR, ROL, and ROR
RCL
RCR
ROL
ROR
The Bit Operations
TEST
The Bit Test Instructions: BT, BTS, BTR, and BTC
Bit Scanning: BSF and BSR
The ÏSet on ConditionÓ Instructions
I/O Instructions
String Instructions
Program Flow Control Instructions
Unconditional Jumps
The CALL and RET Instructions
The INT, INTO, BOUND, and IRET Instructions
The Conditional Jump Instructions
The JCXZ/JECXZ Instructions
The LOOP Instruction
The LOOPE/LOOPZ Instruction
The LOOPNE/LOOPNZ Instruction
Miscellaneous Instructions
Sample Programs
Simple Arithmetic I
Simple Arithmetic II
Logical Operations
Shift and Rotate Operations
Bit Operations and SETcc Instructions
String Operations
Conditional Jumps
CALL and INT Instructions
Conditional Jumps I
Conditional Jump Instructions II
Laboratory Exercises
The IBM/L System
IBM/L Exercises
Programming Projects
Summary
Questions
7. The UCR Standard Library
Chapter Overview
An Introduction to the UCR Standard Library
Memory Management Routines: MEMINIT, MALLOC, and FREE
The Standard Input Routines: GETC, GETS, GETSM
The Standard Output Routines: PUTC, PUTCR, PUTS, PUTH, PUTI, PRINT, and PRINTF
Formatted Output Routines: Putisize, Putusize, Putlsize, and Putulsize
Output Field Size Routines: Isize, Usize, and Lsize
Conversion Routines: ATOx, and xTOA
Routines that Test Characters for Set Membership
Character Conversion Routines: ToUpper, ToLower
Random Number Generation: Random, Randomize
Constants, Macros, and other Miscellany
Plus more!
Sample Programs
Stripped SHELL.ASM File
Numeric I/O
Laboratory Exercises
Obtaining the UCR Standard Library
Unpacking the Standard Library
Using the Standard Library
The Standard Library Documentation Files
Programming Projects
Summary
Questions
8. MASM: Directives & Pseudo-Opcodes
Chapter Overview
Assembly Language Statements
The Location Counter
Symbols
Literal Constants
Integer Constants
String Constants
Real Constants
Text Constants
Declaring Manifest Constants Using Equates
Processor Directives
Procedures
Segments
Segment Names
Segment Loading Order
Segment Operands
The ALIGN Type
The COMBINE Type
The CLASS Type
The Read-only Operand
The USE16, USE32, and FLAT Options
Typical Segment Definitions
Why You Would Want to Control the Loading Order
Segment Prefixes
Controlling Segments with the ASSUME Directive
Combining Segments: The GROUP Directive
Why Even Bother With Segments?
The END Directive
Variables
Label Types
How to Give a Symbol a Particular Type
Label Values
Type Conflicts
Address Expressions
Symbol Types and Addressing Modes
Arithmetic and Logical Operators
Coercion
Type Operators
Operator Precedence
Conditional Assembly
IF Directive
IFE directive
IFDEF and IFNDEF
IFB, IFNB
IFIDN, IFDIF, IFIDNI, and IFDIFI
Macros
Procedural Macros
Macros vs. 80x86 Procedures
The LOCAL Directive
The EXITM Directive
Macro Parameter Expansion and Macro Operators
A Sample Macro to Implement For Loops
Macro Functions
Predefined Macros, Macro Functions, and Symbols
Macros vs. Text Equates
Macros: Good and Bad News
Repeat Operations
The FOR and FORC Macro Operations
The WHILE Macro Operation
Macro Parameters
Controlling the Listing
The ECHO and %OUT Directives
The TITLE Directive
The SUBTTL Directive
The PAGE Directive
The .LIST, .NOLIST, and .XLIST Directives
Other Listing Directives
Managing Large Programs
The INCLUDE Directive
The PUBLIC, EXTERN, and EXTRN Directives
The EXTERNDEF Directive
Make Files
Sample Program
EX8.MAK
Matrix.A
EX8.ASM
GETI.ASM
GetArray.ASM
XProduct.ASM
Laboratory Exercises
Near vs. Far Procedures
Data Alignment Exercises
Equate Exercise
IFDEF Exercise
Make File Exercise
Programming Projects
Summary
Questions
9. Arithmetic and Logical Operations
Chapter Overview
Arithmetic Expressions
Simple Assignments
Simple Expressions
Complex Expressions
Commutative Operators
Logical (Boolean) Expressions
Multiprecision Operations
Multiprecision Addition Operations
Multiprecision Subtraction Operations
Extended Precision Comparisons
Extended Precision Multiplication
Extended Precision Division
Extended Precision NEG Operations
Extended Precision AND Operations
Extended Precision OR Operations
Extended Precision XOR Operations
Extended Precision NOT Operations
Extended Precision Shift Operations
Extended Precision Rotate Operations
Operating on Different Sized Operands
Machine and Arithmetic Idioms
Multiplying Without MUL and IMUL
Division Without DIV and IDIV
Using AND to Compute Remainders
Implementing Modulo-n Counters with AND
Testing an Extended Precision Value for 0FFFF..FFh
TEST Operations
Testing Signs with the XOR Instruction
Masking Operations
Masking Operations with the AND Instruction
Masking Operations with the OR Instruction
Packing and Unpacking Data Types
Tables
Function Computation via Table Look Up
Domain Conditioning
Generating Tables
Sample Programs
Converting Arithmetic Expressions to Assembly Language
Boolean Operations Example
64-bit Integer I/O
Packing and Unpacking Date Data Types
Laboratory Exercises
Debugging Programs with CodeView
Debugging Strategies
Locating Infinite Loops
Incorrect Computations
Illegal Instructions/Infinite Loops Part II
Debug Exercise I: Using CodeView to Find Bugs in a Calculation
Software Delay Loop Exercises
Programming Projects 9.12 Summary
Questions
10. Control Structures
Chapter Overview
Introduction to Decisions
IF..THEN..ELSE Sequences
CASE Statements
State Machines and Indirect Jumps
Spaghetti Code
Loops
While Loops
Repeat..Until Loops
LOOP..ENDLOOP Loops
FOR Loops
Register Usage and Loops
Performance Improvements
Moving the Termination Condition to the End of a Loop
Executing the Loop Backwards
Loop Invariant Computations
Unraveling Loops
Induction Variables
Other Performance Improvements
Nested Statements
Timing Delay Loops
Sample Program
Laboratory Exercises
The Physics of Sound
The Fundamentals of Music
The Physics of Music
The 8253/8254 Timer Chip
Programming the Timer Chip to Produce Musical Tones
Putting it All Together
Amazing Grace Exercise
Programming Projects
Summary
Questions
11. Procedures and Functions
Chapter Overview
Procedures
Near and Far Procedures
Forcing NEAR or FAR CALLs and Returns
Nested Procedures
Functions
Saving the State of the Machine
Parameters
Pass by Value
Pass by Reference
Pass by Value-Returned
Pass by Result
Pass by Name
Pass by Lazy-Evaluation
Passing Parameters in Registers
Passing Parameters in Global Variables
Passing Parameters on the Stack
Passing Parameters in the Code Stream
Passing Parameters via a Parameter Block
Function Results
Returning Function Results in a Register
Returning Function Results on the Stack
Returning Function Results in Memory Locations
Side Effects
Local Variable Storage
Recursion
Sample Program
Laboratory Exercises
Ex11_1.cpp
Ex11_1.asm
EX11_1a.asm
Programming Projects
Summary
Questions
12. Procedures: Advanced Topics
Chapter Overview
Lexical Nesting, Static Links, and Displays
Scope
Unit Activation, Address Binding, and Variable Lifetime
Static Links
Accessing Non-Local Variables Using Static Links
The Display
The 80286 ENTER and LEAVE Instructions
Passing Variables at Different Lex Levels as Parameters.
Passing Parameters by Value in a Block Structured Language
Passing Parameters by Reference, Result, and Value-Result in a Block Structured Language
Passing Parameters by Name and Lazy-Evaluation in a Block Structured Language
Passing Parameters as Parameters to Another Procedure
Passing Reference Parameters to Other Procedures
Passing Value-Result and Result Parameters as Parameters
Passing Name Parameters to Other Procedures
Passing Lazy Evaluation Parameters as Parameters
Parameter Passing Summary
Passing Procedures as Parameters
Iterators
Implementing Iterators Using In-Line Expansion
Implementing Iterators with Resume Frames
Sample Programs
An Example of an Iterator
Another Iterator Example
Laboratory Exercises
Iterator Exercise
The 80x86 Enter and Leave Instructions
Parameter Passing Exercises
Programming Projects
Summary
Questions
13. MS-DOS, PC-BIOS, and File I/O
Chapter Overview
The IBM PC BIOS
An Introduction to the BIOSÌ Services
INT 5- Print Screen
INT 10h - Video Services
INT 11h - Equipment Installed
INT 12h - Memory Available
INT 13h - Low Level Disk Services
INT 14h - Serial I/O
AH=0: Serial Port Initialization
AH=1: Transmit a Character to the Serial Port
AH=2: Receive a Character from the Serial Port
AH=3: Serial Port Status
INT 15h - Miscellaneous Services
INT 16h - Keyboard Services
AH=0: Read a Key From the Keyboard
AH=1: See if a Key is Available at the Keyboard
AH=2: Return Keyboard Shift Key Status
INT 17h - Printer Services
AH=0: Print a Character
AH=1: Initialize Printer
AH=2: Return Printer Status
INT 18h - Run BASIC
INT 19h - Reboot Computer
INT 1Ah - Real Time Clock
AH=0: Read the Real Time Clock
AH=1: Setting the Real Time Clock
An Introduction to MS-DOSë
MS-DOS Calling Sequence
MS-DOS Character Oriented Functions
MS-DOS Drive Commands
MS-DOS ÏObsoleteÓ Filing Calls
MS-DOS Date and Time Functions
MS-DOS Memory Management Functions
Allocate Memory
Deallocate Memory
Modify Memory Allocation
Advanced Memory Management Functions
MS-DOS Process Control Functions
Terminate Program Execution
Terminate, but Stay Resident
Execute a Program
MS-DOS ÏNewÓ Filing Calls
Open File
Create File
Close File
Read From a File
Write to a File
Seek (Move File Pointer)
Set Disk Transfer Address (DTA)
Find First File
Find Next File
Delete File
Rename File
Change/Get File Attributes
Get/Set File Date and Time
Other DOS Calls
File I/O Examples
Example #1: A Hex Dump Utility
Example #2: Upper Case Conversion
Blocked File I/O
The Program Segment Prefix (PSP)
Accessing Command Line Parameters
ARGC and ARGV
UCR Standard Library File I/O Routines
Fopen
Fcreate
Fclose
Fflush
Fgetc
Fread
Fputc
Fwrite
Redirecting I/O Through the StdLib File I/O Routines
A File I/O Example
Sample Program
Laboratory Exercises
Programming Projects
Summary
Questions
14. Floating Point Arithmetic
Chapter Overview
The Mathematics of Floating Point Arithmetic
IEEE Floating Point Formats
The UCR Standard Library Floating Point Routines
Load and Store Routines
Integer/Floating Point Conversion
Floating Point Arithmetic
Float/Text Conversion and Printff
The 80x87 Floating Point Coprocessors
FPU Registers
The FPU Data Registers
The FPU Control Register
The FPU Status Register
FPU Data Types
The FPU Instruction Set
FPU Data Movement Instructions
The FLD Instruction
The FST and FSTP Instructions
The FXCH Instruction
Conversions
The FILD Instruction
The FIST and FISTP Instructions
The FBLD and FBSTP Instructions
Arithmetic Instructions
The FADD and FADDP Instructions
The FSUB, FSUBP, FSUBR, and FSUBRP Instructions
The FMUL and FMULP Instructions
The FDIV, FDIVP, FDIVR, and FDIVRP Instructions
The FSQRT Instruction
The FSCALE Instruction
The FPREM and FPREM1 Instructions
The FRNDINT Instruction
The FXTRACT Instruction
The FABS Instruction
The FCHS Instruction
Comparison Instructions
The FCOM, FCOMP, and FCOMPP Instructions
The FUCOM, FUCOMP, and FUCOMPP Instructions
The FTST Instruction
The FXAM Instruction
Constant Instructions
Transcendental Instructions
The F2XM1 Instruction
The FSIN, FCOS, and FSINCOS Instructions
The FPTAN Instruction
The FPATAN Instruction
The FYL2X and FYL2XP1 Instructions
Miscellaneous instructions
The FINIT and FNINIT Instructions
The FWAIT Instruction
The FLDCW and FSTCW Instructions
The FCLEX and FNCLEX Instructions
The FLDENV, FSTENV, and FNSTENV Instructions
The FSAVE, FNSAVE, and FRSTOR Instructions
The FSTSW and FNSTSW Instructions
The FINCSTP and FDECSTP Instructions
The FNOP Instruction
The FFREE Instruction
Integer Operations
Sample Program: Additional Trigonometric Functions
Laboratory Exercises
FPU vs StdLib Accuracy
Programming Projects 14.8 Summary
Questions
15. Strings and Character Sets
Chapter Overview
The 80x86 String Instructions
How the String Instructions Operate
The REP/REPE/REPZ and REPNZ/REPNE Prefixes
The Direction Flag
The MOVS Instruction
The CMPS Instruction
The SCAS Instruction
The STOS Instruction
The LODS Instruction
Building Complex String Functions from LODS and STOS
Prefixes and the String Instructions
Character Strings
Types of Strings
String Assignment
String Comparison
Character String Functions
Substr
Index
Repeat
Insert
Delete
Concatenation
String Functions in the UCR Standard Library
StrBDel, StrBDelm
Strcat, Strcatl, Strcatm, Strcatml
Strchr
Strcmp, Strcmpl, Stricmp, Stricmpl
Strcpy, Strcpyl, Strdup, Strdupl
Strdel, Strdelm
Strins, Strinsl, Strinsm, Strinsml
Strlen
Strlwr, Strlwrm, Strupr, Struprm
Strrev, Strrevm
Strset, Strsetm
Strspan, Strspanl, Strcspan, Strcspanl
Strstr, Strstrl
Strtrim, Strtrimm
Other String Routines in the UCR Standard Library
The Character Set Routines in the UCR Standard Library
Using the String Instructions on Other Data Types
Multi-precision Integer Strings
Dealing with Whole Arrays and Records
Sample Programs
Find.asm
StrDemo.asm
Fcmp.asm
Laboratory Exercises
MOVS Performance Exercise #1
MOVS Performance Exercise #2
Memory Performance Exercise
The Performance of Length-Prefixed vs. Zero-Terminated Strings
Programming Projects
Summary
Questions
16. Pattern Matching
An Introduction to Formal Language (Automata) Theory
Machines vs. Languages
Regular Languages
Regular Expressions
Nondeterministic Finite State Automata (NFAs)
Converting Regular Expressions to NFAs
Converting an NFA to Assembly Language
Deterministic Finite State Automata (DFAs)
Converting a DFA to Assembly Language
Context Free Languages
Eliminating Left Recursion and Left Factoring CFGs
Converting REs to CFGs
Converting CFGs to Assembly Language
Some Final Comments on CFGs
Beyond Context Free Languages
The UCR Standard Library Pattern Matching Routines
The Standard Library Pattern Matching Functions
Spancset
Brkcset
Anycset
Notanycset
MatchStr
MatchiStr
MatchToStr
MatchChar
MatchToChar
MatchChars
MatchToPat
EOS
ARB
ARBNUM
Skip
Pos
RPos
GotoPos
RGotoPos
SL_Match2
Designing Your Own Pattern Matching Routines
Extracting Substrings from Matched Patterns
Semantic Rules and Actions
Constructing Patterns for the MATCH Routine
Some Sample Pattern Matching Applications
Converting Written Numbers to Integers
Processing Dates
Evaluating Arithmetic Expressions
A Tiny Assembler
The ÏMADVENTUREÓ Game
Laboratory Exercises
Checking for Stack Overflow (Infinite Loops)
Printing Diagnostic Messages from a Pattern
Programming Projects
Summary
Questions
17. Interrupts, Traps, and Exceptions
80x86 Interrupt Structure and Interrupt Service Routines (ISRs)
Traps
Exceptions
Divide Error Exception (INT 0)
Single Step (Trace) Exception (INT 1)
Breakpoint Exception (INT 3)
Overflow Exception (INT 4/INTO)
Bounds Exception (INT 5/BOUND)
Invalid Opcode Exception (INT 6)
Coprocessor Not Available (INT 7)
Hardware Interrupts
The 8259A Programmable Interrupt Controller (PIC)
The Timer Interrupt (INT 8)
The Keyboard Interrupt (INT 9)
The Serial Port Interrupts (INT 0Bh and INT 0Ch)
The Parallel Port Interrupts (INT 0Dh and INT 0Fh)
The Diskette and Hard Drive Interrupts (INT 0Eh and INT 76h)
The Real-Time Clock Interrupt (INT 70h)
The FPU Interrupt (INT 75h)
Nonmaskable Interrupts (INT 2)
Other Interrupts
Chaining Interrupt Service Routines
Reentrancy Problems
The Efficiency of an Interrupt Driven System
Interrupt Driven I/O vs. Polling
Interrupt Service Time
Interrupt Latency
Prioritized Interrupts
Debugging ISRs
Summary
18. Resident Programs
DOS Memory Usage and TSRs
Active vs. Passive TSRs
Reentrancy
Reentrancy Problems with DOS
Reentrancy Problems with BIOS
Reentrancy Problems with Other Code
The Multiplex Interrupt (INT 2Fh)
Installing a TSR
Removing a TSR
Other DOS Related Issues
A Keyboard Monitor TSR
Semiresident Programs
Summary
19. Processes, Coroutines, and Concurrency
DOS Processes
Child Processes in DOS
Load and Execute
Load Program
Loading Overlays
Terminating a Process
Obtaining the Child Process Return Code
Exception Handling in DOS: The Break Handler
Exception Handling in DOS: The Critical Error Handler
Exception Handling in DOS: Traps
Redirection of I/O for Child Processes
Shared Memory
Static Shared Memory
Dynamic Shared Memory
Coroutines
Multitasking
Lightweight and HeavyWeight Processes
The UCR Standard Library Processes Package
Problems with Multitasking
A Sample Program with Threads
Synchronization
Atomic Operations, Test & Set, and Busy-Waiting
Semaphores
The UCR Standard Library Semaphore Support
Using Semaphores to Protect Critical Regions
Using Semaphores for Barrier Synchronization
Deadlock
Summary
20. The PC Keyboard
Keyboard Basics
The Keyboard Hardware Interface
The Keyboard DOS Interface
The Keyboard BIOS Interface
The Keyboard Interrupt Service Routine
Patching into the INT 9 Interrupt Service Routine
Simulating Keystrokes
Stuffing Characters in the Type Ahead Buffer
Using the 80x86 Trace Flag to Simulate IN AL, 60H Instructions
Using the 8042 Microcontroller to Simulate Keystrokes
Summary
21. The PC Parallel Ports
Basic Parallel Port Information
The Parallel Port Hardware
Controlling a Printer Through the Parallel Port
Printing via DOS
Printing via BIOS
An INT 17h Interrupt Service Routine
Inter-Computer Communications on the Parallel Port
Summary
22. The PC Serial Ports
The 8250 Serial Communications Chip
The Data Register (Transmit/Receive Register)
The Interrupt Enable Register (IER)
The Baud Rate Divisor
The Interrupt Identification Register (IIR)
The Line Control Register
The Modem Control Register
The Line Status Register (LSR)
The Modem Status Register (MSR)
The Auxiliary Input Register
The UCR Standard Library Serial Communications Support Routines
Programming the 8250 (Examples from the Standard Library)
Summary
23. The PC Video Display
Memory Mapped Video
The Video Attribute Byte
Programming the Text Display
Summary
24. The PC Game Adapter
Typical Game Devices
The Game Adapter Hardware
Using BIOSÌ Game I/O Functions
Writing Your Own Game I/O Routines
The Standard Game Device Interface (SGDI)
Application ProgrammerÌs Interface (API)
Read4Sw
Read4Pots:
ReadPot
Read4:
CalibratePot
TestPotCalibration
ReadRaw
ReadSwitch
Read16Sw
Remove
TestPresence
An SGDI Driver for the Standard Game Adapter Card
An SGDI Driver for the CH ProductsÌ Flight Stick Proë
Patching Existing Games
Summary
25. Optimizing Your Programs
Chapter Overview 25.1 When to Optimize, When Not to Optimize
How Do You Find the Slow Code in Your Programs?
Is Optimization Necessary?
The Three Types of Optimization
Improving the Implementation of an Algorithm
Summary
Appendix B: Annotated Bibliography
Appendix C: Keyboard Scan Codes
Appendix D: Instruction Set Reference




پست ها تصادفی