1 / 26

主讲:王忠民

微机原理与接口技术 Principles of Microcomputer & Interface Techniques. Bilingual Course(50%). 主讲:王忠民. Principles of Microcomputers Wang Zhongmin. A big challenge for all of you!!!. Do you think so???. and also a big challenge for me!. Chapter One Introduction of Microcomputer system (1).

etan
Download Presentation

主讲:王忠民

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 微机原理与接口技术 Principles of Microcomputer & Interface Techniques Bilingual Course(50%) 主讲:王忠民 2014年8月25日1

  2. Principles of MicrocomputersWang Zhongmin A big challenge for all of you!!! Do you think so??? and also a big challenge for me! 2014年8月25日2

  3. Chapter OneIntroduction of Microcomputer system(1) 2014年8月25日3

  4. Suggested Textbooks and other course materials • Randy Hyde,The Art of Assembly Language Programming,Sep. 2003 • Wang Zhongmin, Principles of Microcomputers, XIPT,2005 • Wang Zhongmin, Wang Yu, Wang Xiaojie, Principles of Microcomputers, XIDIAN press House,2003(中文教材) • Wang YU, Wang Jinsong, Xing Gaofeng, Guidelines for the study and experiment to the Principles of Microcomputer. XIDIAN Press House,2004(中文实验指导书) • Website: http://webster.cs.ucr.edu 2014年8月25日4

  5. 原版教材情况 • The Art of Assembly Language Programming Published 32-bit edition both for Windows and Linux 32-bit electronic edition for Windows 32-bit electronic edition for Linux 16-bit electronic edition for DOS 清华大学出版社有该书的影印本,取名:汇编语言艺术,2005年3月出版,888页,定价88元 • Authour: Randy Hyde Department of Computer Science University of California • Homepage:http://www.cs.ucr.edu/~rhyde/ 2014年8月25日5

  6. Department of Computer Science at the University of California http://webster.cs.ucr.edu/---Website for assembly language study 2014年8月25日6

  7. 2014年8月25日7

  8. 2014年8月25日8

  9. Which Edition is for Me? The Art of Assembly Language Programming is available in four editions: a published edition that handles both Windows and Linux, a 32-bit electronic edition for Windows, a 32-bit electronic edition for Linux, and a 16-bit electronic edition for DOS. Most PC owners will want to read the published edition as it covers both OSes in a generic fashion. The Windows and Linux on-line electronic editions are great for quick reference when the book is not available. Most readers should avoid the DOS edition since DOS is essentially obsolete at this point. Unless you're taking a course or have a special need to write some DOS software, there is little reason to waste time learning about various DOS calls, segmentation, and other features that you'll never use under Windows or Linux. The published edition has been professionally proofread and edited. Those wanting an edition with the fewest mistakes in an easy to read format should grab a copy of "The Art of Assembly" from their local bookstore. 2014年8月25日9

  10. 2014年8月25日10

  11. 2014年8月25日11

  12. 面 向 21 世 纪 高等学校计算机类专业系列教材 微型计算机原理 Principles of Microcomputers 王忠民 主编 王忠民 王钰 王晓婕 编著 西安电子科技大学出版社 2014年8月25日12

  13. 胶印英文教材 “Principle of Microcomputer” 自编英文教材,西安邮电学院印制 2005年 2014年8月25日13

  14. “《微型计算机原理》学习与实验指导” 王钰等编写 西安电子科技大学出版社,2004 实验指导书 本课程教学辅助网站提供的 “实验CAI课件” 2014年8月25日14

  15. why you want to learn this course? Maybe there are some reasons as following • Your major requires a course in assembly language; i.e., you’re here against your will. • A programmer where you work quit. Most of the source code left behind was written in assembly language and you were elected to maintain it. • Your boss has the audacity to insist that you write your code in assembly against your strongest wishes. • Your programs run just a little too slow, or are a little too large and you think assembly language might help you get your project under control. • You want to understand how computers actually work. • You’re interested in learning how to write efficient code. • You want to try something new. 2014年8月25日15

  16. What’s Wrong With Assembly Language Assembly language has a pretty bad reputation. The common impression about assembly language programmers today is that they are all hackers or misguidedindividuals who need enlightenment. Here are the reasons people give for not using assembly language • Assembly is hard to learn. • Assembly is hard to read and understand. • Assembly is hard to debug. • Assembly is hard to maintain. • Assembly is hard to write. • Assembly language programming is time consuming. • Improved compiler technology has eliminated the need for assembly language. • Today, machines are so fast that we no longer need to use assembly. If you need more speed, you should use a better algorithm rather than switch to assembly language. • Machines have so much memory today, saving space using assembly is not important. • Assembly language is not portable. of course, all of these points are wrong!!! 2014年8月25日16

  17. What’s Right With Assembly Language? An old joke goes something like this: “There are three reasons for using assembly language: speed, speed, and more speed.” Even those who absolutely hate assembly language will admit that if speed is your primary concern, assembly language is the way to go. Assembly language has several benefits: • Speed. Assembly language programs are generally the fastest programs around. • Space. Assembly language programs are often the smallest. • Capability. You can do things in assembly which are difficult or impossible in HLLs. • Knowledge. Your knowledge of assembly language will help you write better programs, even when using HLLs. 2014年8月25日17

  18. Speed Assembly language is the uncontested speed champion among programming languages. An expert assembly language programmer will almost always produce a faster program than an expert C programmer. While certain programs may not benefit much from implementation in assembly, you can speed up many programs by a factor of five or ten over their HLL counterparts by careful coding in assembly language; even greater improvement is possible if you’re not using an optimizing compiler. Alas, speedups on the order of five to ten times are generally not achieved by beginning assembly language programmers. However, if you spend the time to learn assembly language really well, you too can achieve these impressive performance gains. 2014年8月25日18

  19. space • Despite some people’s claims that programmers no longer have to worry about memory constraints, there are many programmers who need to write smaller programs. • Assembly language programs are often less than one-half the size of comparable HLL programs. • Saving space saves money. Pure and simple. If a program requires 1.5 megabytes, it will not fit on a 1.44 Mbyte floppy. • Most users put more large memory in their machines so they can run multiple programs at one time. The bigger a program is, the fewer applications will be able to coexist in memory with it. Virtual memory isn’t a particularly attractive solution either. With virtual memory, the bigger an application is, the slower the system will run as a result of that program’s size. 2014年8月25日19

  20. Capability • Capability is another reason people resort to assembly language. • HLLs are an abstraction of a typical machine architecture. They are designed to be independent of the particular machine architecture. As a result, they rarely take into account any special features of the machine. If you want to use such features, you will need to use assembly language. A really good example is the input/output instructions available on the 80x86 microprocessors. These instructions let you directly access certain I/O devices on the computer. In general, such access is not part of any high level language. In assembly language you have no such restrictions. • Anything you can do on the machine you can do in assembly language. This is definitely not the case with most HLLs. 2014年8月25日20

  21. knowledge • Now some of you may be thinking, “Gee, that would be wonderful, but I’ve got lots to do. My time would be better spent writing code than learning assembly language.” There are some practical reasons for learning assembly, even if you never intend to write a single line of assembly code. • If you know assembly language well, you’ll have an appreciation for the compiler, and you’ll know exactly what the compiler is doing with all those HLL statements. • Good assembly language programmers make better HLL programmers because they understand the limitations of the compiler and they know what it’s doing with their code. Those who don’t know assembly language will accept the poor performance their compiler produces and simply shrug it off. 2014年8月25日21

  22. Work hard on the assembly studying—you will get as much as you can imagine from it • Yes, assembly language is definitely worth the effort. • The only scary thing is that once you learn it really well, you’ll probably start using it far more than you ever dreamed you would. That is a common malady among assembly language programmers. Seems they can’t stand what the compilers are doing with their programs. 2014年8月25日22

  23. Table of the contents Section One: Machine Organization • Chapter One Data Representation. • Chapter Two Boolean Algebra • Chapter Three System Organization • Chapter Four Memory Layout and Access Section Two: Basic Assembly Language • Chapter Five Variables and Data Structures • Chapter Six The 80x86 Instruction Set • Chapter Seven The UCR Standard Library • Chapter Eight MASM: Directives & Pseudo-Opcodes • Chapter Nine Arithmetic and Logical Operations • Chapter 10 Control Structures Chapter 11 Procedures and Functions 2014年8月25日23

  24. Table of the contents Section Three: Intermediate Level Assembly Language Programming • Chapter 12 Procedures: Advanced Topics • Chapter 13 MS-DOS, PC-BIOS, and File I/O • Chapter 14 Floating Point Arithmetic • Chapter 15 Strings and Character Sets • Chapter 16 Pattern Matching Section Four: Advanced Assembly Language Programming Chapter 17 Interrupts, Traps, and Exceptions • Chapter 18 Resident Programs • Chapter 19 Processes, Coroutines, and Concurrency 2014年8月25日24

  25. Table of the contents Section Five: The PC’s I/O Ports • Chapter 20 The PC Keyboard • Chapter 21 The PC Parallel Ports • Chapter 22 The PC Serial Ports • Chapter 23 The PC Video Display • Chapter 24 The PC Game Adapter Section Six: Optimization • Chapter 25 Optimizing Your Programs Section Seven: Appendixes 2014年8月25日25

  26. 本章应补充内容 • 冯.诺依曼计算机体系结构的基本思想 • 计算机五大组成部分 • 总线的概念 • 计算机的基本工作过程 详见“中文2” 2014年8月25日26

More Related