Well, you haven't specified if you're in X-Windows or a terminal, nor if you're using SVGALib if you're in a terminal. However, if you ARE in a terminal, get NCurses and do a little reading of MAN NCURSES. There's a routine in there that does exactly what you're looking for, for a variety of...