单片机汇编语言的艺术(译文英文)(实用资料)

上传人:hs****ma 文档编号:491866941 上传时间:2022-12-22 格式:DOCX 页数:12 大小:21.80KB
返回 下载 相关 举报
单片机汇编语言的艺术(译文英文)(实用资料)_第1页
第1页 / 共12页
单片机汇编语言的艺术(译文英文)(实用资料)_第2页
第2页 / 共12页
单片机汇编语言的艺术(译文英文)(实用资料)_第3页
第3页 / 共12页
单片机汇编语言的艺术(译文英文)(实用资料)_第4页
第4页 / 共12页
单片机汇编语言的艺术(译文英文)(实用资料)_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《单片机汇编语言的艺术(译文英文)(实用资料)》由会员分享,可在线阅读,更多相关《单片机汇编语言的艺术(译文英文)(实用资料)(12页珍藏版)》请在金锄头文库上搜索。

1、The Art of Assembly Language1. Whats Wrong With Assembly Lan guage ?2. Whats Right With Assembly Lan guage ?1. Whats Wrong With Assembly Lan guageAssembly Ianguage has a pretty bad reputation. The commornmpression about assembly Ian guageprogrammers today is that they are all hackers or misguided in

2、 dividuals who n eed en lighte nment.Here are the reasons people give for not using assembly:(1) Assembly is hard to learn.(2) Assembly is hard to read and understand.(3) Assembly is hard to debug.(4) Assembly is hard to maintain.(5) Assembly is hard to write.(6) Assembly Ianguage programming is tim

3、e consuming.(7) Improved compiler tech no logy has elim in ated the n eed for assembly Ian guage.(8) Today, machines are so fast that we nolonger need to use assembly.(9) If you need more speed, you should use a better algorithm rather tha n switch to assembly Ian guage.(10) Machines have so muchmem

4、orytoday, saving space using assembly is not importa nt.(11) Assembly Ianguage is not portable.These are some strong stateme nts in deed!Give n that this is a book which teaches assembly Ian guage program ming, writte n for college level stude nts, writte n by some on ewhoappears to know what hes ta

5、lk ing about, your n atural tendency is to believe someth ing if it appears in print. Having just read the above, youre start ing to assume that assembly must be pretty bad. And that, dear friend, is eighty perce nt of whats wrong with assembly Ian guage. That is, people develop some very strong mis

6、c on cepti ons about assembly Ian guage based on what theyve heard from frien ds, in structors, articles, and books. Oh, assembly Ian guage is certa inly not perfect. It does have many real faults. Those faults, however, are blow n completely out of proporti on by thoseunfamiliar with assembly langu

7、age. The next time someonestarts preaching about theevils of assembly language, ask, how many years of assembly language programming experience do you have? Of course assembly is hard to understand if you dont know it.It is surprising how many people arewilling to speak out against assembly language

8、 based only on conversations theyve had or articles theyve read.Assembly language users also use high level languages (HLLs); assemblys most outspoken opponents rarely use anything but HLLs. Who would you believe, an expert well versed in both types of programming languages or someonewho has never t

9、aken the time to learn assembly language and develop an honest opinion of its capabilities?In a conversation with someone, I would go to great lengths to address each of the above issues.Indeed, in a rough draft of this chapter I spent about ten pages explaining what is wrong with each of the above

10、statements. However, this book is long enough and I felt that very little was gained by going on and on about these points. Nonetheless, a brief rebuttal to each of the above points is in order, if for no other reason than to keep you from thinking there isnt a decent defense for these statements.As

11、sembly is hard to learn. So is any language you dont already know. Try learning (really learning) APL, Prolog, or Smalltalk sometime. Once you learn Pascal, learning another language like C, BASIC, FORTRANM, odula-2, or Ada is fairly easy because these languages are quite similar to Pascal. On the o

12、ther hand, learning a dissimilar language like Prolog is not so simple.Assembly language is also quite different from Pascal. It will be a little harder to learn than one of the other Pascal-like languages. However, learning assembly isnt much more difficult than learning your first programming lang

13、uage.Assembly is hard to read and understand. It sure is, if you dont know it. Most people who make this statement simply dont know assembly. Of course, its very easy to write impossible-to-read assembly language programs. Its also quite easy to write impossible-to-read C, Prolog, and APL programs.

14、With experience, you will findassembly as easy to read asother languages.Assembly is hard to debug. Sameargument as above. If you dont have much experience debugging assembly language programs, its going to be hard to debug them. Rememberwhat it was like finding bugs in your first Pascal (or other H

15、LL) programs? Anytime you learn a new programming language youll have problems debugging programs in that language until you gain experience.Assembly is hard to maintain. C programs are hard to maintain. Indeed, programs are hard to maintain period. Inexperienced assembly language programmers tend t

16、o write hard to maintain programs. Writing maintainable programs isnt a talent. Its a skill you develop through experience.Assembly language is hard. This statement actually has a ring of truth to it. For the longest time assembly language programmers wrote their programs completely from scratch, often re-inventing the wheel. HLL programmers, especially C, Ada, and Modula-2 programmers, have long enjoyed the

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号