没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
The Art of Assembly Language Programming
Beta Draft - Do not distribute
© 2002, By Randall Hyde
Page
1
The Art of Assembly Language Programming
(Short Contents)
The Art of Assembly Language
.................................................................
1
Chapter Two
Volume One:Data Representation
........................................
1
Chapter One
Foreword
................................................................................
3
Chapter Two
Hello, World of Assembly Language
...................................
11
Chapter Three
Data Representation
............................................................
53
Chapter Four
More Data Representation
....................................................
87
Chapter Five
...............................................................................................
119
Chapter Five
Questions, Projects, and Lab Exercises
.................................
119
Volume Two:
.............................................................................................
135
Machine Architecture
.................................................................................
135
Chapter One
System Organization
..............................................................
137
Chapter Two
Memory Access and Organization
........................................
157
Chapter Three
Introduction to Digital Design
............................................
203
Chapter Four
CPU Architecture
..................................................................
234
Chapter Five
Instruction Set Architecture
..................................................
270
Chapter Six
Memory Architecture
..............................................................
303
Chapter Seven
The I/O Subsystem
.............................................................
327
Chapter Eight
Questions, Projects, and Labs
..............................................
355
Volume Three:
...........................................................................................
391
Basic Assembly Language
.........................................................................
391
Chapter One
Constants, Variables, and Data Types
..................................
393
Chapter Two
Introduction to Character Strings
..........................................
419
Chapter Three
Characters and Character Sets
............................................
439
Chapter Four
Arrays
...................................................................................
463
Chapter Five
Records, Unions, and Name Spaces
......................................
483
Chapter Six
Dates and Times
......................................................................
501
Chapter Seven
Files
....................................................................................
517
Chapter Eight
Introduction to Procedures
...................................................
541
Chapter Nine
Managing Large Programs
...................................................
569
Chapter Ten
Integer Arithmetic
..................................................................
587
Chapter Eleven
Real Arithmetic
.................................................................
611
Chapter Twelve
Calculation Via Table Lookups
........................................
647
Chapter Thirteen
Questions, Projects, and Labs
.........................................
663
The Art of Assembly Language Programming
Page
2
© 2002, By Randall Hyde
Beta Draft - Do not distribute
Volume Four:
.............................................................................................
725
Intermediate Assembly Language
..............................................................
725
Chapter One
Advanced High Level Control Structures
.............................
727
Chapter Two
Low-Level Control Structures
..............................................
751
Chapter Three
Intermediate Procedures
......................................................
805
Chapter Four
Advanced Arithmetic
............................................................
853
Chapter Five
Bit Manipulation
...................................................................
909
Chapter Six
The String Instructions
............................................................
935
Chapter Seven
The HLA Compile-Time Language
...................................
949
Chapter Eight
Macros
.................................................................................
969
Chapter Nine
Domain Specific Embedded Languages
...............................
1003
Chapter Ten
Classes and Objects
................................................................
1059
Chapter Eleven
The MMX Instruction Set
.................................................
1113
Chapter Twelve
Mixed Language Programming
........................................
1151
Chapter Thirteen
Questions, Projects, and Labs
.........................................
1195
Volume Five: ............................................................................................. 1277
Advanced Procedures ................................................................................. 1277
Chapter One Thunks ................................................................................... 1279
Chapter Two Iterators ................................................................................. 1305
Chapter Three Coroutines and Generators .................................................. 1329
Chapter Four Advanced Parameter Implementation ................................... 1341
Chapter Five Lexical Nesting ..................................................................... 1375
Chapter Six Questions, Projects, and Labs ................................................. 1399
Appendix A Answers to Selected Exercises ............................................... 1405
Appendix B Console Graphic Characters ................................................... 1407
Appendix D The 80x86 Instruction Set ...................................................... 1449
Appendix E The HLA Language Reference ............................................... 1483
Appendix F The HLA Standard Library Reference .................................... 1485
Appendix G HLA Exceptions ..................................................................... 1487
Appendix H HLA Compile-Time Functions .............................................. 1493
Appendix I Installing HLA on Your System .............................................. 1531
Appendix J Debugging HLA Programs ...................................................... 1533
Appendix K Comparing HLA and MASM ................................................. 1539
Appendix L HLA Code Generation for HLL Statements ........................... 1541
Index .......................................................................................................... 1561
Hello, World of Assembly Language
Beta Draft - Do not distribute
© 2001, By Randall Hyde
Page
1
The Ar
t of Assembly Language
(Full Contents)
1.1
Foreword to the HLA Version of “The Art of Assembly...” ................... 3
1.2 Intended Audience ................................................................................... 6
1.3 Teaching From This Text ........................................................................6
1.4 Copyright Notice .....................................................................................7
1.5 How to Get a Hard Copy of This Text ....................................................8
1.6 Obtaining Program Source Listings and Other Materials in This Text ... 8
1.7 Where to Get Help ................................................................................... 8
1.8 Other Materials You Will Need (Windows Version) .............................. 8
1.9 Other Materials You Will Need (Linux Version) .................................... 9
2.1 Chapter Overview ....................................................................................11
2.2 Installing the HLA Distribution Package ................................................11
2.2.1 Installation Under Windows ..........................................................12
2.2.2 Installation Under Linux ................................................................ 15
2.2.3 Installing “Art of Assembly” Related Files ................................... 18
2.3 The Anatomy of an HLA Program .......................................................... 19
2.4 Some Basic HLA Data Declarations ....................................................... 21
2.5 Boolean Values ........................................................................................23
2.6 Character Values ...................................................................................... 23
2.7 An Introduction to the Intel 80x86 CPU Family ..................................... 23
2.8 Some Basic Machine Instructions ...........................................................26
2.9 Some Basic HLA Control Structures ....................................................... 29
2.9.1 Boolean Expressions in HLA Statements ...................................... 30
2.9.2 The HLA IF..THEN..ELSEIF..ELSE..ENDIF Statement .............. 32
2.9.3 The WHILE..ENDWHILE Statement ...........................................33
2.9.4 The FOR..ENDFOR Statement ...................................................... 34
2.9.5 The REPEAT..UNTIL Statement ..................................................35
2.9.6 The BREAK and BREAKIF Statements .......................................36
2.9.7 The FOREVER..ENDFOR Statement ........................................... 36
2.9.8 The TRY..EXCEPTION..ENDTRY Statement ............................ 37
2.10 Introduction to the HLA Standard Library ............................................ 38
2.10.1 Predefined Constants in the STDIO Module ...............................40
2.10.2 Standard In and Standard Out ...................................................... 40
2.10.3 The stdout.newln Routine ............................................................ 41
2.10.4 The stdout.putiX Routines ...........................................................41
2.10.5 The stdout.putiXSize Routines ....................................................41
2.10.6 The stdout.put Routine ................................................................. 42
2.10.7 The stdin.getc Routine. ................................................................43
2.10.8 The stdin.getiX Routines .............................................................. 44
2.10.9 The stdin.readLn and stdin.flushInput Routines .......................... 46
AoATOC.fm
Page
2
© 2001, By Randall Hyde
Beta Draft - Do not distribute
2.10.10 The stdin.get Macro ...................................................................46
2.11 Putting It All Together ...........................................................................47
2.12 Sample Programs ...................................................................................47
2.12.1 Powers of Two Table Generation ................................................47
2.12.2 Checkerboard Program .................................................................48
2.12.3 Fibonacci Number Generation .....................................................50
3.1 Chapter Overview ....................................................................................53
3.2 Numbering Systems .................................................................................53
3.2.1 A Review of the Decimal System ..................................................53
3.2.2 The Binary Numbering System .....................................................54
3.2.3 Binary Formats ...............................................................................55
3.3 Data Organization ....................................................................................56
3.3.1 Bits .................................................................................................56
3.3.2 Nibbles ...........................................................................................56
3.3.3 Bytes ...............................................................................................57
3.3.4 Words .............................................................................................58
3.3.5 Double Words ................................................................................59
3.4 The Hexadecimal Numbering System .....................................................60
3.5 Arithmetic Operations on Binary and Hexadecimal Numbers ................62
3.6 A Note About Numbers vs. Representation ............................................63
3.7 Logical Operations on Bits ......................................................................65
3.8 Logical Operations on Binary Numbers and Bit Strings ........................68
3.9 Signed and Unsigned Numbers ...............................................................69
3.10 Sign Extension, Zero Extension, Contraction, and Saturation ............73
3.11 Shifts and Rotates ..................................................................................76
3.12 Bit Fields and Packed Data ....................................................................81
3.13 Putting It All Together ...........................................................................85
4.1 Chapter Overview ....................................................................................87
4.2 An Introduction to Floating Point Arithmetic .........................................87
4.2.1 IEEE Floating Point Formats .........................................................90
4.2.2 HLA Support for Floating Point Values ........................................93
4.3 Binary Coded Decimal (BCD) Representation ........................................95
4.4 Characters ................................................................................................96
4.4.1 The ASCII Character Encoding .....................................................97
4.4.2 HLA Support for ASCII Characters ...............................................100
4.4.3 The ASCII Character Set ...............................................................104
4.5 The UNICODE Character Set .................................................................108
4.6 Other Data Representations .....................................................................109
4.6.1 Representing Colors on a Video Display .......................................109
4.6.2 Representing Audio Information ....................................................111
4.6.3 Representing Musical Information .................................................114
4.6.4 Representing Video Information ....................................................115
4.6.5 Where to Get More Information About Data Types ......................115
4.7 Putting It All Together .............................................................................116
Hello, World of Assembly Language
Beta Draft - Do not distribute
© 2001, By Randall Hyde
Page
3
5.1 Questions .................................................................................................119
5.2 Programming Projects for Chapter Two .................................................. 124
5.3 Programming Projects for Chapter Three ................................................ 124
5.4 Programming Projects for Chapter Four .................................................125
5.5 Laboratory Exercises for Chapter Two ...................................................126
5.5.1 A Short Note on Laboratory Exercises and Lab Reports ............... 126
5.5.2 Compiling Your First Program ......................................................127
5.5.3 Compiling Other Programs Appearing in this Chapter .................. 128
5.5.4 Creating and Modifying HLA Programs .......................................129
5.5.5 Writing a New Program ................................................................. 129
5.5.6 Correcting Errors in an HLA Program ........................................... 130
5.5.7 Write Your Own Sample Program ................................................. 131
5.6 Laboratory Exercises for Chapter Three and Chapter Four ....................132
5.6.1 Data Conversion Exercises ............................................................ 132
5.6.2 Logical Operations Exercises ......................................................... 133
5.6.3 Sign and Zero Extension Exercises ................................................ 133
5.6.4 Packed Data Exercises ................................................................... 134
5.6.5 Running this Chapter’s Sample Programs ..................................... 134
5.6.6 Write Your Own Sample Program ................................................. 134
1.1 Chapter Overview .................................................................................... 137
1.2 The Basic System Components ............................................................... 137
1.2.1 The System Bus .............................................................................138
1.2.1.1 The Data Bus ......................................................................... 138
1.2.1.2 The Address Bus .................................................................... 139
1.2.1.3 The Control Bus .................................................................... 139
1.2.2 The Memory Subsystem ................................................................140
1.2.3 The I/O Subsystem ......................................................................... 146
1.3 HLA Support for Data Alignment ........................................................... 146
1.4 System Timing ......................................................................................... 149
1.4.1 The System Clock .......................................................................... 149
1.4.2 Memory Access and the System Clock .......................................... 150
1.4.3 Wait States .....................................................................................151
1.4.4 Cache Memory ............................................................................... 153
1.5 Putting It All Together ............................................................................. 156
2.1 Chapter Overview .................................................................................... 157
2.2 The 80x86 Addressing Modes ................................................................. 157
2.2.1 80x86 Register Addressing Modes ................................................ 157
2.2.2 80x86 32-bit Memory Addressing Modes ..................................... 158
2.2.2.1 The Displacement Only Addressing Mode ........................... 158
2.2.2.2 The Register Indirect Addressing Modes .............................. 159
2.2.2.3 Indexed Addressing Modes ................................................... 160
2.2.2.4 Variations on the Indexed Addressing Mode ........................ 161
2.2.2.5 Scaled Indexed Addressing Modes ....................................... 163
2.2.2.6 Addressing Mode Wrap-up ................................................... 164
2.3 Run-Time Memory Organization ............................................................ 164
2.3.1 The Code Section ........................................................................... 165
2.3.2 The Static Sections ......................................................................... 167
剩余1599页未读,继续阅读
资源评论
jefflxf
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功