Re: the stack



"Rod Pemberton" <do_not_have@xxxxxxxxxxxxx> writes:
<bob@xxxxxxxxxxxxxx> wrote in message
news:f45b4608-fafa-4fd3-b73d-d34d84e4287d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I was just wondering why the stack grows downwards on x86 processors.


The short answer: it was designed that way.

The 8086 was compatible with the 8080. Stanley Mazor of the 8080 design
team designed the 8080 stack that way:

"Deleting the on-chip stack saved chip area, but was a net advantage to the
user -now the stack had unlimited size. I defined the stack as growing
downward from the high end of memory; this facilitated indexing into the
stack and simplified displaying the stack. This was abandoned on the 8086."
http://www.xnumber.com/xnumber/Microcomputer_invention.htm

By "abandoned ...," I think he means the stack was put back on-chip for the
8086.

Or does he mean that it being stuck at the high end of memory
was abandoned, as it could now reside in arbitrary locations?

Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
.



Relevant Pages

  • Re: Forth and OO design?
    ... cell circular data stack ... return stack index register ... No, that is not design. ... language which became the bastardized basis of Javascript. ...
    (comp.lang.forth)
  • Re: Zero operand CPUs
    ... the stack in on-chip RAM, ... the oldest part of it to main memory, ... based on how many cells are cached in registers. ... do to simplify the design to reduce cost and power use and increase ...
    (comp.arch.embedded)
  • Re: Simple Adapter Pattern Question
    ... interface Stack. ... Remember that design patterns exist to extract the invariants of solutions to common design issues. ... It is more complicated and one needs some sort of decoupling or dynamic behavior substitution in the collaboration that depends on context within the particular problem domain. ...
    (comp.software.patterns)
  • Re: Tiny CPUs in programmable logic
    ... The B16 is a like my CPU ... My numbers were from a design done in an ACEX 1K. ... mode which was used for the main memory block while sync rams were ... computation, mostly from the return stack pointer arithmetic, IIRC. ...
    (comp.lang.forth)
  • Re: Lets put this to rest
    ... Lahman was asked to produce a CS101 stack in fair time. ... fundamentally different approach to OO software design. ... "producing a stack" is purely a design thing but you refer to doing it ... My suggestion, in that to correctly answer the original question, one ...
    (comp.object)