Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Assembly help

Assembly help

Scheduled Pinned Locked Moved IT & Infrastructure
helpquestiondata-structureslearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sirrius
    wrote on last edited by
    #1

    I am taking a course in Assembly right now and would like to understand an issue a little better that deals with the stack. Question: If register ESP contains the decimal value 12345 and the a "PUSH AX" instruction is executed, what value will be left in register ESP? a. 12341 b. 12343 c. 12347 d. 12349 My pick is c. Am I correct in thinkin that the decimal number 12345 is just an address of where the ESP is located on the stack segment and when "PUSH AX" is executed it pushes the ESP down a byte so that it will read 12343? I'm not sure if I'm getting the whole picture or not. Thanks.

    M 1 Reply Last reply
    0
    • S Sirrius

      I am taking a course in Assembly right now and would like to understand an issue a little better that deals with the stack. Question: If register ESP contains the decimal value 12345 and the a "PUSH AX" instruction is executed, what value will be left in register ESP? a. 12341 b. 12343 c. 12347 d. 12349 My pick is c. Am I correct in thinkin that the decimal number 12345 is just an address of where the ESP is located on the stack segment and when "PUSH AX" is executed it pushes the ESP down a byte so that it will read 12343? I'm not sure if I'm getting the whole picture or not. Thanks.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      12343. ESP holds the address of the byte currently at the top of the stack. When you PUSH AX, that puts 2 bytes on the stack, so ESP is moved two bytes. Since the stack grows from higher addresses downwards, you subtract 2 from ESP, giving 12343. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups