flat assembler
Message board for the users of flat assembler.

Index > Heap > FASM test

Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
I wrote it in order to test some freshlib functions, but now you can test your assembly mind with this simple test.
There are Windows and Linux executables inside the package.


Description: v2.0 :D
Download
Filename: DialogsTest_WinLin.zip
Filesize: 29.67 KB
Downloaded: 91 Time(s)



Last edited by JohnFound on 28 Jan 2012, 17:47; edited 1 time in total
Post 28 Jan 2012, 16:11
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7734
Location: Kraków, Poland
Tomasz Grysztar
It crashes on Windows 7 Professional 64-bit here.
Post 28 Jan 2012, 16:16
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Oh, shame on me! Some crash address? I can test it only on 32bit machines with Linux Mint and WinXP.
Post 28 Jan 2012, 16:25
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
On winxp sp3 it run perfectly.

win7 32bit it cruches when it opens. You can see the main window behind the crush report.

I could execute it normaly 2 times runing as ad mministrator, but than the trick failed.
Running on compatibility mode won't do the trick either.
Quote:


Problem Event Name: APPCRASH
Application Name: TestLib.exe
Application Version: 0.0.0.0
Application Timestamp: 4f241bf8
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdadb
Exception Code: c0000005
Exception Offset: 00051f70
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789


As I had a little time, here is the call that produce the crash:
Code:

00402671  /$ C8 280000      enter   28, 0
00402675  |. 31C0           xor     eax, eax
00402677  |. 8D7D D8        lea     edi, [ebp-28]
0040267A  |. B9 0A000000    mov     ecx, 0A
0040267F  |. F3:AB          rep     stos [dword es:edi]
00402681  |. C745 D8 280000>mov     [dword ebp-28], 28
00402688  |. C745 DC 342940>mov     [dword ebp-24], TestLib.00402934
0040268F  |. C745 E4 200000>mov     [dword ebp-1C], 20
00402696  |. A1 FD6B4000    mov     eax, [406BFD]
0040269B  |. 8945 E8        mov     [ebp-18], eax
0040269E  |. C745 FC E36B40>mov     [dword ebp-4], TestLib.00406BE3  ;  UNICODE "FreshWin"
004026A5  |. 8D45 D8        lea     eax, [ebp-28]
004026A8  |. 50             push    eax                              ; /pWndClass
004026A9  |. FF15 BB714000  call    [<&USER32.RegisterClassW>]       ; \RegisterClassW
    

RegisterClassW
Post 28 Jan 2012, 17:02
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
I forgot to mention, the error ocure in ntdll, on this line:

In the function RTLValidateHeap I think.
Code:

76FD2E8F   3B58 14          cmp     ebx, [eax+14]
    

eax is zero.
Post 28 Jan 2012, 17:18
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Thank you friends. I found it - it was a not aligned stack. I uploaded new version, that should work now.
Post 28 Jan 2012, 17:49
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 140
SFeLi
JohnFound, why are you drawing text character-by-character? Looks messy:

Image
Post 28 Jan 2012, 18:30
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
SFeLi wrote:
JohnFound, why are you drawing text character-by-character?


It is only when the text is justified. In order to fit the row exactly in the given bounds, I need to draw some extra space between the characters. It looks better on paragraphs with more lines.

P.S. Also some bugs in the text drawing functions are possible... Wink
Post 28 Jan 2012, 18:59
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
majidkamali1370



Joined: 31 Oct 2010
Posts: 50
Location: Iran
majidkamali1370
Texts in MessageBoxes was great.
I like FASM. Smile
Post 28 Jan 2012, 21:44
View user's profile Send private message Send e-mail Yahoo Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.