Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Difference between SLA and SLL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Difference between SLA and SLL
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

Active Member


Joined: 08 May 2006
Posts: 998
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu May 20, 2010 6:03 pm    Post subject:
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    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 Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us