Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Assembly instruction 'sr'(Assembly instruction 'sr')
Assembly instruction 'sr' [message #1832834] Fri, 25 September 2020 20:28 Go to next message
Eclipse UserFriend
When I execute the following a carry is produced (It should)

sld %r0, 22
sr %r0, 1
sr %r0, 1

but the following dos not produce a carry

sld %r0, 22
sr %r0, 2

WHY?
Re: Assembly instruction 'sr' [message #1832846 is a reply to message #1832834] Sat, 26 September 2020 14:15 Go to previous messageGo to next message
Eclipse UserFriend
This is a bit off-topic for Eclipse C Development Toolkit.

Anyway, it would be a bit better to answer if you told which processor.

If I were you, I'd get the programming manual for the processor and look the instructions up. In many architectures, there is a difference between single bit and multiple bit shifts.
Re: Assembly instruction 'sr' [message #1832850 is a reply to message #1832846] Sat, 26 September 2020 16:53 Go to previous message
Eclipse UserFriend
No Message Body
Previous Topic:How to integrate a new toolchain to IDE
Next Topic:Edit source lookup path options are not working
Goto Forum:
  


Current Time: Thu Jul 10 05:40:40 EDT 2025

Powered by FUDForum. Page generated in 0.07340 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top