delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/14/18:45:24

From: "Beat Studer" <beat_studer AT bluewin DOT ch>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: dos color ?
Date: Thu, 15 Jun 2000 00:31:06 +0200
Organization: Swisscom AG, the blue window
Lines: 35
Message-ID: <8i9140$fcp$1@bw107zhb.bluewin.ch>
References: <kra15.6974$iy DOT 531598 AT bgtnsc06-news DOT ops DOT worldnet DOT att DOT net>
NNTP-Posting-Host: bei179pub128.bluewin.ch
X-Trace: bw107zhb.bluewin.ch 961021888 15769 195.186.179.128 (14 Jun 2000 22:31:28 GMT)
X-Complaints-To: newsmaster AT bluewin DOT ch
NNTP-Posting-Date: 14 Jun 2000 22:31:28 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi !

When I was into colored consoles I used some replacements for the 'cls' -
command (e.g. 'clb' for white on blue, that is clb.com, a tiny com-file
assembled with nasm), here's the code :
(works on the normal 25/80 - screen, also with WIN9x)

;NASM-IDE ASM Assistant Assembler Project File
[BITS 16]        ;Set code generation to 16 bit mode
[ORG 0x0100]  ;Set code start address to 0100h

[SEGMENT .text]
mov ax, 0600h       ;AH=06: function to scroll up, AL=0: blank window
mov cx, 0               ;upper left corner (0,0)
mov dx, 184Fh       ;lower right corner (24,79)
mov bh, 17h           ;text-attribute (color)
int 10h
mov ah, 02h           ;function to set cursor
mov bh, 0               ;video page
mov dx, 0               ;DH=row, DL=column
int 10h
ret

you may try and change it to your needs, if you like.
(BTW it's not a bad idea to get the textattributes when your progs start and
to restore the colors on exit).

"smile773" <smile773 AT bigfoot DOT com> wrote in message
news:kra15.6974$iy DOT 531598 AT bgtnsc06-news DOT ops DOT worldnet DOT att DOT net...
| Could one of you nice persons please share some code
| so that I can change the dos console to blue with white
| letters ?



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019