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 7431285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:16:19+00:00 2026-05-29T09:16:19+00:00

I am trying to analyse the following code in assembly. sub $48, %esp mov

  • 0

I am trying to analyse the following code in assembly.

sub $48, %esp
mov $56, 44(%esp)
mov $3, 40(%esp)
mov $0, 36(%esp)
mov 44(%esp), %eax
mov %eax, 32(%esp)
jmp .L2
.L3:
mov 32(%esp), %eax
sub 40(%esp), %eax
mov %eax, 32(%esp)
add $1, 36(%esp)
.L2:
mov 32(%esp), %eax
cmp 40(%esp), %eax
ja .L3
mov 36(%esp),%eax
mov 32(%esp),%edx

If my understanding is clear, the first 6 lines are called normally, and then the program jumps to .L2: and executes the code. If R[eax] == R[40 + R[esp], then the code will go to .L3.

My question is about what happens after this. Is .L3 executed and then the code goes to .L2 because it is right after it, or does it automatically jumps to the last two lines after executing .L3?

Additionally, I could use some tips about reading assembly code; I am trying to find the final values of eax and edx.

Thank you

  • 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-05-29T09:16:20+00:00Added an answer on May 29, 2026 at 9:16 am

    You are correct: after jumping to .L3, all 6 instructions between there and ja .L3 will be executed in order, and that process will repeat itself until the conditional jump isn’t taken.

    Sounds like you’re doing fine reading the code 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to analyse some code here that's been designed using an MVP Approach.
I'm trying to use the following code to run a PL/SQL statement on my
I am trying to analyse the IIS log and would like to look at
I'm running python2.5 and trying to use the astLib library to analyse WCS information
I'm trying to analyze core dump, but i get following result. If i make
Thanks to the help in a previous question , I've got the following code
I am trying to write a program to check that some C source code
I am trying to analyse a site using Jmeter. My plan includes a HTTPS
I am trying to analyse an mp4 video and convert it's video content into
I'm trying to analyse a query execution plan in my Oracle database. I have

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.