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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:30:05+00:00 2026-06-06T23:30:05+00:00

how in c++ visual can i set labels for when i need to use

  • 0

how in c++ visual can i set labels for when i need to use inline assembly, so it would look like something like this for example…

__asm
{
    PUSH EAX
    PUSH VAR1
    MOV ECX,DWORD PTR DS:[VAR2]
    CALL DWORD PTR DS:[VAR3]
    JMP VAR4
}

where the VAR varables link to a value or address?

i have tried the following

DWORD   VAR2 = 0x991770;    //0x991770 is the location of the function

__asm
{
    ..code
    MOV ECX,DWORD PTR DS:[VAR2]
    ..code
}

but then the app crashes, how is this done?

  • 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-06T23:30:06+00:00Added an answer on June 6, 2026 at 11:30 pm

    Use offset variableName to access variables from inline assembly. See reference here.

    Example:

    char format[] = "%s %s\n";
    char hello[] = "Hello";
    char world[] = "world";
    int main( void )
    {
       __asm
       {
          mov  eax, offset world
          push eax
          mov  eax, offset hello
          push eax
          mov  eax, offset format
          push eax
          call printf
          //clean up the stack so that main can exit cleanly
          //use the unused register ebx to do the cleanup
          pop  ebx
          pop  ebx
          pop  ebx
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To customize the visual look of a UISlider you can set the thumb and
In Visual Studio 2008 project properties, Application tab, I can set the Output type
In Visual Studio I can navigate backwards by pressing Ctrl + - . This
In Visual Studio with Resharper I can set the project to background build as
In Visual Studio (2005/2008) we can set a conditional breackpoint when the condition is
There is some way that I can set IE10 as default browser in visual
Visual Studio 2008, ASP.NET . Can you set a JavaScript breakpoint in a UserControl
When writing c#, in Visual Studio, you can set regions to group code accordingly.
In every Visual Studio.NET version you can set keyboard shortcuts using menu Tools ->
Can Visual Studio 2008 be configured to give me a warning when I forget

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.