hi all
i search a function to convert a string
example : test123 to 321tset
There is a api, or a routine?
thanks
This tests the MASM32 szRev procedure against the CRT _strrev function:
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
include \masm32\include\masm32rt.inc
.686
include \masm32\macros\timers.asm
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
.data
str1 db "my other brother darryl",0
str2 db "my other brother darryl",0
.code
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
start:
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
print ADDR str1,13,10
invoke szRev, ADDR str1, ADDR str2
print ADDR str2,13,10
invoke crt__strrev, ADDR str2
print ADDR str2,13,10,13,10
invoke Sleep, 3000
counter_begin 1000, HIGH_PRIORITY_CLASS
invoke szRev, ADDR str1, ADDR str2
counter_end
print ustr$(eax)," cycles, szRev",13,10
counter_begin 1000, HIGH_PRIORITY_CLASS
invoke crt__strrev, ADDR str2
counter_end
print ustr$(eax)," cycles, _strrev",13,10,13,10
inkey "Press any key to exit..."
exit
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start
Results on a P3:
my other brother darryl
lyrrad rehtorb rehto ym
my other brother darryl
153 cycles, szRev
207 cycles, _strrev
6.7-9 cycles per character including the call overhead.
thanks that is it :U :U
greets
ragdog