[label] LOAD EP=program-name|EPLOC=program-address|DE=list-entry-addr
[,DCB=dcb-addr]
[,ERRET=err-rtn-addr]
[,LSEARCH=NO|YES]
[,LOADPT=addr]
[,RELATED=value]
Loads the specified program into memory.
Assembler LOADs:
The LOAD macro loads the program in memory above or below the line depending on its RMODE setting. At the completion of the LOAD, register 15 has a binary value of zero, register 0 has the address of where the program was loaded, register 1 contains the length of the program, and the high order bit of register 0 is set to indicate the AMODE setting of the loaded program, as follows:
0=AMODE(24)
1=AMODE(31)
COBOL LOADs:
The LOAD macro loads the stub Assembler program below the line. When the stub Assembler program is executed, it loads the COBOL program above or below the line depending on its AMODE setting; a COBOL program's Working-Storage Section may be loaded separately if the program's DATA directive does not match its AMODE directive. If an AMODE(31) Assembler program LOADs an AMODE(24) COBOL program, then an 0C5 abend occurs at the time the stub code is executed, since the 31-bit Assembler parameter addresses cannot be successfully passed to the 24-bit COBOL program.
DOS/VSE compatibility:
If the VSECOMP compiler directive is specified, Enterprise Developer Assembler support includes emulating the DOS/VSE version of this macro. In this case the first positional parameter is the name of a program to load (the EP keyword is not required). At the completion of the LOAD, register 1 has the address of where the program was loaded, with the high order bit set to indicate the AMODE setting of the loaded program.
LOAD EP=MYPROG
LOAD EPLOC=PNAME PNAME DC CL8'MYPROG'