Author Topic: Old fireworks does not works on x64  (Read 9717 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10316
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Old fireworks does not works on x64
« Reply #15 on: August 03, 2015, 01:29:24 PM »
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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

caraveiro

  • Regular Member
  • *
  • Posts: 19
  • Quam olim da capo.
Re: Old fireworks does not works on x64
« Reply #16 on: August 05, 2015, 02:45:45 AM »
It seems that my Full-HD screen is Bigger than 1024w*1024h*4colors:


Code: [Select]
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