[comp.sys.ibm.pc] VGA 132 column mode

apxpecc@ihlpf.ATT.COM (Jeffrey P. Horvath) (12/07/88)

I would like to know if there is a way to "trip" 132 column mode on
a VGA (or EGA) card.  I have a SIGMA VGA/H card that "suppor"
132 column mode, and woould like to run terminal emulators suc  as
ms-kermit or CTRM in 132 column mode.  What is needed?  Can a UNIX
host simply send an escape sequence?


Responses to nwgpa!jphorv or ihlpf!apxpecc

pozar@hoptoad.uucp (Tim Pozar) (12/08/88)

In article <6861@ihlpf.ATT.COM> apxpecc@ihlpf.UUCP (Jeffrey P. Horvath) writes:
>I would like to know if there is a way to "trip" 132 column mode on
>a VGA (or EGA) card.  I have a SIGMA VGA/H card that "suppor"
>132 column mode, and woould like to run terminal emulators suc  as
>ms-kermit or CTRM in 132 column mode.  What is needed?  Can a UNIX
>host simply send an escape sequence?

   This is a quicky hack I did when I purchased my EGA monitor.
   
   I have found that mode 23 works well for 132 column stuff.
You may want to grab a copy of the IBM interrupts that get
posted here from time to time.  The list describes different
video modes for different video cards.

                   Tim
---
/*
 * VMODE -- Sets and gets the Video card mode.   
 * Copyright 1988 Timothy Pozar 
 * This code can be used for anything you want so long as 
 * it doesn't impact the above copyright.
 *
 * THE END 
 *
 */

#include <stdio.h>
#include <dos.h>

#define VIDEOINT 0x10
#define SETVMODE 0X00
#define GETVMODE 0x0f

main(argc, argv)
int argc;
char *argv[];
{
int n;

  if (argc == 1){
    printf(" VMODE\n");
    printf("   Sets or gets current video mode.\n");
    printf("   \"VMODE n\" to set the video to mode 'n'\n");
    printf("   If no argument is stated, the video mode\n");
    printf("   is displayed and returned in the errorlevel\n\n");
    exit(getvmode());
  } else {
    n = atoi(argv[1]);
    setvmode(n);
    exit(0);
  }
}

getvmode()
{
union REGS inregs, outregs;

   inregs.h.ah = GETVMODE;
   int86(VIDEOINT, &inregs, &outregs);
   printf("The number of columns on the screen = %d, \n",outregs.h.ah);
   printf("The current video mode is = %d\n",outregs.h.al);
   printf("The current active display page is = %d\n",outregs.h.bh);
   return(outregs.h.al);
}

setvmode(mode)
int mode;
{
union REGS inregs, outregs;

   inregs.h.ah = SETVMODE;
   inregs.h.al = mode;
   int86(VIDEOINT, &inregs, &outregs);
   printf("\t\t\tThe current video mode is now set to = %d\n",mode);
}

/* EOF VMODE.C */
---

-- 
 ...sun!hoptoad!\                                     Tim Pozar
                 >fidogate!pozar               Fido:  1:125/406
  ...lll-winken!/                            PaBell:  (415) 788-3904
       USNail:  KKSF / 77 Maiden Lane /  San Francisco CA 94108