For clearing a 32 bit screenbuffer, you could try something like this:
sub memset_dword(byval addr as any ptr, byval fill_with as integer, byval num_ints as integer)
  asm
    mov eax, [fill_with]
    mov ecx, [num_ints]
    mov edi, [addr]
    cld
    rep stosd
  end asm
end sub
should be pretty fast, addr=start address of screen buffer, fill_with=colour to fill buffer with, num_ints=width*height of screen.