Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9032287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:56:42+00:00 2026-06-16T07:56:42+00:00

I am writing code using nasm in x86 assembly. I would like to be

  • 0

I am writing code using nasm in x86 assembly. I would like to be able to do this(in EAX is number of rotations, or under [EBP + 12]):

ror ESI, EAX ;count- register
ror ESI, DWORD [EBP + 12] ;count- memory

but it is impossible. ror only accept immediate constants like

ror ESI, 4  ; four right rotations

I don’t like to do loop:

loop:  
ror ESI, 1
sub EAX, 1
cmp EAX, 0
jg loop

Probably there is a better solution of this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:56:44+00:00Added an answer on June 16, 2026 at 7:56 am

    I have found that ROR only works with CL register, for example:

    ror ESI, CL
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing code and until now I was using structures like this: struct s{
I am writing my first OS boot sector in assembly using NASM. I have
I'm writing some code using a simple clone pattern, I'd like it if I
I'm writing a piece of assembly code designed to get keyboard input using a
I am a beginner and writing code to display data in a Gridview using
I'm using c#. In many cases I'm writing code that can benefit from a
When writing C++ code I've learned that using the stack to store memory is
I am writing some code to type strings using the Robot class. Everything is
I am writing Python code in Visual Studio 2010 using the excellent Python Tools
I am writing host code for a CUDA program, so I am stuck using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.