Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
View previous topic :: :: View next topic  
Author Message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
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: 144
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: 144
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: 10232
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: 144
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: 10232
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

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, 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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Locate a label set by anothet macro swathykrishnan TSO/ISPF 4 Thu Sep 03, 2015 12:32 pm
No new posts Interpret instruction not working in ... spoorni CLIST & REXX 2 Fri Feb 07, 2014 10:22 pm
No new posts Trying to assign a variable input a n... HammerTime DFSORT/ICETOOL 5 Fri Feb 07, 2014 1:47 am
No new posts Displaying the value set by the EXIT ... Ricardo Viegas CLIST & REXX 12 Tue Dec 03, 2013 5:17 am
No new posts Edit MACRO- Insert a Label sudheesh s TSO/ISPF 9 Thu Nov 14, 2013 1:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us