Example: tourism industry

The Art of Assembly Language - Instituto de Computação

The Art of Assembly LanguagePage i The Art of Assembly Language (Brief Contents) Forward Why Would Anyone Learn This Stuff? .. 1 Section One: .. 9 Chapter One Data Representation .. 11 Chapter Two Boolean Algebra .. 43 Chapter Three System Organization .. 83 Chapter Four Memory Layout and Access .. 145 Section Two: .. 193 Chapter Five Variables and Data Structures .. 195 Chapter Six The 80x86 Instruction Set .. 243 Chapter Seven The UCR Standard Library .. 333 Chapter Eight MASM: Directives & Pseudo-Opcodes .. 355 Chapter Nine Arithmetic and Logical Operations .. 459 Chapter 10 Control Structures .. 521 Chapter 11 Procedures and Functions .. 565 Section Three: .. 637 Chapter 12 Procedures: Advanced Topics .. 639 Chapter 13 MS-DOS, PC-BIOS, and File I/O .. 699 Chapter 14 Floating Point Arithmetic .. 771 Chapter 15 Strings and Character Sets .. 819 Chapter 16 Pattern Matching.

The Art of Assembly Language Page v 3.3.12.4 Hazards on the 8486 ..... 122

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of The Art of Assembly Language - Instituto de Computação

1 The Art of Assembly LanguagePage i The Art of Assembly Language (Brief Contents) Forward Why Would Anyone Learn This Stuff? .. 1 Section One: .. 9 Chapter One Data Representation .. 11 Chapter Two Boolean Algebra .. 43 Chapter Three System Organization .. 83 Chapter Four Memory Layout and Access .. 145 Section Two: .. 193 Chapter Five Variables and Data Structures .. 195 Chapter Six The 80x86 Instruction Set .. 243 Chapter Seven The UCR Standard Library .. 333 Chapter Eight MASM: Directives & Pseudo-Opcodes .. 355 Chapter Nine Arithmetic and Logical Operations .. 459 Chapter 10 Control Structures .. 521 Chapter 11 Procedures and Functions .. 565 Section Three: .. 637 Chapter 12 Procedures: Advanced Topics .. 639 Chapter 13 MS-DOS, PC-BIOS, and File I/O .. 699 Chapter 14 Floating Point Arithmetic .. 771 Chapter 15 Strings and Character Sets .. 819 Chapter 16 Pattern Matching.

2 883 Section Four: .. 993 Chapter 17 Interrupts, Traps, and Exceptions .. 995 Chapter 18 Resident Programs .. 1025 Chapter 19 Processes, Coroutines, and Concurrency .. 1065 Section Five: .. 1151 Chapter 20 The PC Keyboard .. 1153 Chapter 21 The PC Parallel Ports .. 1199 Chapter 22 The PC Serial Ports .. 1223 Chapter 23 The PC Video Display .. 1247 Chapter 24 The PC Game Adapter .. 1255 Section Six: .. 1309 Chapter 25 Optimizing Your Programs .. 1311 Section Seven: .. 1343 Appendix A: ASCII/IBM Character Set .. 1345 Appendix B: Annotated Bibliography .. 1347 Thi dtt d ith FM k4 0 2 Page ii Appendix C: Keyboard Scan Codes .. 1351 Appendix D: Instruction Set Reference .. 1361 The Art of Assembly LanguagePage iii The Art of Assembly Language (Full Contents) Forward Why Would Anyone Learn This Stuff? .. 1 1 What s Wrong With Assembly Language .

3 12 What s Right With Assembly Language ? .. 43 Organization of This Text and Pedagogical Concerns .. 54 Obtaining Program Source Listings and Other Materials in This Text .. 7 Section One: .. 9 Machine Organization .. 9 Chapter One Data Representation .. 11 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.

4 Installing the Software .. Data Conversion Exercises .. Logical Operations Exercises .. Sign and Zero Extension Exercises .. Packed Data Exercises .. Questions .. Programming Projects .. 41 Chapter Two Boolean Algebra .. 43 Chapter Overview .. Boolean Algebra .. 43 Thi dtt d ith FM k4 0 2 Page iv 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.

5 Optimization Exercises .. Logic Evaluation Exercises .. Programming Projects .. Summary .. Questions ..80 Chapter Three System Organization .. 83 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.

6 The 8486 Processor .. The 8486 Pipeline .. Stalls in a Pipeline .. Cache, the Prefetch Queue, and the 8486 .. 119 The Art of Assembly LanguagePage v 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 .. 142 Chapter Four Memory Layout and Access .. 145 Chapter Overview .. The 80x86 CPUs:A Programmer s View .. 8086 General Purpose Registers .. 8086 Segment Registers .. 8086 Special Purpose Registers .. 80286 Registers.

7 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.

8 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 .. 170 Page vi The 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.

9 A Wrap on CodeView .. Laboratory Tasks .. Programming Projects .. Summary .. Questions ..190 Section Two: .. 193 Basic Assembly Language ..193 Chapter Five Variables and Data Structures .. 195 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.

10 Row Major Ordering .. 211 The Art of Assembly LanguagePage vii 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 .. 241 Chapter Six The 80x86 Instruction Set .. 243 Chapter Overview .. The Processor Status Register (Flags) .. Instruction Encodings.


Related search queries