Loading and running programs

Peter C. Capon, Pete J. Jinks · 1988

In a simple compiler, binary instructions can be generated directly in memory as an executable program and the program then run immediately after compilation. In this case, the mathematical, input and output routines built into Pascal have to be added by the compiler. Such a system is called compile and run because the logically separate operations of compiling, linking in these additional routines, loading the binary program into memory and running the program are coalesced. One potential drawback is that the program must be recompiled every time it is run. This may not be a disadvantage during program development, but in other circumstances users require more elaborate facilities. They may require to run a program many times without the expense of recompilation. It may be necessary to combine a user program with other procedures written and compiled separately, possibly in other languages. Many users require access to portions of very large sets of procedures, such as statistical, equation solving, or graphical libraries, again without recompiling them every time. It may also be useful to be able to write large programs as a series of separately compiled modules, with well defined and checkable interfaces. Unfortunately standard Pascal does not have a module facility, but this is an important feature of languages such as Modula 2 and Ada and will be discussed in chapter 16.

Read the paper · More papers on PaperTik