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

Difference between SLA and SLL


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

New User


Joined: 02 Jun 2006
Posts: 28

PostPosted: Thu May 20, 2010 4:43 pm
Reply with quote

Hi,

Can anyone please let me know the answers to the following questions?

1) what is the difference between SLA and SLL instruction? I read about them and they majorly seem to be doing the same job.

2) Will the instruction SLL Rx,31 and SRL Rx,31 make the register value Rx to be zero, if yes how?

Thanks,
Alok Agarwal
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu May 20, 2010 6:03 pm
Reply with quote

SLA operates on 31bits of a 32bit signed number whereas SLL operates on all 32bitsof a register

Assuming Rx contains b'00000000 00000000 00000000 00000001',
Code:
    SLL   Rx,31
would give b'10000000 0000000 0000000 00000000' after which
Code:
    SRL  Rx,31
should give b'00000000 00000000 00000000 00000001'

Code:
    SLL Rx,32
    SRL Rx,32
would give zero. You need to shift-out all the bits in the SLL.

It wold be easier to
Code:
   SR  Rx,Rx
or
Code:
   LA Rx,0   


Garry.
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
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
No new posts Difference between VALIDPROC and CHEC... DB2 3
No new posts Difference between CEE3250C and CEE3204S COBOL Programming 2
Search our Forums:

Back to Top