Page 12 - DCAP102_DCAP_401_Foundations of Computer Programming
P. 12
Unit 1: Foundation of Programming Languages
Editor Notes
The editor is a program that allows the user to enter, modify, and store a group of instructions or
text under a file name. The editor programs can be classified in two groups.
1. Line editors
2. Full screen editors
Line editors, such as EDIT in MS DOS, work with the manage one line at a time. Full screen
editors, such as Notepad, Wordpad etc. manage the full screen or a paragraph at a time. To write
text, the user must call the editor under the control of the operating system. As soon as the editor
program is transferred from the disk to the system memory, the program control is transferred
from the operating system to the editor program. The editor has its own command and the user
can enter and modify text by using those commands. Some editor programs such as WordPerfect
are very easy to use. At the completion of writing a program, the exit command of the editor
program will save the program on the disk under the file name and will transfer the control to the
operating system. If the source file is intended to be a program in the 8086 assembly language the
user should follow the syntax of the assembly language and the rules of the assembler.
Linker
For modularity of your programs, it is better to break your program into several sub routines. It is
even better to put the common routine, like reading a hexadecimal number, writing hexadecimal
number, etc., which could be used by a lot of your other programs into a separate fi le. These fi les
are assembled separately. After each file has been successfully assembled, they can be linked
together to form a large file, which constitutes your complete program. The file containing the
common routines can be linked to your other program also. The program that links your program
is called the linker.
The linker produces a link fi le, which contains the binary code for all compound modules. The
linker also produces link maps, which contains the address information about the linked fi les. The
linker however does not assign absolute addresses to your program. It only assigns continuous
relative addresses to all the modules linked starting from the zero. This form a program is said to
be relocate-able because it can be put anywhere in memory to be run.
Loader
Loader is a program which assigns absolute addresses to the program. These addresses are
generated by adding the address from where the program is loaded into the memory to all the
offsets. Loader comes into action when you want to execute your program. This program is
brought from the secondary memory like disk. The file name extension for loading is .exe or
.com, which after loading can be executed by the CPU.
Debugger
The debugger is a program that allows the user to test and debug the object file. The user can
employ this program to perform the following functions.
1. Make changes in the object code.
2. Examine and modify the contents of memory.
3. Set breakpoints, execute a segment of the program and display register contents after the
execution.
LOVELY PROFESSIONAL UNIVERSITY 5