Re: Direction of Stack Growth
- From: karthikbalaguru <karthikbalaguru79@xxxxxxxxx>
- Date: Mon, 22 Oct 2007 23:31:07 -0700
On Oct 23, 11:25 am, karthikbalaguru <karthikbalagur...@xxxxxxxxx>
wrote:
On Oct 23, 11:33 am, glen herrmannsfeldt <g...@xxxxxxxxxxxxxxxx>
wrote:
Archi wrote:
(I wrote)
Many systems now access arguments as positive index offsorry, no way with hardware stack pointer. Do not forget that there are
the stack pointer, and local variables as negative
index off the stack pointer. (or frame pointer.)
uncontrollable events like interrupts, so stack should be completely
"down" all the time - there is no need for negative indexes. If you use
frame pointer - then yes? but you pay wit extra register and "entry" code.
Most now have a separate stack for interrupts and other system
functions, pretty much needed for any protected mode system.
I do remember from the 8080 days someone working on the
design of a terminal. It was found that the fastest way to
clear the screen memory was to point the stack pointer at
one end of the buffer and push blanks. Mysterious characters
kept appearing on the screen, though, which turned out to be
due to interrupts during the clear loop.
-- glen
Check this out.http://kstruct.com/2007/04/16/interview-questions-stack-direction/
Interesting :)
1) The author claims as below in that link -
"Wikipedia tells me that most modern OSes grow the stack down which
is odd given the security advantages of doing it up."
Is that true or some kind of wrong information in internet ?
2) But i liked the 'C' program that helps in finding the direction of
stack growth.
3) I also like the shell script mentioned in the link ->http://www.splode.com/~friedman/software/scripts/src/stack-direction
Thx in advans,
Karthik Balaguru- Hide quoted text -
- Show quoted text -
I posted that from my query regarding 'Direction of Stack Growth'
posted in other groups.
I saw that i missed comp.os.linux.embedded and hence posted it here.
Kindly share your ideas in the following link :
http://groups.google.co.in/group/comp.arch.embedded/browse_thread/thread/001243efba95ebc0/?hl=en#
Thx,
Karthik Balaguru
.
- Prev by Date: writing a linker script
- Next by Date: Re: Direction of Stack Growth
- Previous by thread: writing a linker script
- Next by thread: Re: Direction of Stack Growth
- Index(es):
Relevant Pages
|