News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Clearing BYTE buffer

Started by brixton, December 25, 2005, 05:31:29 PM

Previous topic - Next topic

brixton

How do I clear the contents of a BYTE buffer?  Like with registers, I can just xor register, register

Apologies for such a simple question,

-brixton
If you love somebody, set them free.
If they return, they were always yours. If they don't, they never were..


brixton

Looks great, thanks, perfect, amazing, yeah!

Is there any other way of doing it though, except a small loop moving 0 to each BYTE PTR?

Actually I suppose I'm just being greedy now  :lol
If you love somebody, set them free.
If they return, they were always yours. If they don't, they never were..

Mincho Georgiev

Yes ,there is a third way, you separating the whole array on dwords and using DWORD PTR ,it's mutch more faster than a BYTE PTR loop.

hutch--

brixton,

Usual trick is unless you need to zero fill the entire string, just write a zero to the first location and its a zero length string that you can write to.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

brixton

Thanks for all the replies, and yes hutch--, I did that and it suits my needs for this particular project.  Thanks!  :bg :U
If you love somebody, set them free.
If they return, they were always yours. If they don't, they never were..