swapping pages in protected mode

I'm trying to swap pages in borland pascal protected mode along the
lines of this code:

getmem(vscr,64000);
cls(vscr,64000);
for i:=0 to 319 do for j:=0 to 199 do
mem[seg(vscr^):j*320+i]:=7;
flip(vscr,sega000,64000);

This is fine in real mode but not in protected. I tried globalalloc but
it still didn't work. Could someone please help me.

Frank Wyton

(fra...@OntheNet.com.au)