模块化设计结构化编程
The programs that we work nowadays are often too large. As we can see the applications that we run today and the software that we use are able to perform multiple functions and hence they have large program codes. But, it is very difficult to build or design such a large code all at once. Also, it is very hard to maintain it afterward in cases of any errors or malfunctioning because the errors are too difficult to locate and correct. Also, it becomes difficult for multiple members to work on the same program. This increases the burden on one programmer of the entire project. To solve this issue, the concept of modular programming was proposed.
我们当今工作的程序通常太大。 正如我们所看到的,我们今天运行的应用程序和所使用的软件能够执行多种功能,因此它们具有大型程序代码。 但是,很难一次构建或设计这么大的代码。 另外,在出现任何错误或故障的情况下,以后很难对其进行维护,因为这些错误很难定位和纠正。 而且,多个成员在同一个程序上工作变得困难。 这增加了整个项目的一名程序员的负担。 为了解决这个问题, 提出了模块化编程的概念 。
Often large Programs are split into various small independent tasks which can be easily designed and implemented. This is known as modular programming.
通常,大型程序会分成各种小型独立任务,这些任务可以轻松设计和实施。 这就是所谓的模块化编程 。
The concept of modular programming provides various advantages over the ancient method of programming. Some of them are listed as follows:
与古老的编程方法相比,模块化编程的概念具有多种优势。 其中一些列出如下:
The program code becomes simple to understand.
程序代码变得易于理解。
Reduced development time and reduced burden on developers as the different person can work on each module now as a team.
减少了开发时间并减轻了开发人员的负担,因为现在可以由不同的人以团队的方式在每个模块上工作。
Debugging process becomes easier.
调试过程变得更加容易。
In case of any error or crash, it is easy to locate and fix the error.
如果发生任何错误或崩溃,很容易找到并修复错误。
The code reusability can be implemented through the concept of modular programming. By doing so, we can avoid writing the same sequence of instructions again and again in the program. This same sequence can be written separately and can be used whenever needed.
可以通过模块化编程的概念来实现代码的可重用性。 这样,我们可以避免在程序中一次又一次地编写相同的指令序列。 该相同序列可以单独编写,并且可以在需要时使用。
The code reusability is a very important feature that modular programming offers us. In the 8086 microprocessor, we implement it using procedures and macros. The procedures and macros are the set of instructions which are written separately in a code. This can be called from anywhere in the mainstream of code.
代码可重用性是模块化编程为我们提供的一个非常重要的功能。 在8086微处理器中,我们使用过程和宏来实现它。 过程和宏是一组指令,它们分别用代码编写。 可以在主流代码中的任何位置调用它。
翻译自: https://www.includehelp.com/embedded-system/modular-programming-8086-microprocessor.aspx
模块化设计结构化编程