flat assembler
Message board for the users of flat assembler.
Index
> Windows > How to replace a symbol with another one - (de)encrypter |
Author |
|
vbVeryBeginner 25 Dec 2004, 15:41
to find replace, i guess, the step is to compare them first, if equal, then replace it.
lstrcmp,str1,str2 je -> equal and replace it lstrcpy,str1,str1Replace |
|||
25 Dec 2004, 15:41 |
|
crc 25 Dec 2004, 15:47
While I haven't tested this, something like the following example should be enough to give you some idea as to how to do this in assembly:
Code: ... mov esi, msg1 call replace ... replace: mov eax, byte [esi] cmp eax, '-' jz .change cmp eax, 0 ; end of string jz .exit .next: inc esi jmp replace .change: mov eax, ' ' ; a space mov [esi], byte eax jmp .next .exit: ret ... msg1 db 'hello-world',0 |
|||
25 Dec 2004, 15:47 |
|
gumletis 26 Dec 2004, 12:10
thanks work....
_________________ LOOOL |
|||
26 Dec 2004, 12:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.