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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:09:27+00:00 2026-05-26T20:09:27+00:00

Portion of a for loop ; ……. jmp SHORT $LN3@clearArray ; enter the loop

  • 0

Portion of a for loop

    ; .......

    jmp SHORT $LN3@clearArray                ; enter the loop body

$LN2@clearArray:                                 ; incrementation
    mov eax, DWORD PTR _p$2534[ebp]          
    add eax, 4
    mov DWORD PTR _p$2534[ebp], eax

$LN3@clearArray:
    mov eax, DWORD PTR _p$2534[ebp]          ; check conditions
    cmp eax, DWORD PTR _length$[ebp]
    jae SHORT $LN4@clearArray                ; when loop condition fails...

; 6    :    {
; 7    :        *p = 0;

    mov eax, DWORD PTR _p$2534[ebp]          ; loop body
    mov DWORD PTR [eax], 0

; 8    :    }

    jmp SHORT $LN2@clearArray

$LN4@clearArray:

; ........

When $LN2 is completed, how does it return back to $LN3?
This is generated by Visual Studio 2010 C++ assembler output.

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-26T20:09:28+00:00Added an answer on May 26, 2026 at 8:09 pm

    A jmp instruction acts like a goto statement. It transfers control to a new location and execution continues at that point; you don’t return from a jmp (though you could issue another jmp).

    In this particular example, the code at $LN2 falls through to $LN3, so every time $LN2 executes, $LN3 will execute. The code at $LN3 is comparing the loop counter to see if it has reached the maximum value. The cmp (“compare”) and jae (“jump above or equal”) instructions perform the comparison, and then exit the loop if the condition has been met (i.e., counter is equal to or greater than length). In other words, if your loop counter < length, then jae does nothing and falls through to the next instruction. However, if counter >= length, then you jump to $LN4 which exits the loop.

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

Sidebar

Related Questions

A portion of our research group's program has auxiliary functionality provided by ctemplate library.
I have a portion of a bash script that is getting a filename without
How to extract time portion from a Date-object and use it as a String
Here is a portion of my app.yaml file: handlers: - url: /remote_api script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
Here is a portion of my code: var styles:String = .keyword{color: #ff0000;} .comment{color: #00ff00;};
actually i refactor some portion of code. what i want to do is to
A very small portion of our codebase is some legacy Java code. I'm trying
I’m looking at rewriting a portion of our application in C# (currently legacy VB6
Writing the code for the user authentication portion of a web site (including account
I'd like to reserve a portion of the screen so that maximized windows don't

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.