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
 

 

Differences between BAL,BAS,BASSM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
ganasrinivasan

New User


Joined: 06 Nov 2006
Posts: 23
Location: Montreal

PostPosted: Fri Nov 10, 2006 5:13 pm    Post subject: Differences between BAL,BAS,BASSM
Reply with quote

Can any one explain me the exact differences between BAL,BASSM,BAS?
Back to top
View user's profile Send private message

kalpana

New User


Joined: 19 Nov 2004
Posts: 24
Location: Banglore

PostPosted: Tue Nov 14, 2006 12:10 pm    Post subject: Re: Differences between BAL,BAS,BASSM
Reply with quote

BAL stands for Branch and link

IF you give BAL 12,Rout means

First operand specified the address of NSI( Next sequential instruction will be loaded into 12 register and the second operand specifies that Rout -> it will branch to Rout

BALR 12,0

Here both operands are registers. Here the second operand is 0. it specifies no branching will takes place.

BAS stands for Branch and save


Unconditional branching and the possibility of returning to the branch point is performed by BAS.
The address of the next sequential instruction (NSI) is placed in the 1st-operand register. Subsequently a branch is made to the location given by a 2nd-operand label.
The instruction(s) is commonly used to branch to a subroutine with an expected return. Now to return, the help of the unconditional BR (Branch Register) instruction is needed (see the BC instruction).


BASSM

BASSm stands for Branch and save set mode
Back to top
View user's profile Send private message
vigneshs

New User


Joined: 07 Nov 2006
Posts: 1

PostPosted: Wed Nov 15, 2006 4:42 pm    Post subject: Re: Differences between BAL,BAS,BASSM
Reply with quote

The exact differences of BAL, BAS and BASSM are explained below:

BAL is used in 24bit operating system and maintained in 32 bit also to maintain compatibility.

BAL stores the return address(24 bits) and the linkage information (Condition code, program mask and ICL (cond code length))

In 32 bit environment BAL is similar to BAS.

BAS - Branch and Save instruction stores the right half of the PSW (i.e., The return address). It does not set the addressing mode bit.
It is used when there is no change in the addressing mode.

In 32 bit environment usage of BAS is preferred than BAL.

BASSM - Branch and save set mode

It stores the right half of the PSW in the target register and sets the addressing mode in the higher order bit.

This is the basic info I have it.
If anybody have some more info plz append to this info.
Back to top
View user's profile Send private message
Shruthi Raghavan

New User


Joined: 17 Jan 2007
Posts: 9
Location: India

PostPosted: Tue Jan 23, 2007 4:00 pm    Post subject: Re: Differences between BAL,BAS,BASSM
Reply with quote

I dont think that the BAL and BAS instructiuons has anything to do with the 24 or 31-bit addressing mode.
In both addressing mode either of the instructions can be used unlike what vighneshs says.
The pimary function of BAL and BAS instructions is to brach to the address specified by the 2nd operand but feore branching the addresss of the next sequentioal instruction will be saved in the 1st operand register.

when BAL is used in 24-bit addressing mode, the address of NSI(Next Sequential Instruction) is saved in the first operand register
and consists of
The instruction length code (ILC) in bits 0-1,
The condition code (CC) in bits 2-3,
The program mask in bits 4-7, and
The linkage address in bits 8-32.

In 31-bit mode, a 31-bit linkage address
is loaded and bit 0 is set to 1.

The difference in the two instructions is as follows:
The BAS instruiction doesnot save the ILC, CC and program mask in the 1-7 bits hence the BAS executes faster than the BAL.
For the same reason, BAS is used to branch to programs in the same addressing mode as the caller.
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 Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts Differences between z/VM REXX and TSO... kalyan.v CLIST & REXX 4 Sun Oct 12, 2014 1:58 pm
No new posts Display differences between current a... Bill Woodger DFSORT/ICETOOL 6 Mon Sep 01, 2014 8:24 pm
No new posts Plan table differences - trying to im... Daniel Prosser DB2 5 Fri Dec 02, 2011 7:12 pm
No new posts Calling module using BASSM vijay korde PL/I & Assembler 8 Tue May 25, 2010 3:48 pm


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