Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you initialize a register to 0000?

Answers were Sorted based on User's Feedback



How do you initialize a register to 0000?..

Answer / ajay kuriyal

from my point of view the best way is to do boolean
XR RX,RX

Now RX will have '0000'

Is This Answer Correct ?    25 Yes 2 No

How do you initialize a register to 0000?..

Answer / guest

LA Rx,0
L Rx,=F'0'
XR Rx,Rx

Is This Answer Correct ?    17 Yes 4 No

How do you initialize a register to 0000?..

Answer / hariconda

By using shifting instructions also we can initialize zeros
to register.

SLL Rx,31

SRL Rx,31

Is This Answer Correct ?    12 Yes 1 No

How do you initialize a register to 0000?..

Answer / pazhanivel seethapathy

The standard ways to intialize registers are as follows

1. SR Rx,Rx or
2. LA Rx,0 or
3. XR Rx,Rx

Is This Answer Correct ?    10 Yes 1 No

How do you initialize a register to 0000?..

Answer / guest

we can use the XR instruction.

Is This Answer Correct ?    9 Yes 0 No

How do you initialize a register to 0000?..

Answer / sunny

XR Rx,Rx

This is the best way and most efficient way of initializing
the register values or Label values to '0'.

Its because the time required to execute a Logical
Instruction is always less than the Arithmetic Instructions.

e.g SR Rx,Rx consumes more execution time than XR Rx,Rx.

So XR Rx,Rx is a better way to do obtain our target.

Is This Answer Correct ?    7 Yes 0 No

How do you initialize a register to 0000?..

Answer / sourav

The best way to initialize a register is
SR Rx,Rx
instruction.

There are other ways as well, few of them are already
posted.

Is This Answer Correct ?    11 Yes 5 No

How do you initialize a register to 0000?..

Answer / anonym

1. Register i-memory (fastest)
LA x,0
SRL x,64

2. register register
XGR/XR x,x
SGR/SR x,x

3. register memory (not very clever)
L x,=A(0)
LG x,=AD(0)

Is This Answer Correct ?    4 Yes 2 No

How do you initialize a register to 0000?..

Answer / sourabh

XR Rx,Rx
Logical instruction is always fast.

Is This Answer Correct ?    0 Yes 0 No

How do you initialize a register to 0000?..

Answer / sam

I'm assuming something like

R0 EQU 0
R1 EQU 1
:
Rx EQU x

is coded somewhere in the program

Is This Answer Correct ?    2 Yes 26 No

Post New Answer

More Assembler Interview Questions

how to find the dump

3 Answers   EDS,


How to pass instream data in sysin with Assembler?

2 Answers   ANZ, IBM,


about maximum displacement and how to cross this limit.

2 Answers   EDS,


HOW MANY MAXIMUM BASE REGISTERS WE CAN HAVE IN A PROGRAM AND ALSO HOW MANY MAXIMUM BASE REGISTERS WE CAN HAVE IN A SINGLE PROGRAM.

5 Answers   IBM, TCS,


What is the use of TRT instruction and how it is working?

7 Answers   HCL, IBM, Wipro,


Why do we use "drop"? What does "using" do?

4 Answers  


What is need of start 0? In steed of can we use anyother numerics? If we use what will happen?

0 Answers  


explain about maximum displacement and how to cross this limit?

0 Answers   IBM,


What is house keeping in assembler? And explain the following code HELLOTSO START 0 * PRINT NOGEN BEGIN SAVE (14,12) LR 12,15 USING TYPE,12 ST 13,SAVE+4 LA 11,SAVE ST 11,8(13) LR 13,11

6 Answers   Mind Tree,


How we can Pass the parameters from JCL to assembler Pgm?

4 Answers   Tech Mahindra,


How do you round the addition or subtraction of two numbers in assembler? what does the following code do? AP WKUR,=P'5' where WKUR is a label

3 Answers   CSC, IBM,


registers(0-15) ,where they are going be resides., does that mean here is it resides whether real or virtual memory? and why? then why we are assign even registers(0 to 6) for FP operations????

3 Answers  


Categories