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
 

 

How to access array elemnts in assembler

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

New User


Joined: 19 Nov 2004
Posts: 24
Location: Banglore

PostPosted: Fri Jul 18, 2008 7:47 pm    Post subject: How to access array elemnts in assembler
Reply with quote

can any one please answer to these below instruction questions?

1) How to pass paramters to the sub program? How it will be recieved by calling program? How the control is sent back to called program?
2)How to access array elemnts in assembler?
3)How to suppress leading zeros using edit instruction?

Many thanks in advance
Kalpana
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Fri Jul 18, 2008 8:05 pm    Post subject:
Reply with quote

I am not an Assembler expert, but:
1. Set up an address block in memory. The first parameter's address goes at offset 0, the second parameter's address goes at offset 4, etc. The last address has the high-order bit set to '1' to indicate the end of the list. Load the address of block into register 1. The called program uses register 1 to load the parameter addresses. Under standard register conventions, register 14 contains the return address upon entry into the subroutine.
2. Trick question. There's no such thing as arrays, per se, in Assembler. All Assembler instructions use offsets from registers to determine addresses.
3. Look into the ED or EDMK instructions.
Back to top
View user's profile Send private message
kalpana

New User


Joined: 19 Nov 2004
Posts: 24
Location: Banglore

PostPosted: Fri Jul 18, 2008 8:28 pm    Post subject: Reply to: How to access array elemnts in assembler
Reply with quote

can you please explain me with sample code for sub program concept.

and array elements accessing
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 A not very Christmassy PL/I tale, wit... prino PL/I & Assembler 3 Mon Dec 26, 2016 1:01 am
No new posts IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts RACF profile access vasanthz All Other Mainframe Topics 11 Fri Sep 23, 2016 5:51 am
No new posts Online Assembler Program Starting point Aditya.Srivastava PL/I & Assembler 4 Fri Jul 08, 2016 6:48 pm


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