View previous topic :: View next topic
|
Author |
Message |
ganeshptrk
New User
Joined: 04 Apr 2007 Posts: 17 Location: Chennai
|
|
|
|
We know that in COBOL we use
call "program-1" to statically link program-1 to main program
and
move "program-1" to myprog
call myprog to dynamicall link program-1 to main program.
How can we achive this (Static link and Dynamic linking) in Assembler.
Thanks
Ganesh |
|
Back to top |
|
|
Mistermind
New User
Joined: 08 Feb 2008 Posts: 46 Location: Dublin
|
|
|
|
Ordinary linkedit will pick up assembler subroutines invoked by IBM "CALL" macro.
To invoke a dynamic subroutine, invoke IBM macro LOAD (check out the parameters), then simply branch to the first byte of the loaded subroutine loadmodule. Upon completion the subroutine will return control to the calling module. |
|
Back to top |
|
|
Mistermind
New User
Joined: 08 Feb 2008 Posts: 46 Location: Dublin
|
|
|
|
You will need to GETMAIN to ensure storage is available for you dynamic subroutine. You can load your subrtn below or above the line. The LOAD will be executed once only, before the first execution of the subrtn. |
|
Back to top |
|
|
|