| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Flags |
DV> Does anyone know if the blinking cursor for 'INSERT' is a
DV> flag, and if so whatflag it is and how to handle it?
That is implementation defined and controlled by a call to
the video BIOS. I have some Borland code to illustrate that.
#include
#include
#include
void cursorpocket(int);
void setcursor(int start,int end);
int main(void)
{
setcursor(12,13);
cursorpocket(1);
printf("\n[ Example of CURSOR manipulation ]\n");
getch();
setcursor(32,0);
printf("\nNow we are GONE!");
getch();
setcursor(0,13);
printf("\nNow we are BIG!");
getch();
setcursor(13,13);
printf("\nNow we are THIN.");
getch();
setcursor(0,3);
printf("\nNow we are WEIRD!");
getch();
printf("\nBack where we started!");
cursorpocket(0);
getch();
puts("");
return(0);
}
void setcursor(int start,int end)
{
union REGS regs;
regs.h.ch=(char)start; /* Start, end should be 0-13 */
regs.h.cl=(char)end; /* Start should be > end. */
regs.h.ah=1; /* (Start == 32) = cursor off. */
int86(0x10,®s,®s); /* values 0-13 turn it back on. */
}
void cursorpocket(int get)
{
static char Sch, Scl, Sdh, Sdl;
union REGS regs;
switch(get)
{
case 1: {
regs.h.ah = 3;
regs.h.bh = 0; /* page number */
int86(0x10,®s,®s);
Sch = regs.h.ch;
Scl = regs.h.cl;
Sdh = regs.h.dh;
Sdl = regs.h.dl;
printf("\nLin %d : Col %d : Begin %d : End %d\n",
Sdh, Sdl, Sch, Scl);
} break;
case 0: {
printf("\nLin %d : Col %d : Begin %d : End %d\n",
Sdh, Sdl, Sch, Scl);
regs.h.dh = Sdh;
regs.h.dl = Sdl;
regs.h.bh = 0;
regs.h.ah = 2;
int86(0x10, ®s, ®s);
regs.h.ch = Sch;
regs.h.cl = Scl;
regs.h.ah = 1;
int86(0x10, ®s, ®s);
} break;
}
}
> ] * Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)SEEN-BY: 396/1 632/0 371 633/260 267 270 371 634/397 635/506 728 810 639/252 SEEN-BY: 670/218 @PATH: 154/750 222 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.