Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Static linking and Dynamic linking in Assembler

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
ganeshptrk

New User


Joined: 04 Apr 2007
Posts: 17
Location: Chennai

PostPosted: Thu Mar 13, 2008 9:02 pm    Post subject: Static linking and Dynamic linking in Assembler
Reply with quote

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
View user's profile Send private message

Mistermind
Warnings : 2

New User


Joined: 08 Feb 2008
Posts: 46
Location: Dublin

PostPosted: Sun Mar 16, 2008 1:30 am    Post subject:
Reply with quote

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
View user's profile Send private message
Mistermind
Warnings : 2

New User


Joined: 08 Feb 2008
Posts: 46
Location: Dublin

PostPosted: Sun Mar 16, 2008 1:32 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am
No new posts A not very Christmassy PL/I tale, wit... prino PL/I & Assembler 3 Mon Dec 26, 2016 1:01 am
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us