In order to transfer 64KB blocks of memory at a time you must be in large memory model. As well do not attempt to run the program inside of your Turbo IDE as it takes up too much memory. You must test the code outside of the IDE - then your pointer will no longer be NULL.
#define XYTOMEM(x,y) ((y<<6)+(y<<8)+x)
#define TRUE 1
#define FALSE 0
typedef unsigned char BYTE;
void Pixel(int x,int y,BYTE c);
void SetBufferMode(int mode=TRUE);
Screen=(BYTE far *)MK_FP(0,0xA000);
Buffer=new BYTE[64000L]; //will fail inside of the IDE
//or use memcpy() from mem.h
void Pixel(int x,int y,BYTE c)
void SetBufferMode(int mode)
} else Surface=Screen;
That should be enough to get you started. Flip() flips the buffer to the screen regardless of the surface pointer. SetBufferMode alters the surface pointer so that you can plot pixels either to the buffer or the screen with one function.