A (Root Phase) xxx xxx
c
B,:-------Location yyyyyy
Figure 59. AnOverlay Structure
The overlay structure shown in Figure 59 could be prestructured using the fol
lowing sequence of commands (Programs A, B,C" D, and E are the names of
TEXT files; the overlay phases will be named Root, Second, Third, etc.):LOAD A B GENMOD ROOT (FROM A TO B STR) GENMOD SECOND (FROM B) LOADMOD ROOT INCLUDE C D GENMOD THIRD (FROM C TO D) GENMOD FOURTH (FROM D) LOADMOD THIRD INCLUDE E GENMOD FIFTH (FROM E)
The programmer need not know the storage address where each phase begins.
A TEXT file can be made to load at the proper address by reloading earlier
phases. In the foregoing example, the command sequences,"LOADMOD ROOT /INCLUDE C D" and "LOADMOD THIRD/INCLUDE E," cause
TEXT files C, D, and E to load at the proper addresses.
If the root phase contains address constants to the other phases, one copy of
the root must be kept in storage while each of the other phases is brought in by
theLOAD or INCLUDE commands without an intervening GENMOD. The
root phase is then processed by GENMOD after all address constants have
been satisfied. In this case, the programmer must know the address where non
root phases begin (in Figure 59, locations xxxxxx and yyyyyy). The following
sequence of commands could be used:LOAD A B GENMOD SECOND (FROM B) INCLUDE C D (ORIGIN xxxxxx) GENMOD THIRD (FROM C TO D) GENMOD FOURTH (FROM D) INCLUDE E (ORIGIN yyyyyy) GENMOD FIFTH (FROM E) LOAD A B INCLUDE C D (ORIGIN xxxxxx) INCLUDE E (ORIGIN yyyyyy) GENMOD ROOT (FROM A TO C STR) The ORIGIN option of the INCLUDE command is used to cause the included
file to overlay a previously loaded file. The address at which a phase begins
must be a doubleword boundary. For example, if the root phase were X'2BD'
bytes long, starting at virtual storage locationX'20000', then location xxxxxx
would be the next double word boundary, orX'202CO'. Assembler Virtual Storage Requirements 463
c
B
Figure 59. An
The overlay structure shown in Figure 59 could be prestructured using the fol
lowing sequence of commands (Programs A, B,
TEXT files; the overlay phases will be named Root, Second, Third, etc.):
The programmer need not know the storage address where each phase begins.
A TEXT file can be made to load at the proper address by reloading earlier
phases. In the foregoing example, the command sequences,
TEXT files C, D, and E to load at the proper addresses.
If the root phase contains address constants to the other phases, one copy of
the root must be kept in storage while each of the other phases is brought in by
the
root phase is then processed by GENMOD after all address constants have
been satisfied. In this case, the programmer must know the address where non
root phases begin (in Figure 59, locations xxxxxx and yyyyyy). The following
sequence of commands could be used:
file to overlay a previously loaded file. The address at which a phase begins
must be a doubleword boundary. For example, if the root phase were X'2BD'
bytes long, starting at virtual storage location
would be the next double word boundary, or