IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

NI Instruction on LABEL?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 21, 2008 1:30 pm
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 21, 2008 2:37 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 21, 2008 3:31 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Mon Jul 21, 2008 3:38 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Assembler - Packed Decimals - PACK in... PL/I & Assembler 3
No new posts Using L' to get length of instruction PL/I & Assembler 1
No new posts LA instruction in assembler PL/I & Assembler 4
No new posts The Test under Mask (TM) Instruction PL/I & Assembler 7
No new posts Control-M restart instruction CA Products 2
Search our Forums:

Back to Top