How do you initialize a register to 0000?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
What is maximum displacement?
what is need of start 0? In steed of
what is need of START 0?. In steed of '0' can we use any other numerics?. if we use what will happen?.
What is the use of trt instruction?
Explain the difference between various read and find statement?
How to pass the parameters from jcl to assembler program?
how to produce SOC7 abend
Write the fetch cycle and execute cycle for following instructions:JMPNZ (jump to the given address if the accumulator not equal to zero) RET(return from a subroutine) ADB (add the contents of register B to the accumulator and save result in the accumulator).
explain about maximum displacement and how to cross this limit?
change process tool( code changes from dev to prd) The changes made to your code should be effected in live. how the process takes place. that is how can you move the code changes from development to production.
Is it possible to access some memory location (Ex: VAR1 DS P) without using Base Displacement?
How we can Pass the parameters from JCL to assembler Pgm?