Turbo C && Video && memmove - help ?

eric at uwovax.uwo.ca eric at uwovax.uwo.ca
Fri Jul 20 03:57:29 AEST 1990


I have these two neat little routines that work ok in compact and large
models (Turbo C) but I am having problems making them work in
models which are small data (small, medium...)

They use TC's void *memmove(void *dest, const coid *src, size_tn)

void *pushscreen(void)
{
	unsigned *sbuf;

	sbuf = malloc(4096);
	memmove(sbuf, Vpage, 4096);
	return(sbuf);
}

void popscreen(unsigned *sbuf);
{
	memmove(Vpage, sbuf, 4096);
	free(sbuf);
}


where Vpage has been previously defined as 
#define Vpage (unsigned far *)0xb8000000

Any suggestions ?  (other than use a different model...)
merci.
-e



More information about the Comp.lang.c mailing list