---
name: "vga_settextmoderegs"
section: "3"
platform: "linux"
package: "libsvga1-dev"
version: "1:1.4.3-33"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/vga_gettextmoderegs"
---

# vga\_settextmoderegs(3)

get/set the vga state used in text mode

Part of [vga\_gettextmoderegs(3)](/vga_gettextmoderegs/3.md).

## NAME

vga\_gettextmoderegs, vga\_settextmoderegs - get/set the vga state used in text mode

## SYNOPSIS

**#include \<vga.h\>**

**void vga\_gettextmoderegs(void \*state);**\
 **void vga\_settextmoderegs(void \*state);**

## DESCRIPTION

The functions gives access to the buffer where svgalib saves the vga state which is use when the kernel displays text on the SVGA. This is used by the [**restoretextmode**(1)](/restoretextmode/1.md),  [**savetextmode**(1)](/savetextmode/1.md), and  [**textmode**(1)](/textmode/1.md) utilities to restore a possibly screwed console.

The buffer currently occupies 385 bytes. It can't do any harm to make it substantially larger to allow for future enhancements.

## SEE ALSO

[**svgalib**(7)](/svgalib/7.md), [**vgagl**(7)](/vgagl/7.md), [**libvga.config**(5)](/libvga.config/5.md), [**restorefont**(1)](/restorefont/1.md), [**restoretextmode**(1)](/restoretextmode/1.md), [**restorepalette**(1)](/restorepalette/1.md), [**savetextmode**(1)](/savetextmode/1.md), [**textmode**(1)](/textmode/1.md), [**vga\_dumpregs**(3)](/vga_dumpregs/3.md), [**vga\_gettextfont**(3)](/vga_gettextfont/3.md), [**dumpreg**(1)](/dumpreg/1.md)

## AUTHOR

This manual page was edited by Michael Weller \<eowmob@exp-math.uni-essen.de\>. The exact source of the referenced function as well as of the original documentation is unknown.

It is very likely that both are at least to some extent are due to Harm Hanemaayer \<H.Hanemaayer@inter.nl.net\>.

Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections to this first version of the svgalib manual.
