flat assembler
Message board for the users of flat assembler.
Index
> Main > clear string |
Author |
|
revolution 14 Oct 2006, 14:39
jacko221 wrote: i want to clear it. Code: mov [buffer],0 Code: buffer rb 1024 Code: mov edi,buffer mov ecx,1024/4 xor eax,eax rep stosd Last edited by revolution on 14 Oct 2006, 14:54; edited 1 time in total |
|||
14 Oct 2006, 14:39 |
|
vid 14 Oct 2006, 14:45
if you mean filling with zeroes, it's:
Code: cld mov edi, buffer mov ecx, size_of_buffer mov al, 0 rep stosb |
|||
14 Oct 2006, 14:45 |
|
smiddy 14 Oct 2006, 17:09
Both vid and revolution are correct, however I will point out, you need to ensure that ES and DS are in the same segment/selector as the buffer, otherwise you'll put them zeros into space you may not want them to go.
|
|||
14 Oct 2006, 17:09 |
|
jacko221 15 Oct 2006, 03:32
thanks for all your help
|
|||
15 Oct 2006, 03:32 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.