IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Some more important questions in Assembler


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 18, 2010 1:05 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts Finding Assembler programs PL/I & Assembler 5
No new posts How Can I Recall a Migrated Data Set ... PL/I & Assembler 3
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts Getting SOC4 while calling a Cobol DB... PL/I & Assembler 4
Search our Forums:

Back to Top