News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Minor change in StrMidA

Started by HSE, September 28, 2016, 06:35:08 AM

Previous topic - Next topic

HSE

Hi Biterider!

I have some problems extracting only 1 byte string. With a minor change apparently is working well:    invoke StrLengthA, [esp + 8]
; Agregated         
    inc eax     ; 27/09/16
    mov ecx, eax
; Replaced
    ;inc ecx     ; 27/09/16


Regards

LATER: not solved at all. But MASM32 szMid make the job until I understand the function (forever?  :biggrin:)
Equations in Assembly: SmplMath

Biterider

Hi HSE
Sorry for the delay, but I was a bit busy. I found a problem when the starting character was the last in the source string. Due to a wrang comparison, the function was aborted returning zero.
Attached the corrected version of the ANSI and the wide string functions. BTW, when the function returns, eax contains the number of chars copied.

Biterider

jj2007

m2z BYTE ptr [edx]                                  ;Set ZTC

Can you explain what this line does? Just curious.

HSE

mov byte ptr [edx], 0

If function fail return a null string.
Equations in Assembly: SmplMath

HSE

Hi Biterider

StrMidA working prefectly. Thanks  :t
Equations in Assembly: SmplMath