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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:07:46+00:00 2026-05-15T20:07:46+00:00

Alright so I have this line in my assembly MOV EAX, DWORD PTR DS:[ESI]

  • 0

Alright so I have this line in my assembly

MOV EAX, DWORD PTR DS:[ESI]

where ESI is 00402050 (ascii, “123456789012”)

After this instruction: EAX = 34333231

What really happened here? How is this value calculated, and why?
Where could I get some good reference on this kind of thing?

  • 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-15T20:07:47+00:00Added an answer on May 15, 2026 at 8:07 pm

    Registers in square brackets such as [ESI] are dereferenced pointers. The instruction you quote moves the DWORD (a 32-bit/4-byte value) in memory location specified by ESI into register EAX. In your case, memory location 00402050, read as a DWORD, contains 34333231.

    Written in pseudo-C:

    DWORD EAX;   /* Declaring the registers as we find them in silico */
    DWORD ESI;
    
    ESI = 0x00402050;  /* Set up your initial conditions for ESI */
    EAX = *((DWORD *)ESI);   /* mov EAX, DWORD PTR [ESI] */
    /*  ^ ^  ^^^^^^^    */
    /*  | |     |       */
    /*  | |     +-----------  From "DWORD PTR" we get "DWORD *" in C.          */
    /*  | |             */ 
    /*  | +-----------------  The C dereferencing operator * replaces [].      */
    /*  |               */ 
    /*  +-------------------  The C assignment operator = replaces mov opcode. */ 
    

    In your case, it is not true that 0x00402050 “equals” the string "1234567890" — rather it points to the memory which contains that string.

    The value which you obtain, 0x34333231 is comprised from the ASCII values for the digits "1234", which are the first four bytes (i.e., the first DWORD) of the string. They appear in reversed order because the Intel architecture is “little endian” in the byte representation of a DWORD in memory.

    In your example at this time, the mov instruction is loading ASCII characters as if they were the four bytes of an unsigned long value, when they are actually a string of single-byte characters.

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

Sidebar

Related Questions

Alright, so I have this collision detection code, and I'm trying to push the
Alright, I have this program to sparse code in Newick Format, which extracts both
Alright, so I have a block being drawn at 0,0,0 and I have this
Alright so I have no idea how to even begin doing this But basically
Alright this is my first day with JQuery so have fun with these functions
Alright I know this is more than likely a amateur question but I have
Alright, this one's interesting. I have a solution, but I don't like it. The
Alright, this is melting my brain. It might have something to do with the
Alright, this problem is a little complicated, so bear with me. I have a
Alright. Now this question may come to you weird but i have to solve

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.