flat assembler
Message board for the users of flat assembler.

Index > Main > Examples section started

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8268
Location: Kraków, Poland
Tomasz Grysztar 19 Jun 2004, 22:05
Finally the new examples section is alive - though only few examples are listed, I will add more soon.
If you want to submit some examples, please submit them here, but please follow the rules of packaging I've listed in this thread: http://board.flatassembler.net/topic.php?t=980#8661
Post 19 Jun 2004, 22:05
View user's profile Send private message Visit poster's website Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9 19 Jun 2004, 23:30
Hi, Admin

BTW, where is [Examples] section? !?

--
Post 19 Jun 2004, 23:30
View user's profile Send private message Reply with quote
Jaques



Joined: 07 Jun 2004
Posts: 79
Location: Everywhere
Jaques 20 Jun 2004, 00:00
Why not check the main page... Really

_________________
- My ignorance is now your problem.
Post 20 Jun 2004, 00:00
View user's profile Send private message Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9 20 Jun 2004, 00:59
Thanks.

i thought it was in this forum.
i think i seldom extract the zip files.
Post 20 Jun 2004, 00:59
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 20 Jun 2004, 12:23
I changed my tray example that now it uses standard FASM macros. The program is very simple, but it is a good skeleton for tray apps.
Post 20 Jun 2004, 12:23
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 20 Jun 2004, 19:02
how about adding links to examples at private sites (decard's, comrades etc.)?
Post 20 Jun 2004, 19:02
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 07 Aug 2004, 21:28
All the examples should have OS in brackets ie
Power(Win32)
GTK examples(Linux)
It's a bit uncomfortable to do mouse_over on these links to see if they are
zipped or targzd Wink

_________________
My updated idol Very Happy http://www.agner.org/optimize/


Last edited by Madis731 on 12 Sep 2004, 11:02; edited 2 times in total
Post 07 Aug 2004, 21:28
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
Imagist 08 Aug 2004, 05:06
Awesome!
Post 08 Aug 2004, 05:06
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 11 Sep 2004, 11:15
Tested on 9x/2K/XP!

The design(1):
————————
Power
Size: 7 kilobytes

Example of exponenting huge numbers with only 32bit registers.
Also demonstrates conversion between DEC(packed)<=>HEX<=>DEC(string).
————————

The design(2):
————————
ConvDLG
Size: 6 kilobytes

Example of conversions between 35 different numbersystems(bases).
Pattern insertion, instant conversion, analyting key-processor, etc.
————————


Description: PowerMulDiv application - third version. Speed improvements and bugfixes.
Download
Filename: Power.zip
Filesize: 6.95 KB
Downloaded: 436 Time(s)

Description: Conversion dialog - fourth version. Improved pattern-detection and few fixes.
Download
Filename: ConvDLG.zip
Filesize: 6.2 KB
Downloaded: 454 Time(s)


_________________
My updated idol Very Happy http://www.agner.org/optimize/


Last edited by Madis731 on 05 Dec 2004, 21:41; edited 6 times in total
Post 11 Sep 2004, 11:15
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv 11 Sep 2004, 13:59
Madis731 wrote:
Works only on NT machines (2K, XP,...) and crashes if used on 9x/ME, don't know why.

The design:
————————
Power
Size: 7 kilobytes

Example of exponenting huge numbers with only 32bit registers.
Also demonstrates conversion between DEC(packed)<->HEX<->DEC(string).
————————

P.S. All the examples should have OS in brackets ie
Power(Win32)
GTK examples(Linux)
It's a bit uncomfortable to do mouse_over on these links to see if they are
zipped or targzd Wink

Update: Some optimizations made on calculations, its about 10.7 times
faster, but the bottleneck is conversion so you can't feel much difference Sad


I would be surprised that it would work on all os. The code is sloppy. (btw it crashed on my XP)

Code:
label dat dword at 07E0000h
    

How can you assume that the memory is accessible? Can't you just use HeapAlloc?
Post 11 Sep 2004, 13:59
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 12 Sep 2004, 10:58
I crawled the web and also asked about it in forums. I couldn't find anything helpful so I did this Sad
If you could show me some example code to allocate to some address, that I WANT(on any Win OS), then I would be grateful.

BTW, have you tried the latest application?

I will delete the old one now.
Post 12 Sep 2004, 10:58
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv 12 Sep 2004, 11:46
Code:
invoke GetProcessHeap
invoke HeapAlloc, eax, 0, sizetoallocated
mov [pointertodata], eax
    
Post 12 Sep 2004, 11:46
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 12 Sep 2004, 12:18
UPDATE: irrelevant - just here for reference. Now the tests run under a second...
Test this out, I think I have fixed it:
Testing programs
Code:
;Test results
Pentium III 600MHz / 128MB RAM / Win2K SP4
VirtualAllocPowerMul:
    Time:     ~1m:03s
    FinalMem: ~1 728KB
HeapAllocPowerMul:
    Time:     ~1m:03
    FinalMem: ~1 728KB
    

Ran them together and they allocated memory at different times but the final
result was still the same. At some point one was leading with 8KB, then the
other one. Something to do with W2K memory management. Confused

_________________
My updated idol Very Happy http://www.agner.org/optimize/


Last edited by Madis731 on 05 Dec 2004, 21:53; edited 5 times in total
Post 12 Sep 2004, 12:18
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8268
Location: Kraków, Poland
Tomasz Grysztar 12 Sep 2004, 16:19
Even the huge BSS section is better than such hardcoded addresses. Keep the RD.
Post 12 Sep 2004, 16:19
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 12 Sep 2004, 16:32
If you mean RD=ReserveDouble, then THIS was the reason I began to use other alternatives to allocate memory. The limit was 70000h-Heap or so and I cannot be sure if I can write to that memory or not Sad
Now when everything should be fixed, it seems to run ok just some testing needed because I only have 2k SP4 and 98SE Razz
...but it works fine there:D and the other app too (conversiondialog)

If it doesn't work, does anyone have any idea why?


Last edited by Madis731 on 12 Sep 2004, 16:56; edited 1 time in total
Post 12 Sep 2004, 16:32
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8268
Location: Kraków, Poland
Tomasz Grysztar 12 Sep 2004, 16:38
It doesn't work on XP.
Post 12 Sep 2004, 16:38
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 12 Sep 2004, 18:19
Ok, I finally got my hands on a Toshiba laptop with XP Pro (5.1.2600)
and tested ConvDLG, PowerMul(VirtualAlloc and HeapAlloc) and they all
worked fine.
98, 98SE, 2K no SP,SP2,SP4 work fine. I don't understand, what seems to
be the problem Sad

What do you mean - it doesn't work?
-Illegal operation
-some sort of exception
-it doesn't start
-it shuts down without any error message
...
maybe you are not patient enough 1234^5678 took me a minute
you should try sth like 5^6=15625 or 2^32=4294967296 ...

BTW, updated ConvDLG - now it has what I call intelligent pattern distinction
inputting A, 6, 0, Z, 1 in BINary translates to 1010,110,0,100011,1 which is
101011001000111 BIN => 22087 DEC and you can do it in any mode 2-36


Last edited by Madis731 on 20 Sep 2004, 15:27; edited 2 times in total
Post 12 Sep 2004, 18:19
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 198
Location: St.Vincent & the Grenadines
silkodyssey 12 Sep 2004, 20:36
Basic keylogger/keyboard hook example written with fresh.I've only tested it on windows ME but it should work on later versions of windows, I hope. Smile


Description:
Download
Filename: Keylog.zip
Filesize: 8.98 KB
Downloaded: 443 Time(s)


_________________
silkodyssey
Post 12 Sep 2004, 20:36
View user's profile Send private message MSN Messenger 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 cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.