Combined language art 5

zhaozj2021-02-08  209

Chapter 4

Learn any kind of art, you can only use tools and skills from understanding concepts and skills. As for personal achievements and performance, they need to be continuously self-requested and explored, not only by learning. The writing of the combination is also the objective criterion, which is sometimes the objective standards of air efficiency, but a function of complex, widely used, and its value is not so simple. In order to say that this combination program is only in the enlightenment phase, there is still no conclusion that the value must be recognized by the public. Therefore, I can only give this example, explain the concept of program writing, I hope the reader can give an antifolence, flexible application.

First section topic know

First, task

I have a task, it is to design some application symbols, which are encoded to the symbol drawing. This is an actual and practical example, I use the warehouse code to define the symbol code and process it in the formula, which is streamlined and fast. In fact, the shape generator is designed with similar principle, here is referred to. These application symbols are used to draw forms, to be mixed with text, so various table symbols, decompose becomes text characters, and are fixed. First consider the encoding, here, "encoding" is the "Data Design" mentioned earlier. A considering of the perfect coding, in the program processing, you can save a lot of time and space; for the people used, a rule can also achieve easy-to-use effects. To achieve the above objectives, you must first understand some related factors, as long as these factors are incorporated in consideration, and the results can be expressed in the "code" compiled "code", the above tasks are reached. These related factors are: 1, the restriction of the encoding: the warehouse code takes one to five yards, limited to 24 letters, and such symbols cannot exceed the exception. It is necessary to enter the Chinese words simultaneously, and cannot be confused, so it cannot be absent from the existing Chinese characters.

2, the demand for function: Assume that four different thick plaids are designed, and each can match each other. Such as:

┌ ┬ ┬ ┬ ┬ ┐ ┌ ┬ ┬ ┬ ┬ ┐

├ ┼ ┼ ┼ ┼ ┤ ├ ┤

├ ┼ ┼ ┼ ┼ ┤ ├ ┤

├ ┼ ┼ ┼ ┼ ┤ ├ ┤

├ ┼ ┼ ┼ ┼ ┤ ├ ┤

└ ┴ ┴ ┴ ┴ ┘ └ ┴ ┴ ┴ ┴ ┘ ┘ ┌ ┬ ┬ ┬ ┬ ┐ ┌ ┬ ┬ ┬ ┬ ┐ ┐ ┐

├ ┤ ├ ┤

├ ┤ ├ ┤

├ ┤ ├ ┤

├ ┤ ├ ┤

└ ┴ ┴ ┴ ┴ ┘ └ ┴ ┴ ┴ ┴ ┘

│ │ │ │ ─ ─ ─ ─ ─ ─ 二 二

Second, analysis

The above symbols have a total of 104 shapes (later I found not to apply, and add some graphics) can be subdivided into four categories, respectively:

Horizontally, extends left and right, up and down isometric. Longitudinal, left and right isometric, up and down. Landscape, or left or right, up and down isometric. Longist, or upper or lower, left and right isometric.

It can be seen that we have been able to set its laws: 1, only longitudinally lateral, all connected to the center of lattice. 2, there are only four positions, namely, lower, left, right. This induction method is quite useful, because we have discovered a binary shadow, which is useful. Take four locations first, the upper and lower shapes are longitudinally, the left right is horizontal, and it is a standard binary structure. If the left, left, upper, and right, it can form another dimensional secondary. It can be represented by one bit. I have chosen four thickness to make four positions. With a word element (XXXXXXX1) Where is the crude point: xxxxxxx1 all the ancestors: xxxxxxx0 x 点 不 细: 细 倍 倍 细 细 倍 细 细 细 细 倍 倍 倍 倍 倍 倍: Xxxxxx0x All portrait: xxxxx1x All belongs to the top: xxxx0xxx Everyone belongs to the right: xxxx1xxx

The above values ​​have been used in four bits, with a total of 16 combinations. If they are represented, the number of combinations should be selected as the number of times. Referring again to Figure 1, each factor takes one yard, horizontal, straight, the position has four, the conclusion is up to four yards. Although Ideally, the design of the warehouse code is originally for all six or seven thousand Chinese characters, while the text is generated as the convention, it is impossible to have a continuous space four-code section, which can arrange the table code. I am in the combination of the input code, it is difficult to find a zone, that is, the YYX code, there is no Chinese word, so this decided to arrange the table code in this area. The warehouse code is up to five yards. YYX has been used to three yards, with only two yards available. Look at the previous analysis, there is only 16 combinations, while the symbols have more. This kind of match is very unsatisfactory and needs to be considered again. It is necessary to take three or four yards, it is to penetrate the shape of the lattice, if there is another shape through the lattice, it is also a basic graphic, each graphic is only two yards. How much do we need to do it? Eight! (See Figure 2) Eight additional sixteen, just right, completely compliant with our previous emphasis. These definitions, actually only need to set the fifth bit to one: 属 半 者: xxx0xxxx All Directors: XXX1xxxx Finally, this 24 code can add 41h to get the text equal The code value, the reader is interested, try to find the value of these yards, can be used in the future, it can be used to get its input code without having to die. However, the code has not been completed, because in the computer, a word code is a considerable principle, accurate, efficiency is built in this principle. If there is a code represented by a code, it is equivalent to the "heavy code" word as the representatives of other code, which should be avoided. In addition, in order to facilitate use, the coding should also be used in combination with alphabetical order, and should be treated in accordance with the process. For example, YYXAK is identical to YYXKA's shape. To avoid trouble, it should be specified in alphabetical order, only YYXAK is a valid code. Another example is the shape of YYXAI, and the left side is fine and right, and it is equivalent to a running fine. And this horizontal and yyxu is completely similar. If necessary, you can use the yyxu, YYXBJ, YYXCK, YYXGO, YYXHP, etc., by YYXU, YYXHP, YYXGO, YYXHP, etc. Note: About this, due to the negligence of my year, I have made mistakes. If it is changed now, it will cause pain in the past, so they are engaged in planners, and must be cautious! Third, improve the above-mentioned encoding method, is it ideal? Absolutely not, not only due to lack of experience in the year, not enough considering, there is some wrong coding, but also neglecting at the concept. I hope that the reader can further study better methods, at least, it should be improved to the shortcomings of my individual. In this regard, it is a matter of test topics. When referring to the fifth ferture writing of this chapter, pay attention to it, it will find that there is a very article. After the encoding is determined, you can write. Since the code "bitmap" has been considering the program, it immediately branches, and uses the program of the drawing, and it is easy to use several instructions to complete the task.

Second section system analysis

The so-called system analysis is that there is a system, it is ruleful to analyze the "object". In terms of computer terminology, the object refers to the hardware and software used. The system is a series of organizers and critical overall, from a macro perspective, the system covers: 1. Objective: Any system, there is inevitable a specific purpose, if it is not possible to analyze, even I don't know why the purpose, how can I play the function of the system? 2. Structure: The composition of the system is based on its special structure, and it can be said to be a component, component or or department, and terminating its system characteristics. Understand the structure, analyze the nature of the structure, and then cooperate with various conditions to achieve the purpose.

3. Effect: Effect refers to the expected results, the meaning of system analysis is to achieve, only through the understanding of the purpose, understanding of the structure to design a plan. However, the effects of this solution, if not, how do you know if it is ideal? At the same time, there is still another layer of systematic analysis, all things in the world are mutual, and the single system is not analyzed and necessary. For example, analyze a car and ignore the road conditions of its trains, the conditions, oil, accessories, and literacy of the use of the conditions. Then we can assert that this analysis has no practical value in addition to providing a reference. In the computer, it is no exception, the system analysis on computer terms, refers to the analysis, understanding and design of the nature, equipment, and user demand of hardware models. Here we will analyze these one by one.

First, hard body species

With IBM PC / AT as a development object, it does not have to discuss its hard body model. Just, standing in the standpoint of system analysis, you can't not explain it, because this is one of the necessary steps for system analysis. According to market analysis, domestic IBM and compatible microcomputer account for more than 80%, and the Chinese system is developed by Chinese, and it is a "accessory". With the current situation, it can be said that there is no way. Since the system is determined, it is further exploring the specifications of the system. Specifications for hardware systems, you may wish to refer to random manual or manual, the more information on the information, the more convenient work. Especially the "Programm-Er's Manual" is essential and should be collected in advance and can be taken at any time. With the hardware specifications, see which are related to the program itself, extract it, one-one comparison, until all have an answer, the body's systematic analysis is completed. Taken, the task is the target, and assumes that the model used is an IBM AT compatible machine. Its related specifications are: system memory 640KB hard drive 20 MB soft drive 360KB screen display card Hercules Graphic Card keyboard 101 key, model CSK-1101 operating system DOS 3.3 version of other surrounding macro description In addition, in order to apply Chinese, it is assumed that "Jane Integration System" is adopted, and the system includes all Chinese characters and seven applications, accounting for 440KB. As a system, the user can dominate the space, the better, since Chinese, and the Chinese system program is an accessory program, it will inevitably take up part space. Therefore, in order to make Chinese application functions are not weak in the original system, time and space must be taken very efficiently. Since you have used 440KB, don't waste anymore. Some Chinese systems are designed to store Chinese characters in hard drives, from the surface, and the space is not wasteful. But don't forget, the number of hard drives has its limit, if each Chinese word is read once, the hard disk will be damaged by less than half a year. Not only that, this method is very slow, it is not convenient to use it. Some designs in order to avoid the above shortcomings, the "common words" will be loaded into the expansion zone first in order to avoid the above shortcomings. This speed is accelerated, and the loss of the hard disk is also reduced, but the cost is greatly increased. Some people think that hardware is constantly improving, after discharging, capacity is no longer a problem, why have you been? The responsibility of the software engineer is to play the biggest marginal benefits in their own technical capabilities. Regardless of whether the hard body can be improved, we should have a hard work, and strive to write the program. On the one hand, when the current hardware is not ideal, the software with high efficiency has a foothold, even if the hardware improvements are improved, excellent software still accounts for high efficiency. Today's computer application concept has not been fully, it seems that the capacity of the disc is large to exceed our imagination. However, in the future computer era, it is really "inch gold" and the martial arts. In particular, once the computer becomes the "public product" of the computer, the cost of the cost will determine the success or failure of the product. China has been poverty, the number of computers needed, can save a penny, saying to the entire market, is an astronomical figure. What's more, the more advanced hardware technology, the size of the computer is narrowed, the notebook, the pocket computer has been introduced, and the storage problem facing it is not the disc can be solved.

If you really can spend a little more money, I will solve the problem in all, but it is also worth it. The text is the foundation of the nation, culture, and the lack of writing will form "incomplete culture." At the same time, computer technology is progressing, the needs of users are also increased, and the private version of the typography software and the "window" are in the like, and Chinese can also dream of increasing the memory of the memory? So, there is no other way, use a small amount of space, solve the dilemma of Chinese characters at a time? The so-called Chinese system analysis is to propose the correct answer to this type of problem. The most ideal answer is to use the facts, we have completed all Chinese characters, and you can collect more than 60 "effective words" for more than six people in the Dictionary, and can combine the gangshas "six million" "! Not only that, the size of each word, long-width level, (ie, the so-called "unhappy time zoom in") font, font is not limited! And these features, only 260kb space, can group 500 to 1000 per second! We are still trying to improve, decades of hard work, as long as we have more than a power, as long as we can protect Chinese culture, it is worth it. The tasks mentioned earlier are one of these technologies because they have small scope, and they do not involve special knowledge of text, so they are specifically taken as an analysis of the analysis for reference. Because we can complete the task with 440KB, 20MB hard drive can be fully dominated by the user. Conversely, if our Chinese characters should take up 20MB hard drives, for customers, it is equal to no hard drive. Thus, in addition to changing the system's specifications, the system cannot be declared. Can you use a soft disk to store a shape? Obviously, it is not available, the read speed of the soft disk is slow, the capacity is too small, generally only for information conversion. As for the Hercules graphics board, just a small section of the module, we tip here because this display panel is well suited for Chinese systems. The keyboard is a component that is often ignored by the system analysis. I personally passed this, this time, this time, and in detail below. Second, the principle

It is known from the previous task that can be used, and all the table symbols can be used, and all table symbols are added, and now you have to find an efficient design and application. Everyone knows that the most direct step in the computer work is machine code. The combined language is the interface of the machine code, according to the effectiveness of the law, the combined language has the highest efficiency. The task has been detailed in detail, the efficiency requires very high, so we decided to use the combined language as the basic tool. Re-see the law of efficiency, the efficiency of production costs, depending on the working time and loss. If you use a combined language writing, can you improve during time? We can use facts to prove that as long as they have been well trained, we have mastered all the technologies, and all tools are ready, and the time required for combined language is definitely not more than high-order languages. According to the effectiveness of the law, it is necessary to achieve the purpose of the application, the progress of the function. Regardless of the hardware in the future, human beings will never meet their speed and capacity requirements. The combination of combined languages ​​is just the first step, the skills of the combination of the module, the interface, etc., and the concept of "integration" is needed to study and develop.

Third, the nature of the work is talked to the actual work, let us explain the Chinese system. Some people think this is a system program, but I personally think that it is not as good as an accessory. The accessory program is an environment that can increase the function of Chinese through such an environment. Therefore, this program must reside in the system, and to change the interrupt schedule of the original system. All accessories require a "interface", our work is self-excera. Here, according to the nature of the work, the desired interface is listed below: 1, the system diagram form is initialized. 2. Check the system to use space to determine if it is possible. 3, check and arrange all necessary parameter values. 4. Change the necessary interrupt entry address. 5. Reporting of the application and returns to the system. On the Chinese system, the maximum first graphic character is changed to display INT 10h and the print INT 17h, followed by the keyboard processing INT 16h, and using the timing interrupt INT 1ch as a graphic cursor. These this subject function, after modification, becomes a new interrupt entry, which is still called a system program. We have made a big mistake in the past, in order to fully control the function of the system, when the keyboard interrupt, INT 9H has also changed. The reason is that the system analysis is not complete enough to have a deviation from the understanding of this section. INT 9H is after the keyboard input, each button generates signal signal, called: Scan Code, and "ASCII Code). Early models, the number thereof, the character code is fully compliant with the provisions of ASCII, that is, the highest bit of bit is maintained at 0. The reason why Chinese systems can be compatible with several English software is to use this highest bit to distinguish. When we mistaken, the character code is not possible to change, so the bit is not checked when writing INT 9h. Unexpectedly, the number of keyboards has increased. Due to the lack of character code, the new "page control", the keyboard is one column, the keyboard is deep, and its character code is 0E0h, that is, its high position is not 0. This, under the Chinese system, when I encountered those keys, I was treated as a Chinese, but in fact, it is not a Chinese code, so the world is chaotic. However, after the treatment of IBM BIOS, the value obtained by INT 16H is not. That is to be compatible with the previous system, put the high bit yuan in a buffer. If we don't change INT 9h, there will be no problem, and it will be changed, but it does not pay attention to this situation, so that the product performance is extremely unstable, and it is a disease. Because the program itself is very simple, after the interface is solved, it is just the arrangement of the program. Fourth, related issues

Let's take a look at what we should pay attention to. In addition to the production of the program itself, put the aforementioned coding in the "Jane Integrated System". For the specifications of the system, please refer to 2 Jizhen Integration System Operation Manual. We have repeatedly stressed that the additive of the form must be streamlined, otherwise it will win the master, it is not worth it. This 104 graphics can be painted with a dot matrix, with a total of 21,632b, accounting for the system space. This is not said that it can't zoom in and reduced, and it is not possible to draw pictures. Therefore, the first principle is determined that these shapes must be used to draw rather than the point array information, and the smaller the program is, the better. Since the Chinese system is already a graphical form, there is a variety of functions, there is no need to write the plot of the drawing, as long as the input code is converted into the data structure acceptable to the program. The production of the "Polyzhen Integration System" in the form is not different from the examples of the following. In order to facilitate explanation, in the early days of the early days of another Chinese system, the technique used is immature, but it is more concise. The structure set at that time is based on the nature of the telecommunication, the specifications are as follows: AX = graphical instructions, such as: horizontal, straight, oblique, 捺, points,,,,,,,,,,,,,, Y2 Si = instruction storage area start address DI = graphical point array start address Therefore, the original substructure can be used as long as the data structure is in line with. The second principle also decided that the propylebele should be included in the original set of characters as one of the modules. The third principle is to add a set of table code in the internal code and data sheet. This is not difficult to do, because there is no other effective Chinese character after YYX, so it will not hinder the sort of Chinese characters. Any job involving encoding is not negligible. For systematic analysis, the sorting function is an important means of data processing and related efficiency. For example, there is a population of one million urban, and the various information of this millions need to be extremely expensive. It is assumed that the sorting is good, and the fixed work can be completed on time every day, and the result of sorting can be made, we can determine its efficiency. Suppose that the text data does not have the function of sorting, or the result of its sorting is unable to cooperate with the user's concept, the information processed by the computer is equal to the waste. If you need to use these information, you must use the "comparison table" to reorder, then more than double the time, you can also say that it is necessary to consume a set of computers. The problem has not been solved, what is the "text sequence" that people can accept? Chinese does not have sequence concepts. This is the most serious crux, the most serious crux! Take a dictionary for example, how long does the Chinese people check the dictionary? A "one" word, how many homophones? If there is a word, I don't know how it correctly pronounted, how should I check it? If you ask, there are not many people who can answer, which is, including college students and knowledge of expertise, how many sounds can be read correctly? I don't say my ignorance, for me, only 3,000. I acknowledge that when I study the bungee input code, I used the sort of the pinyin letter. Anyone can find the location of the Chinese word as long as anyone can correctly input it correctly.

At present, the development of Chinese computers is also in the word code input, and the shape of the shape is covered in the shape of the shape, but people who are engaged in this work have seriously considered these problems? How many truly understanding of system analysis? Therefore, I expect readers to be able to consider all kinds of issues first, and then study the problems step by step by step by step. Section 3 Module Concept

When there is no human civilization in the universe, it is a whole, a certain law, and there is no operation. The emergence of human beings is because they realize that their self and nonmissions are produced, non-, no, no, good, evil, good, bad cognition. The complexity of the world is derived from this residual, and the complete and regularity of the body is ignored. Human pursuit of knowledge is the use of concepts as tools, and systematically analyzed the various phenomena of the universe. The results of the analysis can be considered as a variety of modules, and people can cognition this large environment of the universe by various modules. Therefore, the module is not limited to specific, objective things, any of the analysis, induction, and cognitive people, all have a module structure. And each of the structures of some modules, there is another level of module. The module of computer software is some of the "Obj Files" (Obj Files) that features or nature independent. This type of target file is performed with the interface module to interconnect. In order to pursue work efficiency, this type of module has a system to classify, openly listed, not only can avoid program repeated production, but also a portfolio application of the program. The "container container" has enhanced the efficiency of shipping, which is the "module" of the goods, and some in the delivery destination. In addition, such as "pre-cast houses", even the production of pipelines, has the same ideas. When this is made, there is a mood of the same intention for the modulation of the efficiency. Software modulation requirements have been previously related to the experience of industrial production, but there are few specific successful precedents. Because the software changes endless, it is difficult to establish a "industrial standard", which is neither standard, it is difficult to plan. Because the criteria is a man-made, in the beginning, no matter how it is well thought, it is inevitable in the case. But as long as there is a precedent, you can provide you with your reference, application, and collecting the wisdom of everyone, will always have a perfect day. The problem is that today's experienced programming teachers are too busy, some are busy with self-creation, some are busy imitating plagiarism, and some are busy enjoying, playing. The school is teaching, all is the theory of realism, and a school gate, because the software program is not necessary, it is hot, and immediately put into the market's torrent, and the promotion will be thawful. Who is the module!

First, the module definition

1, small space, complete structure, can be used independently. The module cannot be too large, otherwise it will not be able to apply, the structure of the program must be independent and complete, in order to decompose, combine, free calls for secondary development. Some modules need to be used with public modules. Since the public module is the foundation of all module design, it can still be considered independently.

2, high efficiency, large flexibility, easy to other programs. The secondary development of the secondary development is established on the module structure. If the module is in good efficiency, it will inevitably affect its operation. At the same time, all applications have special needs and conditions, and the module should consider versatility, otherwise it is difficult to meet various conditions. Therefore, in the design module, consider the elasticity of the application, so that it can adapt to a variety of demand, but also achieve special tasks.

3, the function is clear, and its change is implemented in parameter settings. The function is not clear, and the application will be confused and the expected purpose will not be achieved. The function is clear or not, in addition to the program itself, the manual and instructions also account for a great proportion. The so-called function is clear, not to refer to a single function, but refers to the classification of the function. In classification, there is a need to have an easy to distinguish, and the easiestly, it is setting parameters, and the parameters are branched.

4, the program must be used to transfer the data using the specification. Based on the program, the modules are independent of each other, and the buffers for their respective applications cannot be utilized. Therefore, when executed, the scratch must be used to pass the information or parameters to complete the communication between each other.

Second, the module type

Classify the module, for convenience, the following classification method is not a constant. In principle, the module can be divided into: 1, function module: split by the functions performed. Such modules should consider the convenient and functionality of the application. However, the so-called functionality is limited to independent, single target, and must not be designed in a difficult-divided module.

2, public module: There is no clear function, but with shared benefits, or other specific purposes, it can also be designed to become a module. This module is often attached to other modules, and should pay attention to the flexibility of their calls, and should have a directory to record them in detail.

3, interface module: between two "faces" to solve the modules of the two problems. Generally in the program, all the data and data between the data, the program, the hardware and the hardware, all of which are interface-related, and the module that deals with this relationship is the interface module.

4, the application module: the app is a person, the worker is a program, so providing an application module to the application module. This module is in substantially, but it must be considered independently because of its real value of the same value. This type of module changes the maximum, and it is necessary to modify and decrease according to the demand for users, so you should pay special attention when designing.

Third, the basic principle of module segmentation

The Chinese culture is profound and profound. It can be slightly smoked by the ancients. Many people think that the fur of Western science and technology is like annger. In fact, in addition to the knowledge is constantly accumulating, from ancient times, people's wisdom do not grow. The module is a very valuable concept. The shape, structure, step, or even concept, cognition of things, etc., can analyze a number of modules under certain goals. With the module, the scope will be reduced, the problem will become simple, it is easier to master. If the module can be effectively utilized, it will be unfavorable. Zhuangzi is so early, and once in the form of fable, in its inside "Health", the segmentation of the module has made a thorough analysis. At the time of today, when the science and Changming, he still had "聩 聩" and a new look. To this end, it will transcribe the original text and make a long release.

Health master third

Life has a limit but knowledge not. With the endlessness, it has been. Already a known person, it's already awkward. For good name, there is no nearby sentence. The charter is the same. Can be backed, you can be born, you can pose, you can do it in the same year.庖庖 is the Wen Hui Jun, the hand, the shoulder, the foot, the knee □. It's awkward, the knife is playing, but it is not tone, and the dance of Sanglin is the first meeting. Wen Huijun: "Focus, good, skill cover is there? 」庖 庖 刀 对 曰 曰:" "The good people of the minister are also good." At the time of the cows, the cows are seen. Three years later, I didn't taste the whole cattle. At the time of today, the minister was encountered without visiting. According to the official, God wants to travel, depending on the heaven. Batch big but guided, because of it. The skills of the skills are willing to do, but the situation is big? Lianghui is more than a knife, cutting; the family is more than the month, and the fold is also. The knife of this minister is nineteen years, and thousands of cows are solved, while the blade is new. The dianse is idle, and the blade is no thick; with a no-thickness, it will have room for returning to its hiking. Although, each of the families, I saw it hard, and I was awkward. It is deemed to be delayed. The knife is very slightly, and it has been solved, such as the earth. The knife is standing, for the four, for the sigh, and the knife is hidden. Wen Huijun: "Good! I won the words of Ding Ding, I have to health. "

1, the forefinger's life is limited, and the knowledge is endless, with the endless knowledge of limited life, it is in the Jedi. It is already inadvertent, and it is also a lifetime thinking. In fact, just understand the truth of things and the crux of various issues. Don't attach to the appearance, don't confuse the status quo, just If so, not only can you stand up, and you can make a name. Liang Hui Wang has a chef, when slaughtering, gesture is chic, the movement is fallen, and there is a style of artist. Liang Hui Wang saw it, praise: "It's great! Your knife is magical to this point! The chef listened, busy putting the knife down, and said to Liang Hui Wang said: "I always pay attention to the concept, I don't pay attention to the skills. Initially, when the minister was slaughtered, he only saw the whole body of the cattle. After another three years, when every slaughter, it is just a structure of the cattle. Now, the minister can lead God will, according to the principle of nature, whether it is a scaffle, unloading bone, and the knife tip is gently picking with the key gap, and its organization is immediately solved. A good chef cuts a knife every year because there are too many cuts, it is inevitable that there is a loss; the technology is poor, often cut, blade and easy to fold, need to change once a month. The knife used by the minister has been 19 years, and the slaughter is not a thousand, and the blade is sharp. In fact, the reason is very simple, the cattle body is composed of many different organizations, and there is inevitable space. Because the blade is very thin, moving in the tissue gap, easily, and even excessive places. Of course, there is also a tricky time. The minister will concentrate, first find the problem, be careful to handle it. Once the blade is slightly moving, between the moment, the tissue is separated, and it is very good. The feeling after the achievement is gratified, it is difficult to compare. Finally, for the next job, wipe the knife clean and protect it. Liang Hui Wang listened, said: "It's so good, listen to you, realize a lot of life. 2, the main intention is limited, in order to effectively use energy to solve all problems, you should learn the principle of things. One of the principles, that is, all the structures of the module, the module is the basis of the composition of things. Those who have the ability to analyze the system, understand the structural foundation of things, and to be calm, when faced, find a problematic module, under the knife, the problem will solve the problem.

Fourth, module segmentation

Since it is called a module, there is no problem with splitness. If a programmaster has the idea of ​​the module, thoroughly understand its nature, of course, know how to design, naturally there is no need to split. In order to make this, during the production process of the program, it is often trusted to travel, I think, where to write. Therefore, develop the concept of module segmentation, in practice, have its own inevitable effect. The reasons for the module segmentation are not limited to the following: 1, in order to make the convenience, the program is divided into modules, easy to maintain. 2, in order to work efficiency, or require speed, or to save space, use different techniques. 3. Split the work capability, or working conditions of the factor. 4, the function classification of the factor, separately, for flexible applications. Regardless of the reasons, before the division module, be sure to first determine the target, a comprehensive cognitive program, and then organize, classify, to be divided according to the category. After classification, you will be named in classification to facilitate memory and applications. The unified definition of the format is the key. Because there is a lot of modules, the calls between mutual call are extremely frequent. If the format is uniform, the program often needs to adjust, but in turn increases the difficulty of use, it is not worth it. Second, each module must establish a summary table, and often maintain it, be sure to correspond to the actual user, do not lazy. Each time you call, you also need to correct the record, such as the number of use, the program that calls. If the size of the program is large, the number of participants is more, the ideal is to be responsible for the module management. People engaged in this kind of work must be clear and keen, and they must be resentful and diligent. Before making the module segmentation, it should be prepared for .REF and .LST file, have a profile abcd.asm, which is: c:> m abcd ,,,; m is a compiler, which is the simplified name of Masm.exe. Please refer to the second section of Chapter 2. Later, ",,;" indicates that three files needed .Obj, .lst and .crf, and do not have to be displayed on the screen. After the compilation is completed, generate Abcd.ref again with CREF.EXE: C:> CREF ABCD; at this time, discd.lst and abcd.ref are printed, mutually controlled, first settled, organized, and then divided. 1. In the abcd.ref file, each "title" comes from the abcd.lst file, after the title, there are several group numbers, where the # person, indicates the title, the rest is the call. If there is only one, the title can be deleted. Then, as the instruction before the title is JMP or RET, the program represented by this title is useless, and should be deleted. 2. If there is a NOP instruction in the abcd.lst file, it should be deleted unless it is interested. If after JMP XXXX, it can be changed to JMP Short XXXX. If you have no connection before xxxx, it can also be merged. In addition, the slave called Call, if only one is called once, it is best to merge this segment sub-formula, or attach it to it in order to distinguish.

3. After the program is streamlined and merger, check each program, where the function independent should be divided. After segmentation, check whether other processes are called, if so, you should be recorded first, this section can be considered as "function module". 4. All the processes called in the aforementioned function module, such as only the module call, may be attached to the "shared module" after the module.

5, but the "main process" of the usage, most of the "application module". Such application modules are extremely difficult to divide, and there is no need to split.

6. After the segmentation is completed, you should check in detail for standby.

V. Module characteristics

The so-called module characteristics refer to factors that each module considered at the beginning of design or segmentation. Features include details of the modules such as functional, efficiency, and focus, etc. Regardless of the goal of the module design, since there is a module, it should be highly effective. The segmentation of each module has its inevitable factors, whether it is for functions, or for easy production, it is pursuing efficiency. Each module has its characteristics, to achieve efficiency requirements, first understand the characteristics of the module. The Chinese system mentioned below is an example. The characteristics of each module are analyzed in detail below: [Module 1]: Chinese processing system module - Function module 1, keyboard interrupt: because of the speed input Fair is expensive to computer processing speed, so this interrupt should be mainly spaced. In addition, the application of the keyboard is based on flexibility to change, and it is advisable to use the "Building" method to facilitate modification, change.

2, display interruption: The display speed is very important, and this module should sacrifice the space to strive for aging. In addition, the displayed elasticity is large, and the size, location, attribute, etc. of the characters should be considered once a consideration. There are many specifications of the display, which are incompatible with each other, and generally arrange the arrangement before the program is loaded. In this module, especially should pay attention to different display, how to take care of speed.

3, the print interrupt: The print is also facing the problem of different models, but because the speed is not involved, the skill is completely set and loaded.

4. Communication interruption: How to consider communication, how to ensure safe, correct and confidentiality during the data transfer process.

[Module 2]: Chinese Code Module - Auxiliary Module Because the warehouse code can be used to group existing, and the likelihood that may be generated on the arrangement, the following should not be limited by the internal code. However, the length of the bungee input code is uncertain. For the processing efficiency of the computer, we use four-character internal code, and the highest bit of each word is set to 1, which is different from the English characters. The conversion of the internal code should also consider the speed, and it is necessary to convert two-way conversion, and the program is not difficult, but the skills are not low.

[Module 3]: Chinese Digital Structure Module - Interface Module Storage Chinese Basic Glyph Structure, based on the input warehouse code, to obtain the basic message of the text structure, and form a glyph. The number of Chinese characters, the planning of the shape structure is the key to success, as long as each glyph is plus several characters, the space will malignantly expand. This module uses multi-layer structure skills, wherein there are many sub-modules, space and speed, in order to complete a large number of glyph transport, and flexible, completely worship group segmentation.

[Module 4]: Glyph Analysis Module - Auxiliary Module Changes and Location of Types, Types, and Location, etc., all in this module. Myogue analysis is more purposeful, so the main functions of this module are handling variables, and each buffer should be properly arranged to achieve efficiency requirements.

[Module 5]: English Forming Module - Function Module English Brigade is different from Chinese, so another module. The number of words is less than Chinese, but does not have any combination of functions. [Module 6]: Drawing Module - Function Module This program is the core of the glyph generator. When the module is obtained, it will be drawn at high speeds. The key to the drawing program is calculated, although the calculation is the original function of the computer, if it is not added with "auxiliary calculator", the computer's operational efficiency is greatly reduced. Generally, only on the screen, or when doing shape is drawn, the range is limited, and it is predictable, so that "comparison table" or rapid algorithm can be used to exchange the display efficiency. When the print output, high precision operation is high.

[Module Seven]: Various interface-application module interface is a mechanism between two modules, or two independent systems, in large module projects, the quality of the interface is the key to the use efficiency The location. The interface is an important program that can be smoothly cooperated. As long as the structure of the interface, it can be easily communicated with the principle.

Six, module call

The prerequisite of the module is to be flexible, otherwise it will lose its design. Moreover, one of the purpose of the module is to provide other programs and used for secondary development. So the way the call is critical, it must be facing. There are many ways to call, in order to take care of the multi-faceted effect, I advocate the use of system program interrupt processing. The advantage of this is that the system designer does not have to consider the setting of the module, and the application of the program does not have to worry about the position of the entrance, and directly call directly. More favorable, it is possible to flexibly call other modules stored in a disk when there is insufficient space. "Interrupt" is the utility interface provided by the system. The only disadvantage is that the execution efficiency is poor, but the application of the program can move the address provided by the interrupt to its buffer, and the record is called for a long distance. Improve it. The following and the Chinese characters generator application interface is used as an example, and the module call mode is described. This character generator provides more than 60,000 words, the "new words" generated by the "new words" generated by the "new words" generated by the "new word code" that can be combined in the Cozen input method. In addition to the number of words, the word grade is changed from 1 * 1 to 128 * 128, and there is no level change. The font is currently only available, black body, round and long, flat soil, etc., its horizontal thickness ratio is 1 to 8 points, and the upper limit is more than 1. One of the upper limit. The shape varies with split, slope and ten kinds of pills, lateral thick variables, and the like. As for traditional, simple glyphs or ASCII characters, it can also be selected by the user.

┌ - ─ ──────────────────────── ─ ─ │ function │ parameter │ 备 注 │ ├─ ┼ ┼─────────────────────── ─ │BX = 0 │ │ │ │ 字 形 │DL = n, n is a shape Dot location of the left end of the word │N = 0-7, user self-custom │ │ │ * * │ │ │ │1, Chinese status: set five warehouse sequence code │ sequence code = warehouse code A to Y │ │ │ DS: [Si], [Si 1], [Si 2], [Si 3], │ 即 sequence 1 to 25│ │ │ [Si 4] │ [Si-1] = 0 │ │ │ 例: [01,00, 100, 00] is' Day '│00 means no input code │ │ │ │, 0]]]' │ │ │ │ * * * │ │ │2, English Status: │ │ │ │ │ │ = English is Chinese Half │ Semi - shaped │ │ │ 7FH = English with Chinese │ │ │ │ 2EH = Continuous Identity │ Using tolerance │ │ │ │ │ │ │ │ │ * * │ │ │ │3, Special Status: │ │ │ [Si] = ASCII │ASCII Special │ │ │ [Si-1] = Instruction │ │ │ │ 11h = Direct Arrangement (Turn 90 Degree) │ │ │ │ 40H = plus circle, such as 1123 │ up to 3 characters │ │ │ │ │ │ ├─────────────────────────── ───────────── ┤ │BX = 1 │ None │ │ │ 字 │ │ │ ├───────────────── ─ ┼─────── ─ ┤ │BX = 2 │ 无 │ │ │ 简 字 │ │ │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── - ┴ --─────────

┌ - ─ ──────────────────────── ─ ─ │ function │ parameter │ 备 注 │ ├─ - ┼───────────────────── ─ │BX = 3 │ │ │ │ definition │CL = 0 single-wire body straight a little bit │ │ │ │CL = 1 Detachs │ │ │ c = 1 Detachs │ │ │ │CL = 2 Light Ming Direct Three Point │ │ │ │ c = 3 Zhongming Crude 4 │ │ │CL = 4 │ │ │ │CL = 5 │ │ │ │ * │ │ │ │CL = 129 fine black horizontal thick two points │ │ │CL = 130 light black horizontal Three points │ │ │ │CL = 131 in black horizontal thick four points │ │ │ │CL = 132 thick black horizontal thick six points │ │ │ │CL = 133 heavy black horizontal rough eight points │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │ * * │ │ │ │CL = 149 medium circle straight four points │ limited to 48 points │ │ │CL = 150 thick round straight rough six points │ 同 上 │ │ │CL = 151 heavy round straight rough eight │ 同 上 │ │ │ │ │ │ │ │ │ │ * │ │ │ │DH = △ x │ │ │DL = △ y │ Y2-Y1 │ ├───────────────────────── ─ ┼─────── ┤ │BX = 4 │ │ │ │ 空体 │DL = 0 cancel hollow mismant │ │ │ = 1 Set hollow body │ │ │ │ ├─────────────────────────── ┤ │BX = 5 │ │ │ │ │ 体 │DL = 0 cancel? │ │ │ = 1 Setting the slope │ Landscape 1/8 │ └ - ─ ─ ────────────────────────────── ─ ─ ┘ ┌ - ─ ─ ─────────────────────────── ─ │ 功 能 │ paragote │ 备 注│ ├────────────────────────── ─ │BX = 6 │ │ │ │ 花 │DL = 0 cancelling the gossip │ │ │ │ = 1 Set the fill body, where │ │ │ │ DH = 0 is all black, share a total of a point │ │ │ = 1 Rough shape │ │ │ = 2 fine mesh │ │ │ │ = 3 斜 向 │ │ │ │ = 4 Mikir Line To Left │ │ │ =

5 Definition │ │ │ │ = 6 Blister │ │ │ │ 柱 直 形 │ │ │ │ 形 │ │ │ │ 9 纹 │ │ │ ─────── ───────────────── ─ ┤ │BX = 7 │ │ │ │ 加 形 │ │ │ │ │ │ │ │ │ │ │ │ │ │BX │ │ │ │ 加 形 │ │ │ │ │ ├──────────────────────────── ─ │BX = 8 │ │ │ │ 减 细 │ Every time Decreased, until 1 point │ │ ─────────────────────────────────── ┤ │BX = 9 │ │ │ │ Thick shaped │ Every time, it is thick, but no more than 8 points │ │ ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─ ─ ─ ┤ │BX = 10 │ │ │ │ │ │ │ │ └────────────────────────── ─────────────── ─ ┘ The second method is to provide the target code (.Obj) of the module, which is connected to the execution file by the app. This approach, each program is independent of each other, the compatibility is not high, and the versatility is not strong. If you want to apply multiple programs at the same time, you need a very large system space. Applicable applications for small and high-profile applications. However, once the module is connected to the application, it is difficult to flexibly.

Section 4

Program planning refers to the concept of overall design, in advance, systematically analyzes, and then sets a clear architecture to facilitate production. The most ideal way is to determine the application function, use key, input form, spatial structure, and module division, from the perspective of the user. These are all determined, in order to settle according to the blueprints. That is to say, the plan is to be in place, in order to step by step, step by step. 1, the awareness of the work: the plan, equivalent to designing building a chart, first to clarify the nature, characteristics, conditions, and select the appropriate way to obtain the most ideal results.

2, the structure of the structure: The structure should be pre-finalized, it is a process or module? Which is used in all or part? Is it divided into the quality of the staff, or unified with a production line? The spatial distribution of the program, the data segment, and the stack segment, the arrangement of each program, the definition of the scratcher, the buffer settings, etc., should be carefully considered, and record it for the basis for work.

3, the setting of the parameters: The parameter is the process of processing, must be reasonably arranged, and there is room for expansion. Because parameters are closely related to functional classification and program, the parameters are equivalent to the program of processing objects; those who are equivalent to the work. The results of its arrangement affect the functional value.

4, efficiency requirements: In Chapter III, we especially emphasize the efficiency of the rules, the purpose of using the computer is the pursuit of efficiency. Therefore, at the beginning of the plan, you should specify the efficiency requirements for each program. In addition, the use of parameters should also be considered the frequency of its use, wherever it is ready to be pre-prepared, it is not allowed to use it to use it. 5, the standard of test: Test is the quality management, the indicator of the program, can be certified by the test. The general program is only responsible for the correctness of the program. In fact, the correctness is not related to the indicator, which is the minimum responsibility of the program. The quality of the combined language should include the principle of writing specifications and time limit; program ideas, ideas; execution time; mode space size and arrangement; whether the application is appropriate, etc. The execution program is performed through the test program. This test should also be considered at the beginning of the plan.

6. The progress of the production: the progress of the programming is difficult to control, but it is difficult to control, more careful, prior planning. Its method is to set the work "difficult value" in accordance with the working nature. Then the program of the work evaluated its "ability value", and set a "reasonable" progress. Finally, according to the actual work schedule adjustment. Generally speaking, the programmaster takes more than three years of writing experience to develop the concept. Since the program itself has space, the structure of its structure is greatly affected by programming and performing efficiency. Good structure should be based on the nature of the program, the frequency of use, and the process of processing, etc., in a comprehensive consideration in efficiency.

First, program properties

The foregoing describes the types of process. When planning, we must further understand the nature of the program. Because so-called efficiency, one is the manufacturing, maintenance of the specification, and is the implementation and call of the specification. Both must make appropriate arrangements according to the nature of the program. Generally, the nature of the program is only two, one is active, the user can directly control the execution; the other is passive, common, to other programs. The former can also be said to be an application, while the latter is more similar system program. It is just that it is emphasized here that its nature is, and how to plan according to its nature. The active program is best placed in the same module. When the model is too large, it must be separated, and it is necessary to join together. However, if the function is different, the modified module has no intersection, in order to avoid leaping segments and segmentation efficiency loss, it is not necessary to consider whether it is placed in the same module. Since the active program involves the use of people's habits and designers, they often need to be modified, and the changes are great. It is precisely because of this factor, its value is not high, and the requirements for efficiency are also low. When planning, the active program must be separated from passive programs, while in the production, pay attention to the space occupied by it, and the relationship with each segment. Since passive programs are common, they must have some basic functions. The so-called passive is that the program is only called only under certain conditions. Due to its characteristics of its "reuse", it should be designed to become a streamlined substructure. Reproduction, or in order to save space, placed in a magnetic disc, ready to cover other subprofits, or for efficiency, direct coupling.

Second, use frequency

For the efficiency of program execution, occupancy space and processing time often need to work. If the program is too large, the space is not applied, and the frequency of usage of each program is counted. Uncommon usage, not expressed, not important, but if the space occupies, it is damaged in efficiency. This program is best independently into a module so that it can be intended to be intended to be in response to space. Therefore, in the program plan, the arrangement of space should be given priority. That is to say, it is necessary to try to make the three and program processes have a certain operation runtime, called "flow", meaning that, in accordance with the pre-arranged order, the process of flowing. Traditional procedures, the process is very important, because people need to test and put into achievements in accordance with a concept. However, since the module is received, each module represents a complete function, and the effect of the function can be achieved, which can be expressed. This, the importance of the process is reduced, and its status is reduced to a part of a structure. Because the module is combined, the more the module, the shorter the main procedure. Although each module has its processes, a structural group, and can be subdivided into a number of sub-modules, and so on. Therefore, the process is far less flexible, and the concept is also appeared. However, even in the module design process, it is sometimes necessary to gradually reason it by the process to understand the structure of the detail. In this position, the application of the process is not very uncommon. But once the passer is mainly, the program is not thinking about the process, it is very proneous. The process is a single-line thinking. Although people often use this process reasoning, more important capabilities come from "abstract thinking". Abstract thinking refers to people in many intricate, mutual entangled phenomena, can immediately grasp the focus, targeting the purpose, solving problems. In the program, this abstraction is equivalent to a comprehensive approval of all modules, not just the process of reasoning. With comprehensive cognition, flexible calls, the program's function is higher, greatly improved. If the program only knows that according to the process of writing, after the habitual development, not only the program is awkward, and the thinking method of people is affected. Generally, the so-called "horses", "sluggish" is the result of this mechanical training. Therefore, I don't agree with the process to plan, but when explaining or illustrating some process, it does not rule out the convenience of the process.

Fourth, flow chart

The first step of the process is to draw a flow chart. According to the flowchart, make a detail process, then understand or write the program according to the details. With the above example, the first production flow chart is as follows: ┌ - ─ ─ ┐ ┌> ─ ┤ Table code input │ │ └─┬── ┘ │ ┌──┴─ ┐ │ │ Take a code │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └ - ┬─ ┘ │ ┌───────────── ┐ ││ │ │ └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─ ───── ─ ┘ Please note that the above picture is not exported, this is one of the features of the module, when code = 0, enter the end program. The work of this sub-module is to arrange the information and return to it. As mentioned above, each code is defined according to the group code, and then immediately according to the preset condition of the code. (See the first one, the task) This is not only fast, and space is also streamlined. Of course, each code has its sub-flow chart, because it is too simple, a few words are finished, no need to make a picture: first determine the location, width, length, can be drawn straight or horizontal line, so. V. details

The finest process is most important, it is to determine the function of the teleconservation, and the buffer needs to be auxiliary, and it should also be described in detail herein. As for every extent, it is necessary to determine the complexity of the program and the program of writing. If the writing process and the program are the same person, the details can be relieved when necessary for others. But if it is a collective production, but also need to retain files, it is not only necessary, but it is necessary to write clearly, so that others can be able to take over, whether anyone can take over. Since the examples mentioned in front are too simple, if you want to write a detail process, don't wait until you write, the program is well written. So, sometimes you don't have to be overprustful. In the next instruction application, the detail process is described only in the note, and the program is compared to the program, but more efficient.

Six, work progress

The most important significance of working progress is not to increase production, but cultivate a dedicated spirit and the ability to work. The progress of the work is progressing the progress table, and the production schedule needs considerable understanding of all work. Therefore, the progress is equivalent to comprehensively, and there is a great help of the work ability of the programmer. Of course, the progress can effectively urge the work, and each time the progress is completed as scheduled, the program is a sense of accomplishment. When making a large-scale program, the time tends to dragging for a long time. If there is no progress, people tend to have a loss in Wang Yang, not to know where you don't know where you are. Those capable abilitys often can correctly determine the time required for work; it is, do not know how long the work takes, or the scheduled progress is too far from facts, all of which represents the ability of the program. However, the writing program is completely compliant, and it is also incorrect. The previous discussion, the writer is an art, rather than the production of non-stream operation, and creative art work is impossible to control the progress. The progress of the progress is not set, and as long as the work item is written, the completion time is expected to complete the time. It's just a matter, and the implementation is another matter, only the implementation of the implementation will be practical. If the implementation is not performed every day or regularly, if the progress is not in line with, the cause should be analyzed immediately and make correction adjustments. As for the results analyzed, it is best to be recorded for next improvement reference. This is used to develop habits. Naturally, there is an automatic analysis of judgment, and it will also enhance the concept of planning and design. Section 5

Said a lot, when you really arrive, use the instructions equivalent to the writer. Just, you must fully understand a relevant topic before using the instruction. Otherwise, the application instruction is like and the rain mud, and the pile of buildings can operate. I personally don't think that it can be called "writer", and I am just a graffiti.

First, the terminus arrangement

Because the temporary depository is insufficient, it must be properly applied in advance. Then, the factors that need to be arranged are: 1, a glyph size: This item has two variables that need to be arranged, one is the beginning of the horizontal direction; the other is the beginning of the longitudinal direction, the final value. Because at the beginning of the design, I have already taken into account the problem of limit value, which will be limited to 256 points, just within a range of one. Therefore, we can put the lateral beginning value in the teleconcape BL, the final value is placed in BH, and the longitudinal start value is placed in DL, and the final value is placed in DH.

2, stroke thickness: There are four variable values, placed in CL and make CH of 0. (This is quite important, in order to streamlined and efficiency, it is best to have a tension device 0)

3, the word code is sent: in the start memory Si.

4, glyph output: In the terminal DI, based on BX and DX values.

Second, program specifications

Chapter 2 Section I have been introduced, here is omitted.

Third, program and instructions

------ CET ----- ---- Description Part ---- 1: ;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;; 2:; function: Drawing table code drawing. After the ";", it is annotated. ; 3:; Enter parameters: DS: Si = word code (1-2 yard), = 0 is terminated. ; 4:; BL = x1 bh = x2; 5:; DL = Y1 DH = Y2; 6:; CX = stroke rough value. ; 7:; Output results: Dots in ES: DI. ; 8:; Destroy the Transmission: All.

; 9: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 10 : Ccodin:; word code input 11: lodsb; take a code to make a figure 12: MOV CL, Al; thickening fine value 13: incd; adjustment code value 14: and ax, 001eh; 24 effective dual value 15: Push BX; after retaining 16: push dx; the same top 17: MOV SI, AX; AX does not indirectly address 18: And Cl, 07h; Valid value 19: Call CCODTB [Si]; assuming CS = DS 20: POP DX 21: POP BX 22: JMP CCODIN; Code Main Process 23: CCOD00:; Code is Code 24: Add SP, 6; This translation is a subroutine 25: Ret; code is executed 26: CCOD06:; 06 is E, F 27 : SHL CL, 1; E, F crude value double 28: CLFT02:; LEFT finger left 29: add BH, BL; 02 is an input code A, B 30: SHR BH, 1; left BH mid point value 31: JMP Chor00; Horizon Picture 32: CCOD08:; 08 is G, H 33: SHL CL, 1 34: CLEF04:; 04 is C, D 35: Add DH, DL 36: SHR DH, 1; upon DH Point value 37: JMP CVER00; VERTICAL Painting 38: CCOD0E: 39: SHL CL, 1 40: CRGT0A:; Right Refers to Right Horizontal 41: ADD BL, BH; 0A is Code I, J 42: SHR BL, 1; BL For the midpoint value 43: JMP chor00 44: CCOD10: 45: SHL CL, 1 46: CCOD0C: 47: ADD DL, DH 48: SHR DL, 1; DL is midpoint value 49: JMP CVER00 50: CCOD16: 51: SHL CL, 1 52: CCOD12: 53: JMP Chor00 54: CCOD18: 55: SHL CL, 1 56: CCOD14: 57: JMP CVER00 58: ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;; 59:; The following is a module, indirect addressing table; 60: ;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; 61: ccodtb dw ccod00; end 62: DW CCOD02; code A, B left horizontal light 63: DW CCOD04; code C, D Detailed Light 64: DW CCOD06; code E, F left horizontal weight 65: DW CCOD08; code g, straight weight 66: DW CCOD0A; code I, J right horizontal light 67: DW CCOD0C; code K, L straight fine Light 68: DW CCOD0E; code M, N right horizontal thickness 69: DW CCOD10; code O, P dry weight 70: DW CCOD12; code q, r long transverse light 71: DW CCOD14;

Code S, t long straight light 72: DW CCOD16; code U, V long horizontal heavy 73: DW CCOD18; code W, X long straight rough rectification to this, only the paintings are not related to this topic, here Not explained. From this program, it can be seen that the initial planning input code is not ideal, so that we need to add fine values ​​in all parties, readers may wish to study their own improvements. The program length is 88 characters, and the shared program is now there is notometric. In addition, several instructions are repeated this parameter, and there are many ways to streamline, and they have to be reader. As for the transverse and straight substructure chor00 and CVER00, its location is far from affecting the writing mode, and assumes that it is short-hop within 128b. Otherwise, it is necessary to make a brain and try it out. Also, the reader should notice that in this section, there is no incorrect procedure, that is because it has been guaranteed when the internal code is processed. Generally speaking, checking errors is necessary. The improvement method, the aunt is slightly guided, if you encode, you will be divided into thickness, and divide the position into six groups, it is more easy to remember, and the program can reduce 28 font. many. It can be seen that there is still room for improvement due to this streamlined program, due to defects in the data structure. Section 6 Application of Special Tips

The use of techniques, the efficiency of the relationship combination language is very efficient, although its importance is not the overall plan, but it can also make up for the lack of planning. Due to "Skills" can't be strictly defined, the introduction of several more common skills is as follows:

I. Variable method:

I am very opposed to the concept of "constant" in the program because the constant is fixed and cannot be flexible. For example, in the BIOS of the IBM PC, the discounted snare is fixed to the 0, 25, 0, 80 and the like. Each move is limited by these four values, so the constant "view" is formed. If these constants are changed to variables, they will have a variable "window" function with the user's own changes. That is, the area on the screen, under the left, and right, the area around, is the "window" restricted by our vision and information. All information is displayed, and this area cannot be exceeded under the control of the system. If the four position values ​​are variables, the user can set the desired value at will, if it is flexible, that is, the so-called window processing. In the following three, in the virtual legislation, the CKFUN sects are examples with variables to process the window. The following sections are also an application of variable method. In Map87 and Map9a, they need to call sub-program DYBPJ1. The only different person is in the sub-program, and different processes are also required to call different slats. The method of sharing DYBPJ1 is to first place the location of the different subprograms, in the BP, and then call. 1: Map87: 2: MOV BP, Offset Mapf4 3: Call Movs211 4: Call Dybpj1 5: Mov DL, AH 6: ..

11: Map9a: 12: MOV BP, Offset Map46 13: Call Dybpj1 14: MOV AH, 1 15: ..

20: Dybpj1: 21: Push BX 22: Push DX 23: MOV DH, DL 24: Call BP 25: POP AX 26: XCHG DH, AH 27: POP BX 28: DYBPJRT: 29: RET II, ​​Symmetric method:

In this way, it is actually an instruction to use indirect address, which is symmetrically handled, or can be adjusted to become a symmetric program, flexible call. The following sections, the surface seems to be no coordinated, but after organizing, there is an eyebrow, and then indirectly in the temporary depository, combined into one. Like this program, the larger the scale, the more space saved. 1: ABCD: 2: CMP DX, BUFA 3: JB ABCD1 4: CMP CMP CMP CMP CMP CMP CMP CMP CL, BUFD 5: JB ABCD1 6: MOV BUFC, CL 7: Inc Bufe 8: Mov BUFB, DX 9: DEC BUFF 10: ABCD1: 11: .. 12: .. with another program: 20: EFGH: 21: CMP BX, BUFG 22: JB EFGH1 23: CMP CH, BUFH 24: JB EFGH1 25: Inc BUFK 26: DEC BUFL 27: MOV BUFI, BX 28 : Mov BUFJ, CH 29: EFGH1: 30: .. 31: .. It seems that it is very large, first organized, get the left and right two sets: EFGH: ABCD: CMP BX, BUFG CMP DX, BUFA JB EFGH1 JB ABCD1 CMP CH, BUFH CMP CL, BUFD JB EFGH1 JB ABCD1 Inc Buf Mov Bufj, BX Mov BUFB, DX MOV BUFJ, CH MOV BUFC, CL EFGH1: ABCD1: .. ... It can be seen that it is different, just the respective scratch and buffer. The emergence of this program is due to improper prior planning, unable to consider, headache, medical head, foot pain. It can be used to uniformly use the teleconcape and buffer, and now wood has become a boat, and it is possible to change the way. Secondly, the style and habits of writing are not developed. When using the instruction, the letter is coming, causing two programs, two ways! Now the only remedy is to use the indirect addressing method, first arrange the two sets of buffers and appearance, and then rewrite the program.

1: Abcd: 2: Mov Si, Offset BUFA 3: MOV DI, Offset BUFB 4: MOV BX, DX 5: MOV CH, CL 6: JMP Short Efgh1 7: EFGH: 8: MOV Si, Offset BUFG 9: MOV DI , Offset BUFI 10: EFGH1: 11: CMP BX, [Si] 12: JB EFGH2 13: CMP CH, [Si 2] 14: JB EFGH2 15: MOV [Di], BX 16: MOV [Di 2], CH 17: Inc Byte PTR [DI 3] 18: Dec Byte PTR [DI 4] 19: EFGH2: 20: .. Its buffer relative order, as shown below: 35: BUFA DW 0 36: BUFD DB 0 37: BUFC DB 0 39: BUFC DB 0 40: BUFF DB 0 41: .. 65: BUFG DW 0 66: BUFH DB 0 67: BUFI DW 0 68: BUFJ DB 0 69: BUFK DB 0 70 : BUFL DB 0 Where a symmetrical form or the same structure, this skill can be used. Third, the virtual method:

Different from the information, as long as the nature is the same, virtual skills can be used, and various parameters are set in advance, and the parameters are unified. There is a one-course, which is used for screen drawing. All functions are completed with a cursor. It is the case that processes the cursor in this section as an example. First virtual function and buffer: section displacement: bbblkmov DB?;? = Displacement value cross game: bbcrocsr DB?;? = Displacement value video frame movement: BBFrmmov DB?;? = Displacement value brush Motto: BBDRW DB ? = Brush width eraser: BBDEL DB?;? = Rubber wide flashing cursor: BBCSR DB?;? = Trustead wide text display: BBCHRDSP DB?;? = Frame value cursor movement value: bwmov dw?; Current function first; set the upper limit of the video: BWTOP DW?;? = Set value frame limit: bwbtm dw?;? = Set value video frame left limit: bwlft dw?;? = Set value vision frame right limit : Bwrgt dw?;? = Set value Right marginal value: bwaddx dw?;? = Word or graph wide .. Program entrance: Chkkey DW CK47; move to the upper left DW CK48; move up to DW CK49; move to the right DW Cret Invalid DW CK4B; shift to the left DW CRET; invalid DW CK4D; move to the right DW CRET; invalid DW CK4F; move to the left down DW CK50; downward DW CK51; move down right down AX = input cursor keys scan sight = Screen X-direction moving value DX = screen y to move value ES: Di = screen memory area site main process: (known al = 0 ah = scan-code) 1: Keyin: 2: SUB AH, 47H; = Home 3 : JB Keyret; Invalid 4: CMP AH, 11;> Scan Size 5: Ja Keyret 6: Mov BL, AH 7: Sub BH, BH 8: SHL BX, 1 9: MOV AX, BWMOV; Move 10: JMP Chkkey [BX]; enter each process

.. 40: CK47: 41: SUB DX, AX; Y to 42: CK4B: 43: Neg AX; Left is negative 44: CK49: 45: Add BP, AX; X-way 46: JMP Short CKFUN 47: CK4D: 48: SUB DX, AX 49: JMP CK49 50: CK51: 51: Add DX, AX 52: JMP CK49 53: CK48: 54: NEG AX; upright 55: CK50: 56: Add DX, AX 57: CKFUN: Use variable concepts to check "Window" 58: CMP DX, BWTOP; exceeded the upper limit? 59: JNS CKFUN1 60: MOV DX, BWTOP; upper limit value 61: CKFUN1: 62: CMP DX, BWBTM; beyond the lower limit? 63: jbe ckfun2 64: MOV DX, BWBTM; Limits 65: CKFUN2: 66: CMP BP, BWLFT; beyond the left limit? 67: JNS CKFUN3 68: MOV BP, BWLFT; left limit 69: CKFUN3: 70: Push BP 71: add bp, bwaddx; right marginal value ratio 72: CMP BP, BWRGT; beyond the right limit? 73: POP BP 74: JBE CKFUN4 75: MOV BP, BWRGT; Right limit 76: CKFUN4: 77: .. CKFUN4 The following is functional processing, determined by the front function parameters. With this method, a variety of functions can share an entry, and the program is streamlined and fast. Fourth, bridge method:

The bridge method is to use the characteristics of the read and write memory, which will be filled in the program directly, as a temporary bridge to change the functionality of this section. For example, when displaying, it is desirable to provide a variety of changes, but will not be willing to reduce the speed and increase too much. The best way is to use the bridge method, in the same address, fill in the required instructions. When the bridge method is well and flexible, the efficiency of the program is very helpful. However, it should be noted that only this method can only be used in the readable memory area, such as the "firm body", that is, the program is placed in only the memory (ROM). The following example, a bridge application displayed for the screen. First, the "material" of the bridge is set in the buffer, such as: cdspmod db 88h; 8805 = MOV [DI], Al DB 30H; 3005 = xor [di], al DB 08H; 0805 = OR [Di], Al DB 20H; 2005 = AND [DI], Al CDSPMOD is a buffer, with four data, which are different parts of the machine code, such as the semicolon Note. Because the four sets of machine code are 05, it is not necessary to fill. = The right side, that is, the instruction corresponding to the machine language. The program part first sets a proper definition, using a variable application method, and sequentially from 0 to 3 first in the scratch BX. Depending on the BX value, the required machine code is loaded. 10: CLOD: 11: MOV Al, CDSPMOD [BX]; use BX to summarize code 12: MOV CS: CDSP2 [1], Al; load CDSP2 1 13: CDSP: 14: SUB Si, Si; Data from 0 From 15: CDSP1: 16: LODSB; Take Information 17: CDSP2 Label Byte; Loaded Location 18: XOR ES: [DI], Al; Original 26 30 05 19: INC DI; 30 parts: LOOP CDSP1 21: RET 5, flow line method:

Industrial pipeline production operations require extremely stringent specifications, and after the original devices are developed, they are unified to assemble them on the production line. The program can also use the same method, but it is unfortunately unfortunately found ready-made, applicable examples, and only sets the method as follows: first set the process process, all can use this production process, all applicable. Then set the "production line" used in the process process, which is the buffer. Because the information used on the pipeline needs to be provided by the buffer. The length of this buffer is determined by the process, and the data in the buffer is loaded by each call this process. Each call program can be dependent on individual conditions, and the data required to be processed is placed in the buffer (all or part). After the call is called, the processed information is removed from the original buffer.

6. Correspondence

Anyone who will be organized according to a certain need will be arranged in a particular area in a certain fixed format. Whenever it is needed, immediately can be used in accordance with the position of the arrangement, which can be known as a corresponding table. This corresponding table is my favorite skill, and the speed is very fast, and the modification is also very easy. Especially in my work, I have never been arrested, write the program, and have a small break. Since the use of the form of the form, anything is suitable for this form, as long as you want to pass the most ideal structure, several instructions will be finished. A check form method used in the appendix in the appendix, the synthesis method used to zoom in, and is further introduced here. Assume that there is a set of graphics, to zoom in on the screen on the screen. The general program is the topic of this topic, which is moved to the register, and the information of each character, the code is 3 times, and the borrowing is used as the conversion value each time. When the conversion, it is necessary to put it into a 16-bit terminate, although it can be done with a loop, the delay of the time is quite large, and the reader can refer to Appendix II to compare. Of course, the table should take up space, in this example, if a 256b is used once, it is 512b. Therefore, this technique can be said to be in a spatial exchange time. Under Article 4 of Chapter III, "Efficiency", "Efficiency", we know that the keyboard input speed is determined in the speed of operation, and the response of people is far less than the computer, so it should be a time marginal value. Try to save. Currently, what is involved is displayed, and everyone is expected to get results immediately before the computer. Therefore, the display speed is not only fast, and the sooner the better. Therefore, the aforementioned empty exchange should be in the possible range, depending on the actual marginal effect. Now look at the data analysis, the binary information listed below, the left is the original graphic point in the left, and it is doubled in the right: the original is in the left and right extensions. 1000000000000000000000000000000000000000000001111 .. 0101010100110011 00110011. 11111111 There are now two factors now, first, no matter what is more than one, the length is doubled, and 256 of the one. The category of the amplification is the same, but the number of characters is doubled to 512. Second, half of the same is only half of the 512 in the zoom, so 256 is still available. As for the frontier or the latter, it is dependent on the situation. After the decision, it will be defined in the buffer, and the lattice data of the original graph is used as the index value, that is, the access method can be taken, and the zoom is immediately obtained. When making a corresponding table, a good habit should be developed, and according to the rules of the information, the fixed format is entered with equal length. This not only can the information in the table, but also easy to input, detect, modify, and a number.

Such as a table is: 100 TBXXX DB 0, 1, 3, 7, 0FH, 1FH, 3FH, 7FH, 0FFH, 2, 6, 0EH, 1EH, 3EH, 7EH, 0FEH This table is far less than the table below, Regularization: 100 TBXXX DB 000H, 001H, 003H, 007H, 001FH 200 DB 0FH, 002H, 006H, 00Eh, 01EH, 03EH, 07EH, 0FEH engaged in program writing, regular thinking and pursuit, often half-mexion . This little skill seems to have no big effect. In fact, the regular structure can easily utilize existing functions, or modifications. More favorable is to see the meaning and correctness of the table, when prior detection, you can save a lot of time. Seven, mode method

The so-called mode method refers to the analysis of the rules in the process of process, in order to find a common "mode". And use this mode to design a program unit to pursue the highest efficiency. This model can be represented by "concept", but the most ideal expression method is still suitable for visual graphics. That is to say, it is best to use the pattern, with graphics, and according to understanding and design. Take the usual function "Sort" as an example, the application of the model method is designed to be a program. First assume that the data structure needs to be sorted is: 11 The length of each data is fixed to a word. 12 The form is the ASCII code, 16 entered value, from 20 h to 7EH. 13 When you sort, the numerical number of data is ranked low, and the big man is in the high position. 14 The parameter setting is set to: Al = high level. AH = low information. DS: Si = Data Storage Office. The data is inspected by the low position and sorted simultaneously until all of them complete. When sorting, exchange of high and low positions to enable high site materials ≥ information in low site. Since human behavior is closely related to visual interest, the most effective way of cognition is illustrated by the drawing. The following is a graphic description of the above statement.

│? │ 模式 一 供 检查 ┤ ┤ AL, AH size ┌ ​​AH <- │ │ │ - Al ┐ ┐ │ ├─┤ │ Mode 2 Exchange Data ┤ Al <- │ │ <- - AH ├ type in Ah> Al 1 │ ├ ┤ │ 二 └ = │? │ = Si ┘ ├─┤

From the above figure, it is visible in the mode one, AH is the low information, Al is the high data. Compare the size of Al, AH, that is, whether it is in line with the sequence regulations. If you meet, continue, otherwise it will be placed in the low level, and the large value is placed in the high level. The program can simply complete the task simply as long as you try to keep this process. 1: Compar: 2: MOV AH, Al; set AH for low value 3: Compar1: 4: Lodsb; Take information 5: CMP Al, AH; ratio large, small 6: jae commit; high, unchanged 7: MOV [Si-2], AX; Exchange AH, Al, Sort 8: Dec Si; to the low position to check 9: Mov Ah, [Si-2] 10: JMP Compar1

Of course, the above program is not established, because there is no export, it will never finish it. There are many ways to terminate the program, one is to use counters, one is to use locations, and use the termination command, and there is a long short. First, assume that in DS: Si, there is a length value, set to the counter loop to see: 1: Lodsw 2: MOV CX, AX; like this, 3b 18c; if used in MOV CX, [Si]  Inc Si Inc Si; 6b, 21T 3: Sub Al, Al; set the minimum, backup 4: COMPAR: 5: MOV AH, Al; set AH is low value 6: Compar1: 7: Lodsb; Take information 8: CMP Al, Ah; ratio, small 9: JB Compar2; low large, need to be sorted 10: loop commit; loop 11: Ret; completion 12: Compar2: 13: MOV [Si-2], AX; exchange AH, Al, Sort 14: Dec Si; to the low position 15: MOV AH, [Si-2] 16: The loop in JMP Compar1 program, there is a relatively branch of the previous one, because the loop is 17T, the comparison is a ready-made loop It is disabled to form a waste. If the loop is changed to position, the program is: 1: MOV CX, Si 2: Add CX, [Si] 3: Inc Si 4: Inc Si 5: Sub Al, Al; first set to minimum, standby 6: Compar: 7: MOV AH, Al; set AH is low value 8: Compar1: 9: Lodsb; Take information 10: CMP Si, CX; ratio location to the end point? 11: Jae Comret; completed 12: CMP Al, AH; ratio, small 13: jae commit; high, re-invest 14: MOV [Si-2], AX; exchange AH, Al, Sort by 15: Dec Si; Low position, check 16: Mov Ah, [Si-2] 17: JMP Compar1 18: Comret: 19: Ret This, when the branch is in the section, the loop is turned on, 10, 11 compares the site to determine if it is completed. This, only once completed, when needed, 16T, the rest of the other execution time is 4T, which is more than 13t from the previous road. Then try the "Termination Directive" method, and its necessary conditions are excess combinations available in the information. It is generally more ideal for extreme values ​​such as 00h, 0FFH, below and at 0FFH, and placed in the data termination.

1: MOV CL, 0FFH; Termination Check 2: Sub Al, Al; first set to minimum, spare 3: COMPAR: 4: MOV AH, Al; set AH is a low value 5: COMPAR1: 6: LODSB; 7: CMP Al, Cl; Ratio Terminate Directive? 8: Jae Comret; Complete 9: CMP AL, AH; Big, Small 10: Jae Compar; High Large, Re-Check 11: MOV [Si-2], AX; Exchange AH, Al, Sort: Dec Si; Low-position resurrency 13: MOV AH, [Si-2] 14: JMP Compar1 15: Comret: 16: Ret is like this, the program is short, the other effect is similar. This section is on the processing speed, and there is still a lot of oil. Because the information has been checked, because the loop relationship, it will continue to repeat the check. Can I avoid this? In fact, when sorted into an address, it is said that it has been checked by this site. Therefore, as long as it records, the address is restored as follows. 1: MOV CL, 0FFH; Termination Check 2: Compar0: 3: Sub Al, Al; first set to minimum, spare 4: 50: MOV AH, Al; set ah is a low value 6: Compar1: 7: Lodsb; Take information 8: CMP Al, Cl; ratio is the termination of the instruction? 9: Jae Comret; Complete 10: CMP Al, AH; Big, Small 11: Jae Compar; High Large, Re-Check 12: MOV Di, Si; Temporary Saving 13: Compar2: 14: MOV [Si-2], AX AH, Al, Sort 15: DEC Si; to the low position 1: MOV AH, [Si-2] 17: LODSB; taking the ordering information 18: CMP Al, AH; ratio is the row 19: JB Compar2; 20: MOV SI, DI; No, restore the original site 21: JMP Compar0; do 22: Comret: 23: Ret, in all, the program is endless, especially in combination language production program, more flexible. Just like Go, it is often enough to turn over the entire situation. The efficiency of the program is often determined on the circuit, and the reader must not think that one or two clocks can't be considered. It is to know that Wang Yang's sea is also accumulated by a little drip water. There are still many things that are worth thinking about this process, and readers may wish to study! I think more, I will naturally have a splendid pen.

It's really important to sort, and more effective methods are also the principle of application mode analysis, first identify the "type" of the information. If the same nature is used as an example, in order to avoid information, it is wasted. We may wish to study if it is possible, straightforward, will be based on the size, position it, once? The benefits of the computer are the regularity of the information, and we should use this advantage to find out the models of its sort. The previous example was divided into two modes, one is to find, one is to move. If we change the look to record, turn the movement to arrange, the situation is great. When the indirect addressing skill is recorded, the information taken is considered to be a value, corresponding to a buffer. If the total value of each data is greater than 256 and less than 65536, it can be recorded in two-character. If the data is a binary value, it can be from 0 to 255, that is, 512 correspondence units. Assume that the original information is in the DS: SI, the length is in CX. First, set a record area: 1: Record DB 512 DUP (0) 2: Push Si; program start 3: Check: 4: Lodsb; Take information, AH is always 0 5: MOV BX, AX; use BX indirect address 6: Inc Word PTR Record [BX] 7: LOOP CHECK 8: Store: 9: Mov Si, Offset Record 512; Point to the Most; Post Record 10: MOV BP, Offset Record; Inspection 11: POP Di; Data Storage 12: Store1: 13: CMP Si, BP; Is Checking? 14: JE Recend; completed 15: Dec Si; Take 16: DEC SI 17: MOV CX, [Si]; Take the record value 18: JCXZ Store1; no record, re-saving 19: MOV AX, Si; current site 20: SUB AX, BP; Difference 21: SHR AX, 1; Original Value 22: Store2: 23: Rep Stosw; Reapload 24: JMP Store1; Continue 25: Recend: 26: RET Change Endless, Especially in combination language writing, there is no end. Just use a little bit of snacks, add a little change factor, a clever program, will jump out. The fun of the writer is the madness of the mind. Scholars may wish to improve this type, and there are many places that can be started. After developing habits, the program will naturally streamline. Eight, preset

The preset method is suitable for the process of the process, especially in the case of uncertain, sometimes need multiple inspections, but not only wasting time, not good for space. For example, there is a program that is an object to handle the process selected by the user. Because the user has passed the interfacial program, the work must now be performed in a sequence. This is a very difficult job, it is not difficult to perform a fixed order, the following program can achieve the purpose. Of course, as always, we will try to improve the program. Finally, let's discuss how to perform the order arranged by the user. There are eight kinds of steps. When the user is selected, the BX value is equal to the subscription of the substructure. The mode of use is "switch", namely the single number is open, set parameters, plurality, and cancel settings. After setting, because there are eight programs, you can use eight bits to set the flag required. Of course, this should be regarded as if the performance, the eight yuan is just using a banner flash: 1: setup: 2: CMP BX, MaxVal; maximum check 3: ja setret; more than, invalid 4: SHL BX, 1; parameter Take 2 5: JMP Subtb [BX]; various program 6: Subtb dw Sub1; various program 7: DW SUB2; program set 8: ..; Flag 9: DW SUBN 10: Enter: 11: SHR flag, 1; Check FLAG 12: JNC Enter1 13: Call Sub1; set 14: Enter1: 15: SHR FLAG, 1 16: JNC ENTER2 17: Call Sub2 18: Enter2: 19: ..; So continuous eight times clearly The practice is a stupid, then after tenth, it can be replaced by: 10: ENTER: 11: MOV CX, 8 12: MOV Al, Flag; Terminal is more effective 13: OR Al, Al 14: JZ Entret; do not have to do 15: SUB BX, BX 16: Loop0: 17: SHR Al, 1 18: JNC Loop1 19: Push AX 20: Push BX 21: Push CX 22: Call Subtb [BX] 23: POP CX 24: POP BX 25: POP AX 26: LOOP1: 27: Inc BX 28: Inc BX 29: loop loop0 30: Entret: 31: Ret is so much better, but can you change it again? The wonderfulness of the combined language is that there is endless, and it can also see if it can change the pattern. From the beginning, the way is slightly changed, the concept of the flag is the supply of supply. At the time of application, take up a terminus, and the statutory is limited, and it is a pity. In addition, eight different submodes, it is best to take a counting triprotener, it is best to save. Therefore, the importance of setting is obvious, the prime is good, not only the application of the instruction. The original concept, and the programming, often determined before the program design.

We call "Pre-preset", change the aforementioned settings, use a set of buffers, first defined as follows: DB 0; count Bufer DW 8 DUP (0); So 1 DW 1; Terminate Signal Then sequentially, preset and execute as follows: 1: setup: 2: CMP BX, maxval; maximum check 3: ja setret; more than, invalid 4: shl bx, 1; parameter multiplication 2 5: Add bx, Subtb 6: JMP BX; Various program 7: SUB3: 8: XOR Buuer, BX; set to the third group 9: jnz sub31; open 10: SUB30: 11: DEC BUFER-1; Cancel 12: Ret 13: Sub31: Inc Bufer_1; Count 14: RET 15: Subtb DW SUB1 16: DW SUB2 .. 21: DW SUBN 22: ENTER: 23: MOV SI, OFFSET BUFER-1 24: LODSB; check if you need 25: OR Al, Al; Then there is no 26: jz Entret 27: ENTER1: 28: Lodsw; decree data 29: CMP AX, 1; programming entry 30: JB Enter1; 0 means not do 31: jz entret; 1 means termination 32: Push Si 33: Call AX; executable 34: POP SI 35: JMP ENTER1 36: Entret: 37: RET A 41st call program requires 31 words, and now there is only 21 words, and the speed is much faster. Not only that, but only eight submodes can be provided in the foreigners, up to sixteen subscribers. This system is not, as long as the reserved buffer is enough, the subsidy that can be provided is unlimited. More important features are the order of program execution. In addition to this preset method, other methods are limited by the Subtb arrangement, and cannot be changed. However, this method is fully prone to the needs of the user, and whether the order of the subscriber is executed, and whether it is executed. Note that when Setup, the BX parameters represent the order of execution. If you want to decide the order in accordance with the order of setting, just increase the buffer, add a set of preset programs, as shown below: 1: Setup: 2: SHL AX, 1; Enter parameters 3: Add Ax, OFFSET SUBTB; Sub-entry 4: MOV BX, BUFER-2; Location Sequence 5: SHL BX, 1; Pointing Location 6: MOV BUFDER [BX], AX; Deposit Buffer 7: Inc Word PTR Bufer-2; Plus a 8: RET this, the prior to the first is placed in front, then the rear is called, the user can arrange the call as long as the subscriber code is known. Even the parameters required for each sub-formula can also be pre-set in advance, and then removed once. The preset method is preferably "user" interface, and as an application, it is simple and easy to flexibly. For example, there are some application modules to apply this method, classify, numbered, books in the manual to provide user selection, application.

转载请注明原文地址:https://www.9cbs.com/read-2419.html

New Post(0)