Author Topic: the masmlib a2dw not correctly working as expected  (Read 3701 times)

Dubby

  • Member
  • **
  • Posts: 60
the masmlib a2dw not correctly working as expected
« on: January 20, 2013, 04:34:49 AM »
well at last in my windows 7 64 bit. haven't test it another machine.
The call to lstrlen  destroy the previously zeroed ECX register.

the solution is move the
Code: [Select]
xor ecx, ecx
after
Code: [Select]
invoke lstrlen, String
hth.

jj2007

  • Member
  • *****
  • Posts: 10544
  • Assembler is fun ;-)
    • MasmBasic
Re: the masmlib a2dw not correctly working as expected
« Reply #1 on: January 20, 2013, 04:49:32 AM »

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7541
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: the masmlib a2dw not correctly working as expected
« Reply #2 on: January 20, 2013, 10:13:10 AM »
Use "atodw_ex", it does not do things like that. Its one of Iczelion's old ones dated before 2000 and I* loath to touch them, the "atodw_ex" version is one I did myself and it seems to work OK.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Dubby

  • Member
  • **
  • Posts: 60
Re: the masmlib a2dw not correctly working as expected
« Reply #3 on: January 20, 2013, 02:54:55 PM »
ok then.. just in case there is a new comer which come and use the function then got frustrated with the result... oops no offense though...

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7541
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: the masmlib a2dw not correctly working as expected
« Reply #4 on: January 20, 2013, 03:44:38 PM »
Not at all and its appreciated that you have bothered.  :icon14:
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: