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,fcaba0762321938d,start X-Google-Attributes: gid103376,public From: "Dmitriy Anisimkov" Subject: Re: Help ADA and Assembly !!! :-( Date: 1998/01/05 Message-ID: <01bd19f6$18026020$LocalHost@---->#1/1 X-Deja-AN: 313023156 Content-Transfer-Encoding: 7bit References: <68omkm$orf$1@news2.isdnet.net> Content-Type: text/plain; charset=KOI8-R Organization: Complex Computer Systems Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-01-05T00:00:00+00:00 List-Id: Hello. > Exemple is a test of pragma import that must be works with calcul.obj but > doesn't. It says udefinied reference to "calcul" ??? Gnat don't understand the *.obj files, but you can write in GNU assembler. GCC compile assembler files *.s and make *.o files. Also you can get assembler source from ADA source by -S compiler option. gcc -S -O2 essaicalc.adb try -O1 without optimization -O2 optimization -O3 strong optimization from ---------essaicalc.ads package essaicalc is Procedure essaicalcul (n1,n2:integer; r1,r2 : out integer); end essaicalc; ---------essaicalc.adb package body essaicalc is Procedure essaicalcul (n1,n2:integer; r1,r2 : out integer) is begin r1 := n1+n2; r2 := n1*n2; end; end essaicalc; I have get assembler code, this is a main fragment : _essaicalc__essaicalcul: .stabn 68,0,2,LM1-_essaicalc__essaicalcul LM1: LBB2: LBE2: pushl %ebp movl %esp,%ebp pushl %ebx movl 8(%ebp),%ebx movl 12(%ebp),%eax movl 16(%ebp),%edx .stabn 68,0,5,LM2-_essaicalc__essaicalcul LM2: movl %eax,%ecx addl %edx,%eax imull %edx,%ecx movl %eax,(%ebx) movl %ecx,4(%ebx) movl %ebx,%eax movl -4(%ebp),%ebx movl %ebp,%esp popl %ebp ret $4 I'm using Gnat 3.10 for Win32. I think you can get same results in GNAT for MSDOS. IMHO Gnat for MSDOS is 32bit compiler, not 16 : > MOV AX,[BP+6] > ADD AX,[BP+8] Best regards, Dimitri Anisimkov.