本书主要介绍用汇编语言进行程序设计,先从硬件和软件着手,然后介绍编程所需的各种指令,并给出丰富的范例。全书分为七大部分:PC机硬件、软件基础,汇编语言基础,屏幕与键盘操作,数据操作,高级输入/输出,特别主题,以及关于BI0S数据区、中断与端口、运算符与指令、PC指令系统等的参考资料。本书既可作为计算机及相关专业汇编语言课程的教材,也可作为开发人员的参考用书。要掌握本书内容,不仅要认真阅读本书的每个章节,还应使用本书提供的范例并尝试运行这些范例,并认真完成每章后面的练习。
PREFACE
Part A Fundamentals of PC Hardware and Sofware
I Basic FEATURES OF PC HARDWARE
Introduction 1
Bits and Bytes 1
The Binary Number System 3
Hexadecimal Representation 6
ASCII Code 7
PC Components 8
Internal Memory 10
Segments and Addressing 12
Registers 13
Hardware Interrupts 18
Key Points 19
Review Questions and Exercises 19
2 INSTRUCTION ADDRESSING AND EXECUTION
Introduction 22
Features of an Operating System 22
The BIOS Boot Process 23
The System Program Loader 24
The Stack 25
Instruction Execution and Addressing 27
Instruction Operands 29
Protected Mode 29
Key Points 30
Review Questions and Exercises 30
EXAMINING COMPUTER MEMORY AND EXECUTING INSTRUCTIONS
Introduction 32
Using the DEBUG Program 32
Viewing Memory Locations 34
Machine Language Example I:
Using Immediate Data 36
Machine Language Example II:
Using Defined Data 40
An Assembly Language Program 44
Using the INT Instruction 45
Using the PTR Operator 47
Key Points 48
Review Questions and Exercises 49
Part B Fundamentals of Assembly Language
4 REQUIREMENTS FOR CODING IN ASSEMBLY LANGUAGE
Introduction 51
Assembly Language Features 52
Conventional Segment Directives 58
Simplified Segment Directives 62
Initializing for Protected Mode 64
Defining Types of Data 65
Equate Directives 70
Key Points 72
Review Questions and Exercises 73
5 ASSEMBLING,LINKING,AND EXECUTING PROGRAMS
Introduction 74
Preparing a Program for Assembling and Execution 74
………………………………