Page 118 - DCAP507_SYSTEM_SOFTWARE
P. 118

System Software




                    Notes             It is possible to write source program with numerous programs and multiple languages,
                                       since the source programs are first transformed to object programs always, and loader
                                       accepts these object modules to translate it to executable form.

                                   8.1.3 Absolute Loaders

                                   Absolute loader is a type of loader in which relocated object files are produced, loader accepts
                                   these files and  positions them at particular locations in the memory.  This type  of loader is
                                   known as absolute since no relocation information is required; rather it is attained from  the
                                   programmer or  assembler.  The  beginning address  of  every  module  is  recognized  to  the
                                   programmer, this corresponding beginning address is accumulated in the object file, then task
                                   of loader turns out to be very simple and that is to simply position the executable form of the
                                   machine instructions at the locations declared in the object file. In this scheme, the programmer
                                   or assembler should have information  of memory management. The  resolution of  external
                                   references or linking of dissimilar subroutines are the concerns which require to be managed by
                                   the programmer. The programmer should pay attention to two things: first thing is specification
                                   of beginning address of each module to be utilized. If some alteration is performed in some
                                   module then the length of that module may differ. This causes a variation in the starting address
                                   of instant next modules, its then  the programmer's  duty to make essential  variations in the
                                   starting addresses of respective modules. Second thing is while branching from one division to
                                   another the absolute starting address of individual module is to be recognized by the programmer
                                   so that such address can be specified at individual JMP instruction.


                                          Example:






























                                   This example includes two segments, which are inter-reliant. At line number 1 the assembler
                                   directive START states the physical starting address that can be used throughout the execution of
                                   the first segment MAIN. Then at line number 15 the JMP instruction is provided which states the
                                   physical starting address that can be utilized by the second segment. The assembler makes the
                                   object codes for these two segments by taking into account the stating addresses of these two
                                   segments. During the execution, the first segment will be loaded at address 1000 and second
                                   segment will be loaded at address 5000 as mentioned by the programmer. Thus, the problem of




          112                               LOVELY PROFESSIONAL UNIVERSITY
   113   114   115   116   117   118   119   120   121   122   123