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/15 Message-ID: #1/1 X-Deja-AN: 455364781 References: <36ddb9aa.0@silver.truman.edu> <36ec237f.0@silver.truman.edu> Organization: * JerryWare *, Leiden, Holland Newsgroups: comp.lang.ada Date: 1999-03-15T00:00:00+00:00 List-Id: Josh Highley (joshhighley@hotmail.com) wrote: : The program I'm writing is a simple text based program intended to run : in a DOS window. If you are using the NT version of GNAT, it does produce console based programs by default, but this is _not_ DOS code. To write a DOS program you need to use a DOS version of GNAT. : I don't know about you other people, but I'm only a : sophomore CS major who hasn't had the classes or the time to try writing : Ada programs for Windows, although I'd like to :) Having said this, can : I use interrupts? No, there are _no_ interrupts in Windows. : I'm using ASM to position the cursor because the other Ada packages : I've tried aren't very fast at moving the cursor to several different : areas of the screen quickly. Well, my NT_Console package is about as fast as the console will go, using ASM doesn't help since you would still be calling the same slow Win32 API functions. : There's also some other things I'd like to : try with ASM and Ada, if nothing else, just for fun and to see if I : myself can make it work. : Would MASM produce the correct 32 bit object code? No, MASM produces microsoft type object (.obj) files, while GNAT expects a coff (.o) file. Either use the Ada facilities for inline assembly (see gnat documentation for info) or write directly for the 'as' assembler. Be warned though that this assembler uses a completely diffent syntax than MASM does. -- -- Jerry van Dijk | Leiden, Holland -- Team Ada | jdijk@acm.org -- see http://stad.dsl.nl/~jvandyk