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
 

 

Some more important questions in Assembler

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
alokagarwaljgd

New User


Joined: 02 Jun 2006
Posts: 28

PostPosted: Fri Jun 18, 2010 12:34 am    Post subject: Some more important questions in Assembler
Reply with quote

Hi,

I have some questions in Assembler whose answers were difficult to find. Can you please help for the same?

1) How to swap the contents of register/memory without using a third variable/memory/register?

2) Why the program and data area together can only be 4095 bytes by using one base register?

3) What is AMODE and RMODE in assembler?

4) what is the meaning of global variable in assembler and how can we define it?

5) Whether the below instructions are correct, then how many bytes will be moved to A in each case, I thought they are correct and 0 and 1 byte will be moved respectively but the interviewer said it's wrong. Can you please correct?
a) MVC A(0), B
B) MVC A(1), B

6) Is it possible that a variable defined in the DSECT in the main program can be used in the sub-program other than passing its address in register, if yes can you please give an example for the same?

7) In a DSECT, how assembler understands that it should not allocate any memory?

8) What happens if we use DC in a DSECT?

9) Where are the variables that are defined in a DSECT stored? If it is a temporary memory then how are they stored?

10) What is the use of base register in the program with respect to reference? Is it used in the whole program for referring anything other than helping in setting up addressibility?

11) What is destructive overlap? can you please give an example?

12) What will the following instructions do?
a) L R3,3
b) LA R3,R4

13) I want to execute some code in the main program if the return code from the sub-program is '0' and want to display "Error" if the return code from the sub-program is '4'. In my sub-program I have to setup return code '0' and return code '4' in different situations. I understand that we can check the return code generated by the sub-program in the main program by checking the content of register R0 and also we can't load any value in register R0. So, in this case, how can I code my sub-program in order to setup return code '0' and '4' and then get it checked in my main program?

Thanks,
Alok
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8121
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jun 18, 2010 1:05 am    Post subject:
Reply with quote

You must not have looked very much.

1. I Googled swap registers and got 638,000 hits -- the very first of which has the IBM assembler code to do this.

2. 4096 is a power of two -- IBM limited the number of bits that could be used for a base register.

3. Google is your friend. Try amode rmode in Google and see if any of the 14,300 hits tell you anything.

4. Google is your friend. Try assembler global variable and see if any of the 634,000 hits help you.

5. Review the structure of the MVC instruction.

6. I'm not sure what is being asked here.

7. DSECT tells the assembler.

8. What do you think happens?

9. Another question that doesn't make sense.

10. What do you think?

11.
Code:
MVI PRNTAREA,C' '
MVC PRNTAREA+1(132),PRNTAREA
.
.
.
PRNTAREA DS CL133


12. Why are you interviewing in assembler in you don't know the difference between a load and load address instruction?

13. Standard assembler would apply here -- again, why are you interviewing in assembler if you don't know how to do this?
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 -> Mainframe Interview Questions 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 Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
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 Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
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