				   Text Mode

			     Freeware by Jason Hood
			       jadoxa@hotmail.com

				     v1.02
			       23 February, 2000



Description:

Text Mode (tm.com) provides control of various text screen settings: columns,
rows, scan lines, font height, page, and border color.	It can also display
the current settings.


Requirements:

186+
VGA


Usage:

tm <cols>[x<rows>] -m[<mode>] ,<lines>
   -c[<cols>] -r[<rows>] -f[<height|file>]
   -p[<page>] -s[<attr>] -b[<border>] -d -q
   -w[<height>]

cols	Number of columns: 40, 80 or 90
rows	Number of rows: see below
-m	BIOS/VESA mode number (in hexadecimal)
lines	Scan lines: 1 = 200, 2 = 350, 3 = 400 or 4 = 480
-f	Font height (6 to 16) or a font file
-p	Page to display (1 to, at most, 8)
-s	Save screen contents or clear screen to color
-b	Border/frame/overscan color
-d	Display current columns, rows and font height
-w	Write the font to file (or all fonts if not specified)
-q	Quiet

An option without a value will display the current setting (unless quiet) and
set ERRORLEVEL. Multiple settings will always be displayed in the same order,
but ERRORLEVEL will be set to the last specified.

The supported rows are: 12 - 16, 18, 20 - 23, 25, 26, 28 - 36, 38,
			40, 43, 44, 48, 50, 53, 57, 58, 60, 66, 68, 80.

In addition: 25 rows supports scan lines 1, 2 and 3;
	     26 rows supports scan lines 2 and 3;
	     28 rows supports scan lines 1 and 3;
	     30 rows supports scan lines 3 and 4;
	     33 rows supports scan lines 1 and 3;
	     36 rows supports scan lines 3 and 4;
	     40 rows supports scan lines 3 and 4;
	     43 rows supports scan lines 2 and 4;
	     50 rows supports scan lines 2 and 3.

The default is 3, except for 43, which is 2.

The font file must contain all 256 characters.

Values for the border color:

	0 = Black	4 = Red
	1 = Blue	5 = Magenta
	2 = Green	6 = Brown
	3 = Cyan	7 = Grey

Add 8 for an "intense" variation.

The screen clearing attribute is the normal DOS foreground/background pair:


				       FOREGROUND

	      <---------Dark---------->   P   D  <---------Light---------->
					  a   a
				  M	  l   r 		  M
				  a	  e   k 		  a   Y
	      B       G 	  g   B 	      G 	  g   e   W
	      l   B   r   C	  e   r   G   G   B   r   C	  e   l   h
	      a   l   e   y   R   n   o   r   r   l   e   y   R   n   l   i
	      c   u   e   a   e   t   w   e   e   u   e   a   e   t   o   t
B	      k	  e   n   n   d   a   n   y   y   e   n   n   d   a   w   e
A
C   Black	  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
K   Blue     16      18  19  20  21  22  23  24  25  26  27  28  29  30  31
G   Green    32  33	 35  36  37  38  39  40  41  42  43  44  45  46  47
R   Cyan     48  49  50      52  53  54  55  56  57  58  59  60  61  62  63
O   Red      64  65  66  67	 69  70  71  72  73  74  75  76  77  78  79
U   Magenta  80  81  82  83  84      86  87  88  89  90  91  92  93  94  95
N   Brown    96  97  98  99 100 101	103 104 105 106 107 108 109 110 111
D   Grey    112 113 114 115 116 117 118     120 121 122 123 124 125 126 127


A hexadecimal number can be used by prefixing with "0x".

VESA text modes:

	108 =  80x60
	109 = 132x25
	10A = 132x43
	10B = 132x50
	10C = 132x60

ATI owners can try 23 for 132x25 and 33 for 132x44.


Mode3:

I've included three other programs to further your text mode enjoyment:
AltMode3, Mode3Fnt and Font14. AltMode3 and Mode3Fnt are similar programs,
allowing the font and screen colors to be permanently changed. The difference
between the two is that AltMode3 uses BIOS fonts (8, 14 and 16 lines), whereas
Mode3Fnt uses a custom font (anything from 6 to 16 lines). Run them with "-?"
(or read the .asm files) to find out more. If you elect to run either of those
programs with a 14- or 15-line font, you might need Font14. I think it's only
necessary when Windows crashes to the blue screen, but you may find it useful
for other programs (eg. font editors that read the BIOS 14-line font). Just
run it and it will tell you what it thinks.

Note: Mode3Fnt and Font14 expect high memory. If they can't find it, they'll
      use the top end of low memory. This may cause problems, I'm not sure.
      If you have any difficulties, let me know.

Note 2: AltMode3 uses high memory by default. If you'd prefer to use low
	memory, execute the debug script: "debug <altmode3.dbg". This will
	patch "altmode3.com" to only use low memory.


Acknowledgments:

The Assembly Snippets, version 4.0 (asnip40a.zip):
  480 scan lines and 90-column mode by Tenie Remmel (set480.asm, 90wide.asm);
  6-line font was uncredited (font58.asm).

Ralf Brown's Interrupt List.

Pierre Jelenc for the color table (from TDE).

The 12-line font is from an ATI mach64 BIOS 14-line font.


Distribution:

Only the .com file is necessary to run the program, but redistribution in a
public place requires the original .zip file contents. A modified version can
be distributed, on the proviso that the original is also included.
