Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!gatech!gitpyr!thomps From: thomps@gitpyr.UUCP Newsgroups: comp.os.minix Subject: Re: Minix and compiler models Message-ID: <3036@gitpyr.gatech.EDU> Date: Thu, 5-Feb-87 07:31:52 EST Article-I.D.: gitpyr.3036 Posted: Thu Feb 5 07:31:52 1987 Date-Received: Sat, 7-Feb-87 11:40:01 EST References: <966@ulowell.cs.ulowell.edu> <1565@cit-vax.Caltech.Edu> <383@dayton.UUCP> Organization: Georgia Institute of Technology Lines: 25 Summary: Not so. Stacks often grow down In article <383@dayton.UUCP>, joe@dayton.UUCP (Joseph P. Larson) writes: > In article <3021@gitpyr.gatech.EDU> thomps@gitpyr.gatech.EDU (Ken Thompson) writes: > >with data starting at the bottom and growing up and the stack at the top > >and growing down (I think. I don't have the book handy as I write this) > > I always thought stacks grew up. I think (and hope!) that you've got the > two reversed! ("Where, or where have the standards gone? Where, oh where > may they be?") While it may seem counter intuitive, the computer world is full of stacks which grow down. This is the case with the 8086/8088 so that my above statement turns out to be correct. My experience has been that stacks grow in whichever direction happens to be convenient to the designer and implementer of the stack. The fact that the stacjk is inverted does not affect the paradigm at all. It is still a LIFO structure. The stack also grows downward on an Intel 8080 and Motorolla 6800, two early microcomputers so I hardly think that the direction stacks grow in memory is standardized. -- Ken Thompson Phone : (404) 894-7089 Georgia Tech Research Institute Georgia Insitute of Technology, Atlanta Georgia, 30332 ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!thomps