【正文】
nt as above. If you don39。s going to be hard to debug them. Remember what it was like finding bugs in your first Pascal (or other HLL) programs? Anytime you learn a new programming language you39。t a talent. It39。 however, the savings is insufficient to counter the benefits of using assembly language. Improved piler technology has eliminated the need for assembly language. This isn39。ll never catch an assembly language programmer writing C code with MOV instructions. After all, that39。t spend any extra time writing their code in assembly so it runs faster on the same hardware. There are many raging debates about the speed of machines versus the speed of the software, but one fact remains: users always want more speed. On any given machine, the fastest possible programs will be written in assembly language. If you need more speed, you should use a better algorithm rather than switch to assembly language. Why can39。re already using the best algorithm you can find and it39。ll have to think long and hard about using assembly language. Using C (or some other HLL) is no guarantee that your program will be portable. C programs written for the IBM PC won39。t accept the result. Portability is probably the biggest plaint people have against assembly language. They refuse to use assembly because it is not portable, and then they turn around and write equally nonportable programs in C. Yes, there are lots of lies, misconceptions, myths, and halftruths concerning assembly language. Whatever you do, make sure you learn assembly language before forming your own opinions. Speaking out in ignorance may impress others who know less than you do, but it won39。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 5 speed is your primary concern, assembly language is the way to go. Assembly language has several benefits: ( 1) Speed. Assembly language programs are generally the fastest programs around. ( 2) Space. Assembly language programs are often the smallest. ( 3) Capability. You can do things in assembly which are difficult or impossible in HLLs. ( 4) Knowledge. Your knowledge of assembly language will help you write better programs, even when using HLLs. 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。re not using an optimizing piler. 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. Despite some people39。t excusable. Most users put more than eight megabytes in their machines so they can run multiple programs from memory at one time. The bigger a program is, the fewer applications will be able to coexist in memory with it. Virtual memory isn39。s size. 6 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, features which are available to assembly language programmers. 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 puter. In general, such access is not part of any high level language. Indeed, some languages like C pride themselves on not supporting any specific I/O operations. In assembly language you have no such restrictions. Anything you can do on th