Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
NI Instruction on LABEL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER
Author Message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 81
Location: Mumbai

PostPosted: Mon Jul 21, 2008 12:40 pm    Post subject: NI Instruction on LABEL?
Reply with quote

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
View user's profile Send private message
References
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3273
Location: italy

PostPosted: Mon Jul 21, 2008 1:30 pm    Post subject: Reply to: NI Instruction on LABEL?
Reply with quote

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
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 81
Location: Mumbai

PostPosted: Mon Jul 21, 2008 1:33 pm    Post subject:
Reply with quote

That helps.Thanks.
Back to top
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 81
Location: Mumbai

PostPosted: Mon Jul 21, 2008 2:28 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3273
Location: italy

PostPosted: Mon Jul 21, 2008 2:37 pm    Post subject: Reply to: NI Instruction on LABEL?
Reply with quote

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
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 81
Location: Mumbai

PostPosted: Mon Jul 21, 2008 3:22 pm    Post subject:
Reply with quote

These are the two labels/subroutines -


Code:
MATCH00X B     PWRRETN


PWRRETN  L     R7,SV7A               
         BR    R7             RETURN
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3273
Location: italy

PostPosted: Mon Jul 21, 2008 3:31 pm    Post subject: Reply to: NI Instruction on LABEL?
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

Senior Member


Joined: 14 Jan 2008
Posts: 368
Location: Orlando, FL, USA

PostPosted: Mon Jul 21, 2008 3:38 pm    Post subject: Re: Post subject: NI Instruction on LABEL?
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER All times are GMT + 6 Hours
Page 1 of 1