Fresh IDE . Artifact [f362e25e80]
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Artifact f362e25e806c4b2e2a40ff559c173c6deb93f0ae:


; _______________________________________________________________________________________
;|                                                                                       |
;| ..:: Fresh IDE ::..  template project.                                                |
;|_______________________________________________________________________________________|
;
;  Description: FreshLib portable console application.
;
;  Target OS: Any, supported by FreshLib
;
;  Dependencies: FreshLib
;
;  Notes:
;_________________________________________________________________________________________

include "%lib%/freshlib.inc"

@BinaryType console, compact

options.DebugMode = 1

include "%lib%/freshlib.asm"


include "%lib%/data/hashtree.asm"

start:
        InitializeAll

        mov     [ResizeIt], StrategyAgressive

        stdcall CreateArray, sizeof.THashTreeNode
        mov     edx, eax
        mov     ecx, 10000000

.add_loop:
        stdcall StrDupMem, "Test string"
        mov     ebx, eax

        stdcall NumToStr, ecx, ntsDec or ntsUnsigned
        stdcall StrCat, ebx, eax
        stdcall StrDel, eax

        stdcall SearchHashTree, edx, ebx, TRUE
        test    eax, eax
        jnz     @f

        stdcall StrDel, ebx
        OutputValue "String add error on ECX=", ecx, 10, -1
@@:
        loop    .add_loop

        OutputValue "Hash tree size: ", [edx+TArray.count], 10, -1

        stdcall FreeHashTree, edx

        FinalizeAll
        stdcall TerminateAll, 0