图书介绍

汇编语言艺术 影印版PDF|Epub|txt|kindle电子书版本网盘下载

汇编语言艺术 影印版
  • RandallHyde著 著
  • 出版社: 北京:清华大学出版社
  • ISBN:7302104352
  • 出版时间:2005
  • 标注页数:891页
  • 文件大小:409MB
  • 文件页数:909页
  • 主题词:汇编语言-程序设计-高等学校-教材-英文

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

汇编语言艺术 影印版PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

1 HELLO,WORLD OF ASSEMBLY LANGUAGE1

1.1 Chapter Overview1

1.2 The Anatomy of an HLA Program2

1.3 Running Your First HLA Program4

1.4 Some Basic HLA Data Declarations5

1.5 Boolean Values7

1.6 Character Values8

1.7 An Introduction to the Intel 80x86 CPU Family8

1.7.1 The Memory Subsystem11

1.8 Some Basic Machine Instructions14

1.9 Some Basic HLA Control Structures18

1.9.1 Boolean Expressions in HLA Statements18

1.9.2 The HLA IF..THEN..ELSEIF..ELSE..ENDIF Statement20

1.9.3 Conjunction,Disjunction,and Negation in Boolean Expressions22

1.9.4 The WHILE..ENDWHILE Statement25

1.9.5 The FOR..ENDFOR Statement25

1.9.6 The REPEAT..UNTILStatement26

1.9.7 The BREAK and BREAKIF Statements27

1.9.8 The FOREVER..ENDFOR Statement28

1.9.9 The TRY..EXCEPT1ON..ENDTRYStatement28

1.10 Introduction to the HLA Standard Library32

1.10.1 Predefined Constants in the STDIO Module33

1.10.2 Standard In and Standard Out34

1.10.3 The stdout.newln Routine34

1.10.4 The stdout.putiX Routines34

1.10.5 The stdout.putiXSize Routines35

1.10.6 The stdout.put Routine36

1.10.7 The stdin.getc Routine38

1.10.8 The stdin.getiX Routines39

1.10.9 The stdin.readLn and stdin.flushlnput Routines40

1.10.10 The stdin.get Routine41

1.11 Additional Details About TRY..ENDTRY42

1.11.1 Nesting TRY..ENDTRY Statements43

1.11.2 The UNPROTECTED Clause in a TRY..ENDTRY Statement45

1.11.3 The ANYEXCEPTION Clause in a TRY..ENDTRY Statement48

1.11.4 Registers and the TRY..ENDTRY Statement48

1.12 High Level Assembly Language vs.Low Level Assembly50

1.13 For More Information51

2 DATA REPRESENTATION53

2.1 Chapter Overview53

2.2 Numbering Systems54

2.2.1 A Review of the Decimal System54

2.2.2 The Binary Numbering System54

2.2.3 Binary Formats56

2.3 The Hexadecimal Numbering System57

2.4 Data Organization59

2.4.1 Bits59

2.4.2 Nibbles60

2.4.3 Bytes61

2.4.4 Words62

2.4.5 Double Words63

2.4.6 Quad Words and Long Words64

2.5 Arithmetic Operations on Binary and Hexadecimal Numbers65

2.6 A Note About Numbers vs.Representation66

2.7 Logical Operations on Bits69

2.8 Logical Operations on Binary Numbers and Bit Strings71

2.9 Signed and Unsigned Numbers73

2.10 Sign Extension,Zero Extension,Contraction,and Saturation78

2.11 Shifts and Rotates82

2.12 Bit Fields and Packed Data87

2.13 An Introduction to Floating Point Arithmetic92

2.13.1 IEEE Floating Point Formats95

2.13.2 HLA Support for Floating Point Values99

2.14 Binary Coded Decimal(BCD)Representation102

2.15 Characters104

2.15.1 The ASCII Character Encoding104

2.15.2 HLA Support for ASCII Characters108

2.16 The Unicode Character Set112

2.17 For More Information113

3 MEMORY ACCESS AND ORGANIZATION115

3.1 Chapter Overview115

3.2 The 80x86 Addressing Modes115

3.2.1 80x86 Register Addressing Modes116

3.2.2 80x86 32-Bit Memory Addressing Modes117

3.3 Run-Time Memory Organization124

3.3.1 The Code Section125

3.3.2 The Static Sections127

3.3.3 The Read-Only Data Section128

3.3.4 The Storage Section129

3.3.5 The @NOSTORAGE Attribute129

3.3.6 The Var Section130

3.3.7 Organization of Declaration Sections Within Your Programs131

3.4 How HLA Allocates Memory for Variables132

3.5 HLA Support for Data Alignment133

3.6 Address Expressions136

3.7 Type Coercion139

3.8 Register Type Coercion141

3.9 The Stack Segment and the PUSH and POP Instructions142

3.9.1 The Basic PUSH Instruction142

3.9.2 The Basic POP Instruction144

3.9.3 Preserving Registers with the PUSH and POP Instructions146

3.9.4 The Stack Is a LIFO Data Structure146

3.9.5 Other PUSH and POP Instructions149

3.9.6 Removing Data from the Stack Without Popping It150

3.9.7 Accessing Data You've Pushed on the Stack Without Popping It153

3.10 Dynamic Memory Allocation and the Heap Segment154

3.11 The INC and DEC Instructions159

3.12 Obtaining the Address of a Memory Object159

3.13 For More Information160

4 CONSTANTS,VARIABLES,AND DATA TYPES160

4.1 Chapter Overview161

4.2 Some Additional Instructions:INTMUL,BOUND,INTO162

4.3 The TBYTE Data Types166

4.4 HLA Constant and Value Declarations167

4.4.1 Constant Types170

4.4.2 String and Character Literal Constants171

4.4.3 String and Text Constants in the CONST Section174

4.4.4 Constant Expressions175

4.4.5 Multiple CONST Sections and Their Order in an HLA Program178

4.4.6 The HLA VAL Section178

4.4.7 Modifying VAL Objects at Arbitrary Points in Your Programs179

4.5 The HLA TYPE Section180

4.6 ENUM and HLA Enumerated Data Types181

4.7 Pointer Data Types182

4.7.1 Using Pointers in Assembly Language184

4.7.2 Declaring Pointers in HLA185

4.7.3 Pointer Constants and Pointer Constant Expressions185

4.7.4 Pointer Variables and Dynamic Memory Allocation187

4.7.5 Common Pointer Problems188

4.8 The HLA Standard Library CHARS.HHF Module192

4.9 Composite Data Types195

4.10 Character Strings195

4.11 HLA Strings198

4.12 Accessing the Characters Within a String204

4.13 The HLA String Module and Other String-Related Routines206

4.14 In-Memory Conversions219

4.15 Character Sets220

4.16 Character Set Implementation in HLA221

4.17 HLA Character Set Constants and Character Set Expressions223

4.18 The IN Operator in HLA HLL Boolean Expressions224

4.19 Character Set Support in the HLA Standard Library225

4.20 Using Character Sets in Your HLA Programs229

4.21 Arrays230

4.22 Declaring Arrays in Your HLA Programs231

4.23 HLA Array Constants232

4.24 Accessing Elements of a Single Dimension Array233

4.24.1 Sorting an Array of Values235

4.25 Multidimensional Arrays237

4.25.1 Row Major Ordering238

4.25.2 Column Major Ordering242

4.26 Allocating Storage for Multidimensional Arrays243

4.27 Accessing Multidimensional Array Elements in Assembly Language245

4.28 Large Arrays and MASM(Windows Programmers Only)246

4.29 Records247

4.30 Record Constants249

4.31 Arrays of Records250

4.32 Arrays/Records as Record Fields251

4.33 Controlling Field Offsets Within a Record255

4.34 Aligning Fields Within a Record256

4.35 Pointers to Records257

4.36 Unions259

4.37 Anonymous Unions262

4.38 Variant Types262

4.39 Union Constants263

4.40 Namespaces264

4.41 Dynamic Arrays in Assembly Language268

4.42 HLA Standard Library Array Support270

4.43 For More Information273

5 PROCEDURES AND UNITS275

5.1 Chapter Overview275

5.2 Procedures276

5.3 Saving the State of the Machine278

5.4 Prematurely Returning from a Procedure282

5.5 Local Variables283

5.6 Other Local and Global Symbol Types289

5.7 Parameters289

5.7.1 Pass by Value290

5.7.2 Pass by Reference293

5.8 Functions and Function Results296

5.8.1 Returning Function Results297

5.8.2 Instruction Composition in HLA298

5.8.3 The HLA @RETURNS Option in Procedures301

5.9 Recursion303

5.10 Forward Procedures307

5.11 Low Level Procedures and the CALL Instruction308

5.12 Procedures and the Stack311

5.13 Activation Records314

5.14 The Standard Entry Sequence317

5.15 The Standard Exit Sequence318

5.16 Low Level Implementation of Automatic(Local)Variables320

5.17 Low Level Parameter Implementation322

5.17.1 Passing Parameters in Registers322

5.17.2 Passing Parameters in the Code Stream325

5.17.3 Passing Parameters on the Stack328

5.18 Procedure Pointers350

5.19 Procedure Parameters354

5.20 Untyped Reference Parameters355

5.21 Managing Large Programs356

5.22 The #INCLUDE Directive357

5.23 Ignoring Duplicate #INCLUDE Operations358

5.24 UNITs and the EXTERNAL Directive359

5.24.1 Behavior of the EXTERNAL Directive364

5.24.2 Header Files in HLA365

5.25 Namespace Pollution366

5.26 For More Information369

6 ARITHMETIC371

6.1 Chapter Overview371

6.2 80x86 Integer Arithmetic Instructions371

6.2.1 The MUL and IMUL Instructions371

6.2.2 The DIV and IDIV Instructions375

6.2.3 The CMP Instruction378

6.2.4 The SETcc Instructions382

6.2.5 The TEST Instruction384

6.3 Arithmetic Expressions385

6.3.1 Simple Assignments386

6.3.2 Simple Expressions387

6.3.3 Complex Expressions389

6.3.4 Commutative Operators395

6.4 Logical(Boolean)Expressions396

6.5 Machine and Arithmetic Idioms398

6.5.1 Multiplying Without MUL,IMUL,or INTMUL398

6.5.2 Division Without DIV or IDIV400

6.5.3 Implementing Modulo-N Counters with AND400

6.5.4 Careless Use of Machine Idioms401

6.6 Floating Point Arithmetic401

6.6.1 FPU Registers402

6.6.2 FPU Data Types408

6.6.3 The FPU Instruction Set410

6.6.4 FPU Data Movement Instructions410

6.6.5 Conversions412

6.6.6 Arithmetic Instructions414

6.6.7 Comparison Instructions420

6.6.8 Constant Instructions422

6.6.9 Transcendental Instructions422

6.6.10 Miscellaneous Instructions424

6.6.11 Integer Operations426

6.7 Converting Floating Point Expressions to Assembly Language426

6.7.1 Converting Arithmetic Expressions to Postfix Notation428

6.7.2 Converting Postfix Notation to Assembly Language430

6.8 HLA Standard Library Support for Floating Point Arithmetic431

6.8.1 The stdin.getf and fileio.getf Functions431

6.8.2 Trigonometric Functions in the HLA Math Library432

6.8.3 Exponential and Logarithmic Functions in the HLA Math Library433

6.9 Putting It All Together434

7 LOW LEVEL CONTROL STRUCTURES434

7.1 Chapter Overview435

7.2 Low Level Control Structures435

7.3 Statement Labels436

7.4 Unconditional Transfer of Control(JMP)438

7.5 The Conditional Jump Instructions441

7.6 "Medium Level" Control Structures:JT and JF444

7.7 Implementing Common Control Structures in Assembly Language445

7.8 Introduction to Decisions445

7.8.1 IF..THEN..ELSE Sequences447

7.8.2 Translating HLA IF Statements into Pure Assembly Language451

7.8.3 Implementing Complex IF Statements Using Complete Boolean Evaluation456

7.8.4 Short-Circuit Boolean Evaluation457

7.8.5 Short-Circuit vs.Complete Boolean Evaluation459

7.8.6 Efficient Implementation of IF Statements in Assembly Language461

7.8.7 SWITCH/CASE Statements466

7.9 State Machines and Indirect Jumps477

7.10 Spaghetti Code480

7.11 Loops481

7.11.1 WHILE Loops482

7.11.2 REPEAT..UNTILLoops483

7.11.3 FOREVER..ENDFOR Loops484

7.11.4 FOR Loops485

7.11.5 The BREAK and CONTINUE Statements486

7.11.6 Register Usage and Loops490

7.12 Performance Improvements491

7.12.1 Moving the Termination Condition to the End of a Loop492

7.12.2 Executing the Loop Backward494

7.12.3 Loop Invariant Computations495

7.12.4 Unraveling Loops496

7.12.5 Induction Variables498

7.13 Hybrid Control Structures in HLA499

7.14 For More Information501

8 FILES503

8.1 Chapter Overview503

8.2 File Organization503

8.2.1 Files as Lists of Records504

8.2.2 Binary vs.Text Files506

8.3 Sequential Files508

8.4 Random Access Files516

8.5 ISAM(Indexed Sequential Access Method)Files520

8.6 Truncating a File524

8.7 For More Information525

9 ADVANCED ARITHMETIC527

9.1 Chapter Overview527

9.2 Multiprecision Operations528

9.2.1 HLA Standard Library Support for Extended Precision Operations528

9.2.2 Multiprecision Addition Operations531

9.2.3 Multiprecision Subtraction Operations534

9.2.4 Extended Precision Comparisons535

9.2.5 Extended Precision Multiplication539

9.2.6 Extended Precision Division543

9.2.7 Extended Precision NEG Operations553

9.2.8 Extended Precision AND Operations555

9.2.9 Extended Precision OR Operations555

9.2.10 Extended Precision XOR Operations556

9.2.11 Extended Precision NOT Operations556

9.2.12 Extended Precision Shift Operations556

9.2.13 Extended Precision Rotate Operations560

9.2.14 Extended Precision I/O561

9.3 Operating on Different-Sized Operands582

9.4 Decimal Arithmetic584

9.4.1 Literal BCD Constants585

9.4.2 The 80x86 DAA and DAS Instructions586

9.4.3 The 80x86 AAA,AAS,AAM,and AAD Instructions588

9.4.4 Packed Decimal Arithmetic Using the FPU589

9.5 Tables591

9.5.1 Function Computation via Table Look-Up592

9.5.2 Domain Conditioning597

9.5.3 Generating Tables598

9.5.4 Table Look-Up Performance601

9.6 For More Information602

10 MACROS AND THE HLA COMPILE TIME LANGUAGE602

10.1 Chapter Overview603

10.2 Introduction to the Compile Time Language(CTL)603

10.3 The #PRINT and #ERROR Statements605

10.4 Compile Time Constants and Variables607

10.5 Compile Time Expressions and Operators607

10.6 Compile Time Functions610

10.6.1 Type Conversion Compile Time Functions611

10.6.2 Numeric Compile Time Functions612

10.6.3 Character Classification Compile Time Functions613

10.6.4 Compile Time String Functions613

10.6.5 Compile Time Pattern Matching Functions614

10.6.6 Compile Time Symbol Information615

10.6.7 Miscellaneous Compile Time Functions616

10.6.8 Compile Time Type Conversions of TEXT Objects617

10.7 Conditional Compilation(Compile Time Decisions)618

10.8 Repetitive Compilation(Compile Time Loops)623

10.9 Macros(Compile Time Procedures)627

10.9.1 Standard Macros627

10.9.2 Macro Parameters629

10.9.3 Local Symbols in a Macro636

10.9.4 Macros as Compile Time Procedures639

10.9.5 Simulating Function Overloading with Macros640

10.10 Writing Compile Time "Programs"646

10.10.1 Constructing Data Tables at Compile Time646

10.10.2 Unrolling Loops651

10.11 Using Macros in Different Source Files653

10.12 For More Information653

11 BIT MANIPULATION655

11.1 Chapter Overview655

11.2 What Is Bit Data,Anyway?656

11.3 Instructions That Manipulate Bits657

11.4 The Carry Flag as a Bit Accumulator665

11.5 Packing and Unpacking Bit Strings666

11.6 Coalescing Bit Sets and Distributing Bit Strings669

11.7 Packed Arrays of Bit Strings671

11.8 Searching for a Bit673

11.9 Counting Bits676

11.10 Reversing a Bit String679

11.11 Merging Bit Strings681

11.12 Extracting Bit Strings682

11.13 Searching for a Bit Pattern683

11.14 The HLA Standard Library Bits Module684

11.15 For More Information687

12 THE STRING INSTRUCTIONS687

12.1 Chapter Overview689

12.2 The 80x86 String Instructions690

12.2.1 How the String Instructions Operate690

12.2.2 The REP/REPE/REPZ and REPNZ/REPNE Prefixes691

12.2.3 The Direction Flag692

12.2.4 The MOVS Instruction694

12.2.5 The CMPS Instruction700

12.2.6 The SCAS Instruction703

12.2.7 The STOS Instruction704

12.2.8 The LODS Instruction705

12.2.9 Building Complex String Functions from LODS and STOS705

12.3 Performance of the 80x86 String Instructions706

12.4 For More Information707

13 THE MMX INSTRUCTION SET709

13.1 Chapter Overview709

13.2 Determining Whether a CPU Supports the MMX Instruction Set710

13.3 The MMX Programming Environment711

13.3.1 The MMX Registers711

13.3.2 The MMX Data Types713

13.4 The Purpose of the MMX Instruction Set714

13.5 Saturation Arithmetic and Wrap-Around Mode714

13.6 MMX Instruction Operands715

13.7 MMX Technology Instructions717

13.7.1 MMX Data Transfer Instructions718

13.7.2 MMX Conversion Instructions718

13.7.3 MMX Packed Arithmetic Instructions723

13.7.4 MMX Logical Instructions726

13.7.5 MMX Comparison Instructions727

13.7.6 MMX Shift Instructions731

13.7.7 The EMMS Instruction733

13.8 The MMX Programming Paradigm734

13.9 For More Information745

14 CLASSES AND OBJECTS747

14.1 Chapter Overview747

14.2 General Principles748

14.3 Classes in HLA750

14.4 Objects753

14.5 Inheritance755

14.6 Overriding756

14.7 Virtual Methods vs.Static Procedures757

14.8 Writing Class Methods and Procedures759

14.9 Object Implementation764

14.9.1 Virtual Method Tables767

14.9.2 Object Representation with Inheritance769

14.10 Constructors and Object Initialization773

14.10.1 Dynamic Object Allocation Within the Constructor775

14.10.2 Constructors and Inheritance777

14.10.3 Constructor Parameters and Procedure Overloading781

14.11 Destructors782

14.12 HLA's "_initialize_" and "_finalize_" Strings783

14.13 Abstract Methods789

14.14 Run-Time Type Information(RTTI)792

14.15 Calling Base Class Methods794

14.16 For More Information795

15 MIXED LANGUAGE PROGRAMMING797

15.1 Chapter Overview797

15.2 Mixing HLA and MASM/Gas Code in the Same Program798

15.2.1 In-Line(MASM/Gas)Assembly Code in Your HLA Programs798

15.2.2 Linking MASM/Gas-Assembled Modules with HLA Modules801

15.3 Programming in Delphi/Kylix and HLA805

15.3.1 Linking HLA Modules with Delphi/Kylix Programs806

15.3.2 Register Preservation810

15.3.3 Function Results811

15.3.4 Calling Conventions817

15.3.5 Pass by Value,Reference,CONST,and OUT in Kylix823

15.3.6 Scalar Data Type Correspondence Between Delphi/Kylix and HLA825

15.3.7 Passing String Data Between Delphi/Kylix and HLA Code826

15.3.8 Passing Record Data Between HLA and Kylix829

15.3.9 Passing Set Data Between Delphi/Kylix and HLA833

15.3.10 Passing Array Data Between HLA and Delphi/Kylix834

15.3.11 Referencing Delphi/Kylix Objects from HLA Code834

15.4 Programming in C/C++ and HLA837

15.4.1 Linking HLA Modules with C/C++ Programs839

15.4.2 Register Preservation842

15.4.3 Function Results842

15.4.4 Calling Conventions842

15.4.5 Pass by Value and Reference in C/C++847

15.4.6 Scalar Data Type Correspondence Between C/C++ and HLA847

15.4.7 Passing String Data Between C/C++ and HLA Code849

15.4.8 Passing Record/Structure Data Between HLA and C/C++849

15.4.9 Passing Array Data Between HLA and C/C++851

15.5 For More Information852

A ASCII CHARACTER SET853

B THE 80X86 INSTRUCTION SET857

INDEX889

热门推荐