#include <conio.h>
#include <dos.h>

void	TurnCursorOff();
void	TurnCursorOn();
void	TurnBorderOff();
void	TurnBorderOn(int VideoColor);

void	TurnCursorOff()
{
	union	REGS regs;
	regs.h.ch = 0x20;				/* this bit tells to turn cursor off */
	regs.h.cl = 0x00;				/* ending cursor line, meaningless here */
	regs.h.ah = 0x01;				/* function code in ah */
	int86(0x10,&regs,&regs);	/* call BIOS with the set cursor size */
}

void	TurnCursorOn()
{
	union	REGS regs;
	regs.h.ch = 0x06;					/* starting cursor line */
	regs.h.cl = 0x07;					/* ending cursor line */
	regs.h.ah = 0x01;					/* function code in ah */
	int86(0x10,&regs,&regs);		/* call BIOS with the set cursor size */
}

void	TurnBorderOff()
{
	union REGS regs;

	regs.h.ah = 11;				/* set color palette */
	regs.h.bh = 0x00;  			/* palette color id being set */
	regs.h.bl = BLACK;			/* 0x07; */
	int86(0x10,&regs,&regs);
}

void	TurnBorderOn(int VideoColor) /* works for CGA & VGA */
{
	union REGS regs;

	regs.h.ah = 11;				/* set color palette */
	regs.h.bh = 0x00;  			/* palette color id being set */
	regs.h.bl = VideoColor;		/* 0x07; */
	int86(0x10,&regs,&regs);
}