delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/14/22:25:04

Date: Thu, 15 Jun 2000 07:54:25 +0530
Message-Id: <200006150224.HAA01147@midpec.com>
From: Prashant TR <tr AT midpec DOT com>
To: beat_studer AT bluewin DOT ch
CC: djgpp AT delorie DOT com
In-reply-to: <8i9140$fcp$1@bw107zhb.bluewin.ch> (beat_studer@bluewin.ch)
Subject: Re: dos color ?
References: <kra15.6974$iy DOT 531598 AT bgtnsc06-news DOT ops DOT worldnet DOT att DOT net> <8i9140$fcp$1 AT bw107zhb DOT bluewin DOT ch>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> ;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

IMHO, this is *not* a good idea. This is ideal for real mode
programs. You can never be sure that the "INT 10" will be passed to
real mode. Some extenders support it, some don't. The best way to do
this is to use __dpmi_int.

Prashant

- Raw text -


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