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,cfdecaa3552abc2a,start X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: more specific, was:change screen colour?? Date: 2000/08/26 Message-ID: <6yUp5.135921$i5.1994143@news1.frmt1.sfba.home.com>#1/1 X-Deja-AN: 662801554 References: <39a7ed56$0$20400@echo-01.iinet.net.au> X-Complaints-To: abuse@home.net X-Trace: news1.frmt1.sfba.home.com 967316738 24.20.190.201 (Sat, 26 Aug 2000 12:05:38 PDT) Organization: @Home Network NNTP-Posting-Date: Sat, 26 Aug 2000 12:05:38 PDT Newsgroups: comp.lang.ada Date: 2000-08-26T00:00:00+00:00 List-Id: >Im writing a program using ada95 compiler thats going to run in a dos >window, and i want to change the dos window colour from black to >blue.. i am using windows 95 and have 32bit video card.. i think 1. Look up ANSI.SYS and see if that will let you send a control sequence to change the background color. 2. See if there's something in MS's "Accessibility Options" (for those with poor vision, say) that will do it. 3. See if there is an int21 or a BIOS int10 call and your program can use it (I don't recall one, but it's been a while). 4. Have your program go and change the color attribute byte on the (emulated) DOS screen. Using an old Ada83 compiler and running in a DOS window under Win95, this program gives the leftmost 20 columns a blue background. Every time you scroll a line, though, you need to repaint black to blue on the new area. with text_io; with system; procedure blue is -- test blue-ing background on DOS window type col_types is new integer; type row_types is new integer; subtype cols is col_types range 1 .. 80; subtype rows is row_types range 1 .. 24; type ibm_chars is record char:character; attribute:system.byte; end record; type lines is array(cols) of ibm_chars; type screens is array(rows) of lines; screen:screens; for screen use at (16#B800#,0); begin text_io.put_line("line one"); text_io.put_line("line two"); text_io.put_line("line three"); for r in screen'range loop for c in cols range 1 .. 20 loop screen(r)(c).attribute:=16#17#; end loop; end loop; text_io.put_line("line four"); text_io.put_line("line five"); text_io.put_line("line six"); delay 10.0; end blue; The line for screen use at (16#B800#,0); is going to take some work, however, since you'll probably have to ask Windows for an address of the (simulated) DOS text RAM, and tell your Ada 95 compiler to use that address. Sorry that such a straightforward request results in such a long answer. Perhaps others can suggest other approaches.