News:

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

This is too slow

Started by frktons, November 18, 2010, 03:10:21 AM

Previous topic - Next topic

Antariy

Quote from: frktons on November 21, 2010, 11:40:03 PM
Quote from: Antariy on November 21, 2010, 11:36:37 PM
Frank, make this:

invoke GlobalAlloc,GMEM_MOVEABLE,DWORD PTR Lenght


to this


invoke GlobalAlloc,GMEM_MOVEABLE or GMEM_DDESHARE,DWORD PTR Lenght


Just for make sure  :lol


OK! Before posting the 100th release, I'll wait some hour. Better to test it before posting.  :P

I'm guess problem is not in DDESHARE flag, but if you set it and post it now, we can see results now :P

frktons

here it is.
Mind is like a parachute. You know what to do in order to use it :-)

frktons

Alex you are running Win XP pro sp2, the same OS as Dave's one.
What could be so different between your machines? Oex has the same problem, same OS,
I really don't understand.  ::)
Mind is like a parachute. You know what to do in order to use it :-)

Antariy

Quote from: frktons on November 22, 2010, 12:16:28 AM
Alex you are running Win XP pro sp2, the same OS as Dave's one.
What could be so different between your machines? Oex has the same problem, same OS,

http://www.masm32.com/board/index.php?topic=15365.msg125844#msg125844 - a first thing which can be

frktons

Quote from: Antariy on November 21, 2010, 10:28:37 PM
You should search for the runtime dependency: maybe somewhere you did not preserve some register,
or you rely that this register have the same/specific value, etc.

I don't think so. Otherwise bad results should appear in many more systems. They show up only
in a few machines, when people probably compile with old MASM versions. A corrupted register
should break entire logic of PROC.

Something else in my opinion is working bad here.  ::)

Mind is like a parachute. You know what to do in order to use it :-)

Antariy

Quote from: frktons on November 22, 2010, 12:24:38 AM
I don't think so. Otherwise bad results should appear in many more systems. They show up only
in a few machines, when people probably compile with old MASM versions. A corrupted register
should break entire logic of PROC.

All bugs is based on thing, that many of the equal systems has the same layout of things. So, this is very possible that most of machines have, for example, zero some register after some operation, etc. At equal sub-builds of the system this should be something as rule.

But this is only first supposition - no more than.

frktons

Quote from: Antariy on November 22, 2010, 12:33:56 AM
All bugs is based on thing, that many of the equal systems has the same layout of things. So, this is very possible that most of machines have, for example, zero some register after some operation, etc. At equal sub-builds of the system this should be something as rule.

But this is only first supposition - no more than.

Of course, but some bugs can depend on things you don't even suspect. Maybe an antivirus, or a system
program, or a corrupted dll. I hope it is only a program bug, because, if it is, we'll find it and correct it.
But if it is something related to OS, or dll, or any other thing, it could be very complex to get rid of it.

Let's see if the changes we've made produce some effect. Otherwise a debug session can help find
were the problem is.
Mind is like a parachute. You know what to do in order to use it :-)

dedndave

ok - it still has the problem
i am debugging it - i will figure it out   :U
it seems only logical to troubleshoot it on a system that exhibits the problem
it cannot be easily solved on a machine that doesn't   :bg

frktons

Quote from: dedndave on November 22, 2010, 12:48:30 AM
ok - it still has the problem
i am debugging it - i will figure it out   :U
it seems only logical to troubleshoot it on a system that exhibits the problem
it cannot be easily solved on a machine that doesn't   :bg
You are right, indeed.  :U
Mind is like a parachute. You know what to do in order to use it :-)

Antariy

Frank, this is culprit:


ProgData.inc:

AlgoDesc         BYTE  31 DUP (?)
AlgoDescSize     DWORD SIZEOF AlgoDesc

Algo1.asm:
AlgoDesc1        byte  "ustrv$ + GetNumberFormat      ",0 ; ZERO BYTE SHOULD BE REPLACED TO SPACE
...
invoke DisplayAt, dword ptr AlgoColDesc, dword ptr AlgoRow, addr AlgoDesc,
                     dword ptr AlgoDescSize


So, you are display a binary zero into screen, because SIZEOF is includes zero to the length of the string.
You can solve all that strings by:

AlgoDesc1        byte  "ustrv$ + GetNumberFormat       " ; one space added
or, if you want to have zero terminated string
AlgoDesc1        byte  "ustrv$ + GetNumberFormat       " ; one space added
db 0




Alex

dedndave

i haven't completely solved the problem
but - i have isolated it to some degree
there appears to be a null byte at that point in the text data


something else, not related to this specific problem ...
ConvertToDOS PROC DestBuffer:DWORD, SourceBuffer:DWORD


   mov  esi, SourceBuffer
   mov  edi, DestBuffer

   mov  ecx, CharNumber  ;shouldn't this be NumCycles ?????? - we do 2 chars per pass

dedndave

he may have found it   :U

Antariy


dedndave

well - i count 6 spaces at the end of that string
in the pasted text, i only count 5   :P

let me see if i can find it

Antariy

Even better:

invoke lstrlen,addr AlgoDesc
invoke DisplayAt, dword ptr AlgoColDesc, dword ptr AlgoRow, addr AlgoDesc,
                     eax




Alex