Scor­pio News

  

October–December 1988 – Volume 2. Issue 4.











Page 3 of 35











Letters to the Editor

Overlays & Chained Files

Dear Sir

I am writing in response to the article by R. Pearce in Volume 2, Issue 3 of Scorpio News concerning the use of overlay and chained files.

He may like to know that at least two compilers support overlay files: Borland’s Turbo Pascal and the MIX C Compiler. I have yet to use this facility with the MIX C compiler, and so cannot comment on its use, but I have used the Borland product extensively and found it entirely suitable for producing large programs of commercial quality. It also allows for the creation of chained files which are called by the procedure Chain(-.-).

The transfer of global data is also possible by reserving space between the end of the Pascal run-time library and the start of the chain file.

The creation and use of overlay files is even easier. Overlay files are produced automatically by the compiler simply by prefixing the declaration of any procedure or function with the word “overlay”. Consecutive overlay sub-programs are placed in the same overlay file. Any intervening non-overlay declaration starts a new file for subsequent overlay sub- programs.

As Mr Pearce implies in his article, overlay files are the most useful method in general, but chaining has the advantage when the application consists of a series of stages which never, or rarely, return to an earlier stage.

A more important point, perhaps, is the choice of an appropriate language and compiler, with all the facilities likely to be required, before one begins writing the program. Programming ought to proceed with as few delays or resorts to machine code as possible.

Unfortunately this goal can usually only be achieved when you have access to a reasonably large number of compilers. However, from my experience I would recommend Turbo Pascal as a suitable language for writing serious applications.

Yours sincerely, Kevin R. Smith.












Page 3 of 35