flat assembler
Message board for the users of flat assembler.

Index > Main > Stack in Pmode

Author
Thread Post new topic Reply to topic
othername



Joined: 08 Apr 2005
Posts: 26
Location: Lithuania
othername
Is it true that stack grows up from base+limit (in descriptor)
and ALWAYS have a size 0xFFFF (if flag B=0) or 0xFFFFFFFF (if flag B=1)[/b][/i]

_________________
Sorry for my bad English Sad
Post 08 Apr 2005, 19:18
View user's profile Send private message Reply with quote
bubach



Joined: 17 Sep 2004
Posts: 341
Location: Trollhättan, Sweden
bubach
the stack grows down... and it can be set to whatever you want.
Post 08 Apr 2005, 22:12
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen
You can also see limit 0xFFFF with B=1 under win9x or winme. It means (in theory) that the stack can grow down between maximal offset and limit (0xFFFFFFFF -> 0xFFFF)
Post 09 Apr 2005, 07:05
View user's profile Send private message Visit poster's website Reply with quote
othername



Joined: 08 Apr 2005
Posts: 26
Location: Lithuania
othername
then if b=0 it is BASE+LIMIT -----[stack gr. down]-------> BASE
if b=1 it is BASE+0xFFFFFFFF -----[stack gr. down] ----> 0xFFFFFFFF-LIMIT

?

_________________
Sorry for my bad English Sad
Post 09 Apr 2005, 08:59
View user's profile Send private message Reply with quote
othername



Joined: 08 Apr 2005
Posts: 26
Location: Lithuania
othername
oh, my mistake:

if b=1 it is BASE+0xFFFFFFFF -----[stack gr. down] -----> BASE+0xFFFFFFFF-LIMIT
?
Post 09 Apr 2005, 09:01
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen
Well, bit B (Big) has meaning only when ED=1. ED=1 (Expand Down) means you can access the area between maximal offset (0xFFFF if B=0, 0xFFFFFFFF if B=1) and limit, ED=0 means you can access area between 0x0 and limit.

So if ED=1 and B=1 then the stack grows down between BASE+0xFFFFFFFF -> BASE+limit.

For instance, under my winme is it between BASE+0xFFFFFFFF -> 0xFFFF. The area between 0x0 and 0xFFFF is forbidden probably because of trapping NULL-pointers.
Post 09 Apr 2005, 18:47
View user's profile Send private message Visit poster's website Reply with quote
othername



Joined: 08 Apr 2005
Posts: 26
Location: Lithuania
othername
which bit is DE?
can look here:
http://www.wasm.ru/article.php?article=pipm02

_________________
Sorry for my bad English Sad
Post 09 Apr 2005, 19:38
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen
I don't know russian. On the picture is only segment descriptor in general, you can't see access right there.
The access rights are 8 bits, starting with bit 8 in high dword of segment descriptor. The format of the access rights vary between data, code and system decriptor. The bit ED is bit 2 in data segment access rights field.
You better read the Intel system programming manual.
Post 09 Apr 2005, 20:44
View user's profile Send private message Visit poster's website Reply with quote
othername



Joined: 08 Apr 2005
Posts: 26
Location: Lithuania
othername
thank you anyway

_________________
Sorry for my bad English Sad
Post 09 Apr 2005, 20:51
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.