Hi,
At the start the buffer is already empty with zeroes, but if you want to clear it again, I would do it like this:
(supposing that es:di already points to the buffer)
Code:
mov cx, 64 ; the length of buffer
mov al, 0 ; put zeroes everywhere
clear_loop:
stosb ; this will put byte stored in al to the address [es:di] and increase di
loop clear_loop ; if cx is not zero, loop back and decrease cx
if you are in 32 bit mode replace cx with ecx, if in 64, then with rcx.
Note: this isn't the most effective, you could use stosw or even stosd or stosq, but this is the easiest to explain and understand IMO.
hope this helps