From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ae395e5c11de7bc9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!k4g2000prb.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: segfault with large-ish array with GNAT Date: Fri, 19 Mar 2010 14:50:20 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1269035420 21743 127.0.0.1 (19 Mar 2010 21:50:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 19 Mar 2010 21:50:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k4g2000prb.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:10646 Date: 2010-03-19T14:50:20-07:00 List-Id: On Mar 19, 11:02=A0am, Simon Wright wrote: > tmo...@acm.org writes: > > IIRC, the Burroughs 6500 had what they called a "cactus stack" where > > branching would occur for new threads. =A0And there was a Texas Instrum= ents > > microprocessor that had no real stack, but rather a set of registers > > that could be saved to RAM on a subroutine call. > > These preceded DOS. > > The PDP-8 worked like that; the JMS instruction stored the return > address in the first word of the subroutine, execution started at the > next word. > > =A0 =A0JMS FOO =A0 =A0/ CALL SUBROUTINE FOO > > =A0 =A0FOO, +0 =A0 =A0/ STORED RETURN ADDRESS > =A0 =A0... > =A0 =A0JMP I FOO =A0/ RETURN > > (we only had capitals) > > --S Isn't that approximately how all computers used to work? Or at least a lot of them? When I was first learning how computers ran, it seemed like the common thing was for jump instructions to save the address of the next instruction in a register, and then the subroutine code would store the register somewhere---perhaps in the location containing the return jump, since I don't remember those computers having "indirect jump" instructions either. It was a few years before I encountered a machine that automatically saved return addresses on a stack---or even had a concept of a stack built into it. One thing I remember was a particular computer's implementation of COBOL (Honeywell 200/2000 series---my dad used to work for Honeywell so those were some of the computers I was most familiar with). COBOL used PERFORM statements for subroutine calls, and since you could have PERFORM A in one part of the program and PERFORM A THROUGH B in another part, or you could just fall into A without a PERFORM, the paragraph A couldn't tell whether it was supposed to return to the caller at the end of the paragraph. So the code, before it did a PERFORM A, would do a "move" to move a branch instruction into a location at the end of A that would branch back to the caller. Then, after it returned, it would do another "move" to move a no-op to that location. Of course, none of these were good with recursion but I don't think the experts understood the importance of recursion back then. -- Adam