View previous topic :: View next topic
|
Author |
Message |
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
Can anybody explain the result of this instruction -
NI NOSEP+1,X'0F'
Where NOSEP is a label
NOSEP B SKIP1
LA R8,2
ALIGN1 CLI HALIGN,X'FF'
BER R7 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
it turns a branch into a noop
the branch instruction should be x'47xrbddd'
Code: |
47 - opcode
x - condition code
r - index register
b - base register
ddd - offset |
doing a x'0f' ni on the second byte will turn the x to a 0
usually is a trick ( now frowned upon ) to take a branch the first time and the fall thru the other times |
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
That helps.Thanks. |
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
Oh I got a little confused, please help-
B EXITLP1
EXITLP2 NI MATCH00X+1,0 (this will branch or not and to which subroutine)
BR R7 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
MATCH00X is the branch instruction being modified
if You do not post it we cannot tell
please use the code tag, it will make coding more readable |
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
These are the two labels/subroutines -
Code: |
MATCH00X B PWRRETN
PWRRETN L R7,SV7A
BR R7 RETURN |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the logic is the same as before,
the first time the branch will be taken, the second time not...
if You have problems understanding the program flow
it would be wiser to ask Your peers ( application developers ) about it or try to get the original program specificatons |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
This could open a can of worms if this code is in CICS.
In my previous life, I had to maintain code that altered instructions, without using an EX, such as inserting a length into a subsequent MVC via an STC *+5.
Don't do this....
Regards,
Bill |
|
Back to top |
|
|
|