The MASM Forum

General => The Campus => Topic started by: g6g6 on June 24, 2014, 08:57:39 AM

Title: Doubt with the STACK
Post by: g6g6 on June 24, 2014, 08:57:39 AM
Hello. After a "push" instruction, the stack decrement 4. This "4" is  binary (4 bytes, 4 bits) ? what this represents?
Title: Re: Doubt with the STACK
Post by: dedndave on June 24, 2014, 09:13:04 AM
4 bytes
each single increment of any address is by bytes
Title: Re: Doubt with the STACK
Post by: Gunther on June 24, 2014, 09:58:51 PM
Hi g6g6,

Quote from: dedndave on June 24, 2014, 09:13:04 AM
4 bytes
each single increment of any address is by bytes

That's right. The stack is byte oriented.

Gunther
Title: Re: Doubt with the STACK
Post by: Vortex on June 25, 2014, 06:05:41 AM
Hi g6g6,

In 16-bit systems, the stack is modified by 2 bytes. In 64-bit systems, it's 8 bytes.
Title: Re: Doubt with the STACK
Post by: hutch-- on June 25, 2014, 06:12:57 AM
 :biggrin:

Even worse, x86 hardware ONLY talks in BYTE or larger. BIT data is determined by a variety of techniques like AND masking or dedicated instructions like BT and similar.