Modular Programming
Modular Programming
•Modular Programming
•Need of Modular Programming
•Why Modular Programming?
•Modularity
•Advantages of Modular Programming
•Disadvantages of Modular Programming
MODULAR PROGRAMMING
•We will assign a name to each module and combine the named
modules in a program structure under the control of a main program.
•When all modules are tested ‘OK’, they are linked together to form a
large functioning program.
1.Assembling Process
• As mentioned earlier, assembler translates a source file that was created
using the editor into machine language such as binary or object
code. The assembler reads the source file of our program from the disk
where we saved it after editing. An assembler usually reads our source file
more than once.
• The assembler generates two files on the floppy or hard disk during
these two passes. The first file is called the object file. The object file
contains the binary codes for the instructions. The second file generated by
the assembler is called assembler list file. This file contains the
assembly language statements, the binary code for each
instruction, and the offset for each instruction.
• In the first pass, the assembler performs the following operations
1.Assembling Process
• Reading the source program instructions.
• Creating a symbol table in which all
symbols used in
the program, together with their attributes, are stored.
• Replacing all mnemonic codes by their binary
codes.
• Detecting any syntax errors in
the source program.
• Assigning relative addresses to
instructions
and data.
2.Linking Process