On Wed, Feb 13, 2013 at 2:18 PM, sakura kinomoto <like-a-m...@list.ru> wrote:
> how to use nansi.sys to change colour scheme? I find some info in web, but it 
> is hard for newbie
>
> I guess I put string in config.sys: "device=c:\odin\nansi.sys"; what next 
> step I need?

Escape sequences.  ANSI escape sequences all begin with Escape[, with
the following characters specifying the action to be performed.  Nansi
implements a subset of the DEC VT102 terminal control codes.

It differs from Microsoft's ANSI.SYS in being a lot faster, and adding
support for the Add Line and Delete Line instructions.

Once NANSI is loaded, you use the PROMPT to issue the escape
sequences.  For instance, I use something like this:
PROMPT=$e[s$e[H$e[7m$e[K$D $B $P$e[m$e[u$g

It does the following:
$e[s     Save the cursor location
$e[H    Home the cursor to the top left of the screen
$e[7m  Set inverse video
$e[K    Clear to end of line
$D       print current date
$B       Print pipe symbol
$P       Print current drive/directory
$e[m    End attributes
$e[u     Restore cursor to stored location
$g        Print > on screen

This creates an inverse video status bar at the top of the screen with
current date and directory, which stays there while the > moves down.
The prompt command redraws the status bar at screen top after each
command entry.

If I want to fiddle with colors, those are settable via ANSI escape
sequences too.  See http://help.fdos.org/en/hhstndrd/base/nansi.htm
for a list of what NANSI supports.
______
Dennis
https://plus.google.com/u/0/105128793974319004519

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to