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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c30642befcd7bf85 X-Google-Attributes: gid103376,public From: Ken Garlington Subject: Re: New GNAT ports (was Re: Ada and Automotive Industry) Date: 1997/01/08 Message-ID: <32D3FEEC.42CC@lmtas.lmco.com>#1/1 X-Deja-AN: 208632885 references: <5asvku$jtu$1@goanna.cs.rmit.edu.au> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.01 (Win95; U) Date: 1997-01-08T00:00:00+00:00 List-Id: Robert Dewar wrote: > > Richard suggests: > > [%] The pragma is > pragma Origin(non-negative constant integer expression); > saying that the first byte of the textually following statement > is to be at the given address. That was the only thing I saw in > the 8051 book I was reading that I couldn't do in a reasonable > Ada subset. > > Well if we added this pragma, it is clear the argument should be of > type address, but in any case the pragma is redundant. The proper > diction is: > > for label'address use expression > > and then you simply label the statement > > It actually makes more conceptual sense to me to put a subprogram > at a particular address, rather than a statement, in which case you > can use > > for subprogram'address use expression > > which is more familiar (and more likely to be supported out of the box, > although GNAT suports neither diction currently). I think you would also want to be able to control the placement of code, and literal sections of a subprogram (and, for packages, static data) indepedently, but that's easily done via linker commands in many systems. -- LMTAS - The Fighter Enterprise - "Our Brand Means Quality" For job listings, other info: http://www.lmtas.com or http://www.lmco.com