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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:31:16+00:00 2026-05-13T19:31:16+00:00

Well first I understand (or a I think that I understand) the problems of

  • 0

Well first I understand (or a I think that I understand) the problems of misaligned stack.

But I know (like a definition) that pushing a 16bit value to 32bit wide stack could cause a stack misaligned.

But the thing I dont understand, is how this could happend…since PUSH and POP check the D flag at the segment descriptor (so is 1 increments/decrements 32bits and is 0 16bits).

Suppose that D flag=1, should PUSH AX do a 32bits decrement? so its like I “miss” 16bits in the stack?

I am not sure that I understand this problem

  • 1 1 Answer
  • 3 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-13T19:31:17+00:00Added an answer on May 13, 2026 at 7:31 pm

    While both push and pop check the D-bit in the segment descriptor to determine the default operand size (i.e. 16 or 32/64 bits), it can be overridden with an operand size override 0x66.

    If the D-bit is 0, then:

    ff /6 
    

    pushes 16 bits onto the stack

    and

    66 ff /6 
    

    pushes 32 bits (or 64 if it’s a 64-bit segment).

    If the D-bit is 1, then the opposite is true.

    In any case, ESP (or RSP or just SP, depending on the address size) is incremented or decremented by 2 (for 16 bit operations), 4 (for 32 bit operations) or 8 (for 64 bit operations).

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

Sidebar

Related Questions

A friend of mine claims that calls to Debug.Print() as well as first-chance exception
I think I understand well enough what the BindingSource class does - i.e. provide
First of all I just want to say that I never understood so well
First, I can't speak ENGLISH very well.. please understand :) When I try to
Good morning, I have an application that run well on iPhone but crash to
Well, first of all sorry about this question it must be pretty straight forward
well this is my problem i use 2 source first query (select * from
Well, I've started with iPod/iPhone programming using Head First iPhone Development (O'reilly) and I'm
I built my first site with jQuery and overall it turned out quite well
This is my first experience with javascript, and... Well... Ugh. Here's what's happening: function

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.