News:

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

dword to ascii problem

Started by ragdog, November 10, 2007, 07:44:13 AM

Previous topic - Next topic

ragdog

hi

i have a problem with dwtoa
my program not to work there on

can help their me please :'(



LOCAL rsName[64]:BYTE
LOCAL IconIndex :DWORD

mov eax,[lpName]
shr eax,16
or ax,ax
jnz @1

lea ecx,rsName
mov ecx,"#"
inc ecx

invoke dwtoa,addr lpName,ecx

jmp @2


greets
ragdog

ramguru

I was trying to understand your code, with no luck. I guess you have to explain what are you doing or upload full source-code...

TNick

Maybe, if you change mov ecx,"#" to mov [ecx],"#" there will be no problem with dwtoa.

Nick

PS:
I'm acting cool now, but I didn't noticed that for an hour. :)))


ragdog

hi

thanks for your help ic change mov ecx,"#" to mov [ecx],"#"
that give me a error

: error A2070: invalid instruction operands

i upload the goasm source and my converted masm source

thanks in forward

ragdog

[attachment deleted by admin]

ramguru

I've corrected some of your code
lea ecx,rsName
mov eax, 27h ; use temp register
mov [ecx], eax ; like TNick suggested
inc ecx
invoke dwtoa,lpName,ecx ; no need for ADDR


use ecx instead of esi
cmp [lpType],RT_GROUP_ICON;cmp D[lpType],RT_GROUP_ICON
jne @3

mov ecx,[dwNDX]
shl ecx,6
add ecx,[lParam]
invoke lstrcpy,ecx,ADDR rsName


Now it will run at least

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

ramguru

Hi, Mark if you think param places are mixed here, you're wrong   :wink
tricky result is expected "#1234"

ragdog

#7
thx guys i have my problem solved :U

i have found a another example

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08