Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!dayton!joe From: joe@dayton.UUCP Newsgroups: comp.os.minix Subject: Re: Minix and compiler models Message-ID: <384@dayton.UUCP> Date: Fri, 6-Feb-87 10:01:28 EST Article-I.D.: dayton.384 Posted: Fri Feb 6 10:01:28 1987 Date-Received: Sun, 8-Feb-87 01:17:07 EST References: <383@dayton.UUCP> <13647@ti-csl.CSNET> Reply-To: joe@dayton.UUCP (Joseph P. Larson) Organization: Dayton-Hudson Dept. Store Co. Lines: 24 In article <13647@ti-csl.CSNET> herman@ti-csl.CSNET (Herman Schuurman) writes: >in article <383@dayton.UUCP>, joe@dayton.UUCP (Joseph P. Larson) says: >> 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?") > >Sorry, but stacks in general grow downwards in memory. Just look at the >description of the PUSH and POP instructions on various processors. They >usually pre-decrement the stack pointer on PUSH, and post-increment on POP. Giggle. *THINK* about it. If you are PUSHing something and you pre-decrement the stack pointer, it is going to point UPWARDS in memory. Using Macro-11: movl arg, -(SP) ; push movl (SP)+, arg ; pop Pre-decrement of SP for a push makes the stack grow up... -- UUCP: rutgers!dayton!joe Dayton Hudson Department Store Company ATT : (612) 375-3537 Joe Larson/MIS 1060 (standard disclaimer...) 700 on the Mall Mpls, Mn. 55408