VGA must be a valid buffer or portion of memory. You might have to typecast it as well.
typedef unsigned char BYTE;
BYTE far *VGA=(BYTE far *)MK_FP(0xa000,0);
BYTE far *buffer=new BYTE[64000L];
Don't use geninterrupt() as it can leave the registers in unpredictable states. You are better off either using inline asm for interrupts or using the versatile int86() and int86x() functions.
void CLS(BYTE far *buffer,BYTE color)
unsigned int buf=FP_SEG(buffer);
cld //just to be sure
BYTE far *Screen=(BYTE far *)MK_FP(0xa000,0);
My function places x amount of words into the buffer instead of bytes which is a bit faster. If this were 32-bit you could use stosd which would be roughly twice as fast as this code.