News:

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

Main Menu

Old fireworks does not works on x64

Started by caraveiro, August 02, 2015, 03:30:45 AM

Previous topic - Next topic

hutch--

I am with qword here, every time Microsoft produce a new OS version they tend to re-write many functions according to documented specifications and if they get it right which is not always the case, exceptions that worked on an older OS will go BANG on a later one. Comply with the published Intel ABI or live dangerously. There is no spec to preserve MMX and XMM registers so if you assume any of them, you risk it going BANG on a later version.

caraveiro

It seems that my Full-HD screen is Bigger than 1024w*1024h*4colors:



align 4
FireThread                      proc uses esi edi ebx
                                LOCAL dScreenW:DWORD
                                LOCAL dScreenH:DWORD
                                LOCAL dScreenBits:DWORD
                                ;
        ;
        Invoke GetDC,hWinMain ;hwnd ;wnd ;hWinTarget
        mov wnddc,eax
        invoke GetProcessHeap
        mov hHeap,eax
Invoke GetSystemMetrics,SM_CXSCREEN
mov dScreenW,eax
        Invoke GetSystemMetrics,SM_CYSCREEN
        mov dScreenH,eax
        xor edx,edx
        mov ecx,dScreenW
        mul ecx
        shl eax,4
        mov dScreenBits,eax
        invoke HeapAlloc,hHeap,HEAP_ZERO_MEMORY OR HEAP_GENERATE_EXCEPTIONS,dScreenBits ;2048*2048*8 ;1024*1024*4=4194304
        ;add eax,4096*4 ;4096               ; blur: -1'th line problem
        mov ecx,dScreenW
        shl ecx,4
        add eax,ecx
        mov bitmap1,eax
        invoke HeapAlloc,hHeap,HEAP_ZERO_MEMORY OR HEAP_GENERATE_EXCEPTIONS,dScreenBits ;2048*2048*8 ;4194304
        ;add eax,4096*4;4096               ; blur: -1'th line problem
        mov ecx,dScreenW
        shl ecx,4
        add eax,ecx       
        mov bitmap2,eax
"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC