delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/27/09:24:15

Date: Sun, 27 Aug 2000 16:21:57 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Radical NetSurfer <radsmail AT juno DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: printf, cprintf and CR/LF problem
In-Reply-To: <dtrhqsch9hm4pq0jlefr538boonncgvt6i@4ax.com>
Message-ID: <Pine.SUN.3.91.1000827161706.7455D-100000@is>
MIME-Version: 1.0
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

On Sun, 27 Aug 2000, Radical NetSurfer wrote:

> I have not experiemented with any of the ScreenUpdateXX()'s in DJGPP.
> 
> Question: Are these anything like  "dos_direct_screen_write" versions
> of the printf, etc ?

Yes and no.  Yes, they write directly to the screen.  No, they are not 
like printf, since you cannot pass a format specifier to them.  You need 
to create a buffer with all the text and video attributes yourself.  I 
think this is explained in the library reference docs.  They also don't 
move the cursor, unlike printf and cprintf.

> When a direct-screen-write (d-s-w) type function writes a character
> (not a CR/LF) to the LAST possible screen location
> (lower-right-most-corner), I think it would be LEAST expected to cause
> a scroll.

As I've said, cprintf is a compatibility function, it does whetever its 
namesakes do in other compilers.  As for printf, it passes text to BIOS 
functions, and BIOS always scrolls the screen at the last location, 
because the BIOS, too, moves the cursor.

> What about producing an output routine that performs in this fasion,
> direct screen writes would be permissible PROVIDED they work in both
> true MS-DOS16  mode and under a Win31/9x DOS-SHELL/DOS7
> modes.

Feel free to write such a function and contribute the sources and the 
docs.

- Raw text -


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