Question

I'm building a Windows Assembly program without any macro. So I downloaded a program that was using macros, and I'm converting this into "pure" assembly code.

However I'm facing one issue here. There's a label @@: that I don't understand, and also a jump jne @F that I didn't get it. What are these 2 symbols?

MyWndProc:

    push ebp
    mov ebp, esp

    cmp DWORD PTR [ebp+12], 2 ;WM_DESTROY=2
    jne @F
      push ecx
      push NULL
      mov dword ptr ecx, 7e42ca5ah ;address of PostQuitMessage
      call ecx
      pop ecx
    @@:

    push DWORD PTR [ebp+20]
    push DWORD PTR [ebp+16]
    push DWORD PTR [ebp+12]
    push DWORD PTR [ebp+8]
    call DefWindowProc
    ;mov dword ptr edx, 7e42c17eh
    ;call edx

    leave
    ret 16

Also for PostQuitMessage API I could hard-code the memory address (on WinXP 32bits SP3 english), but for DefWindowProc it compiles, but it breaks when executing. Does someone know why?

Thanks for support guys.

PS.: I'm using masm32

Was it helpful?

Solution

The @@ is an anonymous local label. You could have many of them in the file The jne @F means jump to the nearest @@ ahead of the current location.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top