memory clearing

how would i clear all memory at adress b8000
1) Why do you want that?
2) What do you mean by "all memory"? Single byte? Memory equals to size of some object? all memory from that address to end of program allocated memory?

char* ptr = 0xb8000;
while (true)
   *(ptr++) = 0;

Have fun.

@PanGalactic, damn! I was waiting for his answer to suggest something similar.
just to let you know its for OS Dev
Topic archived. No new replies allowed.