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

How BXLE instruction works?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Thu May 19, 2005 8:07 pm
Reply with quote

Hi,
I want to know how BXLE instruction works. Please explain with example.
Back to top
View user's profile Send private message
ajita_aju

New User


Joined: 20 May 2005
Posts: 2

PostPosted: Fri May 20, 2005 5:31 pm
Reply with quote

BXLE has three parameters.
ex. BXLE 3,4,LOOP
Basics:The first two are registers while the last one is a memory location.
The second operand is an even-odd register pair.
Defn: The instruction stands for Branch on Less than or equal to.
Explanation:
In the given example register 3 should have the contents of an address location and similarly register 5 (hidden in the even-odd register pair) will have contents of an address location. Register 4 will have a value that serves as a count for incrementing.
The contents of register 3 is incremented by the value in register 4 and the result is compared with the contents of register 5. If the result is less than or equal to the contents of register 5 a branch takes place to the location pointed by the third operand (LOOP).
A practical example is where you store the starting address of an array in register 3 and the ending address of the same array in register 5. Considering that each element of the array is of the same lenght, store the length of element in register 4.
Hope this explains.
Back to top
View user's profile Send private message
ajita_aju

New User


Joined: 20 May 2005
Posts: 2

PostPosted: Fri May 20, 2005 5:33 pm
Reply with quote

Just to add one more point, By contents of an address location, I mean the address itself.
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Fri May 20, 2005 5:45 pm
Reply with quote

Hi Aju,
Thanks a lot for your clear explanation.
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 SARBCH PRINTJOB option not Works with... CA Products 4
No new posts The Test under Mask (TM) Instruction PL/I & Assembler 7
Search our Forums:

Back to Top