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: "David C. Hoos, Sr." Subject: Re: What's wrong with this simple Ada w/ assembly code? Date: 1999/03/14 Message-ID: #1/1 X-Deja-AN: 455093614 Content-Transfer-Encoding: 7bit References: <36ddb9aa.0@silver.truman.edu> <36ec237f.0@silver.truman.edu> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-14T00:00:00+00:00 List-Id: Josh Highley wrote in message <36ec237f.0@silver.truman.edu>... >In article , jerry@jvdsys.stuyts.nl says... > >>: 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. >> >The program I'm writing is a simple text based program intended to run >in a DOS window. 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? > 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. 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? > Have you looked at the code for the diners example that came with GNAT? Although that examples primary purpose is demonstrating multitasking, it also illustrates the use of cursor-position-addressable screen management. This is done by means of ANSI terminal escape sequences, using the ANSI.SYS device driver in the DOS/Win95 environment. This is a preferable method, because it leaves the matter of cursor positioning to an OS-provided device driver, instead of requiring your program to have implementation- or platform- dependent code.