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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,edb329885d962c1d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-05 14:39:16 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: Jerry van Dijk Newsgroups: comp.lang.ada Subject: Re: Ada and ASM Date: 05 Sep 2003 23:38:10 +0200 Organization: JerryWare Message-ID: References: Reply-To: somename@nospam.demon.nl User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:42194 Date: 2003-09-05T23:38:10+02:00 List-Id: Simon Wright writes: > > Volatile%20Parameter > > Asm ("movl %0, %%ebx" & LF & HT & > > "movl %%ebx, %1", > > Inputs => Unsigned_32'Asm_Input ("g", Var_In), > > Outputs => Unsigned_32'Asm_Output ("=g", Var_Out), > > Clobber => "ebx", > > Volatile => True); > > The actual Asm statement still is a quoted string. It is not Ada syntax. > > I do not understand how it could possibly "[be] Ada syntax". > > OP wanted to include an asm *routine*, I think, so perhaps what is > wanted instead is a pragma Import (Asm, ...)? (if suoported). No, you can include a ASM routine very easily this way (although, yes, one does need to actually read the documentation first :-). Note that this has three big advantages over a separately assembled function: 1) no need to use non Ada tools 2) easy access to other Ada objects 3) optimizer can help -- -- Jerry van Dijk, Leiden, Holland -- Note that email address is invalid