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,28db79a4b238c104 X-Google-Attributes: gid103376,public From: jerry@jvdsys.stuyts.nl (Jerry van Dijk) Subject: Re: What's wrong with this simple Ada w/ assembly code? Date: 1999/03/07 Message-ID: #1/1 X-Deja-AN: 452239872 References: <36ddb9aa.0@silver.truman.edu> Organization: * JerryWare *, Leiden, Holland Newsgroups: comp.lang.ada Date: 1999-03-07T00:00:00+00:00 List-Id: Josh Highley (joshhighley@hotmail.com) wrote: : I'm trying to link some really simple assembly code with Ada. I : haven't been able to find any good examples or explanations on how to do : this. One example is the ports_io packages that you can find on my homepage, follow the old link. : to getting this but I'm not sure what I need to do. I want to use : assembly to position the cursor on the screen. Why would you want to use ASM for this ? If you are using DOS (which I suspect), use the conio package that comes with the EZ2LOAD distribution. If you are using the windows compiler, use the NT_Console package on my homepage. : ; I have A86 on my PC so my assembly code is a .com I have access to : ; MASM, though, if needed. "moveto.asm": Aha, I'm a long standing A86 user myself. Remember that: a) A86 is a 16-bit realmode assembler (unless you are using the protmode features?) while all Ada95 compilers I know are 32-bit (minimum) compilers. b) A86 uses its own modified Intel ASM syntax, if you are using GNAT, it uses the AT&T syntax. See the gcc manual for more information. : int 10h : Here's the Ada code. I'm using GNAT 3.11, AdaGIDE 6.21, and Win95. There is no such thing as an interrupt in a Win32 environment. This will never work. : not recognized: File format not recognized gnatmake: *** link failed" That is correct. GNAT is expecting a 32-bit Win32 PE format .obj file, and A86 is generating a tiny model 16-bit realmode DOS .obj file. -- -- Jerry van Dijk | Leiden, Holland -- Team Ada | jdijk@acm.org -- see http://stad.dsl.nl/~jvandyk