flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Overflowz 26 Oct 2010, 11:40
Hello everyone. I've created my first program that retrieves base address of functions from library. It's like arwin but its GUI version. Enjoy ^.^ Written in WinAsm Studio.
Last edited by Overflowz on 27 Oct 2010, 17:47; edited 3 times in total |
|||||||||||
![]() |
|
Overflowz 26 Oct 2010, 17:45
Thank you I'll try to fix that. I'm not pro but I'll try. thanks
![]() BTW I have 1 quiestion. I can't program when "ENTER" is clicked it should jmp to .msg I did it but when focus are on main window not on Edit Boxes. Can someone tell me how to do that ? ![]() |
|||
![]() |
|
vid 26 Oct 2010, 17:59
Overflowz: If I was your tutor, next step would be printing proper error message in case of error (using FormatMessageFromSystem), not just something generic.
|
|||
![]() |
|
Overflowz 26 Oct 2010, 18:15
I don't understand what you mean but I can't find "FormatMessageFromSystem" in MSDN.. :/
|
|||
![]() |
|
revolution 26 Oct 2010, 18:20
Something like this:
Code: invoke GetLastError ;eax has the system error code invoke FormatMessage,FORMAT_MESSAGE_ALLOCATE_BUFFER+FORMAT_MESSAGE_FROM_SYSTEM,\ 0,eax,LANG_NEUTRAL,system_error_message,0,0 |
|||
![]() |
|
Overflowz 26 Oct 2010, 18:56
hmm I'll do that later but my main problem now is I can't make "ENTER" to trigger messagebox.. Can someone help ?
![]() |
|||
![]() |
|
DarkAlchemist 26 Oct 2010, 19:08
Overflowz wrote: hmm I'll do that later but my main problem now is I can't make "ENTER" to trigger messagebox.. Can someone help ? |
|||
![]() |
|
Overflowz 26 Oct 2010, 19:10
I need that on WinAPI :S
|
|||
![]() |
|
DarkAlchemist 26 Oct 2010, 20:11
Maybe this will help you? Look at method one http://support.microsoft.com/kb/102589
That is describing how to make enter act like a tab but it is also telling you how enter works in the first place and how to catch it. |
|||
![]() |
|
baldr 26 Oct 2010, 20:23
Overflowz,
Read on dialog box keyboard interface (WM_COMMAND notification with wParam being IDOK or whatever control identifier you've set for default push button). |
|||
![]() |
|
Overflowz 26 Oct 2010, 20:37
DarkAlchemist, I have read that now but I don't know C/C++
![]() baldr, can you write kinda example pls ? ![]() |
|||
![]() |
|
baldr 26 Oct 2010, 21:02
Overflowz,
Do I really have to? EXAMPLES\DIALOG\DIALOG.ASM has it all, I've just forgot about notification code in high part of wParam (even if BN_CLICKED is zero anyway ![]() |
|||
![]() |
|
Overflowz 26 Oct 2010, 21:54
hmm I don't understand logic of "SHL" can some1 explain me cause I can't understand what this means "cmp [wparam],BN_CLICKED shl 16 + IDCANCEL"
|
|||
![]() |
|
pearlz 27 Oct 2010, 13:47
Code: ;vb function MultipleWith2&(a&) MultipleWith2=a*2 end function ;in asm MultipleWith2: mov eax,[a] mul eax,2 mov dword[a],eax ;or MultipleWith2: mov eax,[a] shl eax,1 ; 1: mul 2 ; 2: mul 4 ; 3: mul 8 mov dword[a],eax ; in binary (8 bit) ; if x=1 (bin) x=0000.0001 ; x=2 (bin) x= 0000.0010 ; x=3 (bin) x= 0000.0011 ;.............etc ;x=255 (bin) x=1111.1111 ;example: with x=4 (bin) 0000.0100 ;<pseudo> ;before x= 0000.0100 shl x,1 ;after x= 0000.1000 ; 4 * 2 = 8 ;x in decimal: ( 0*2^7) + (0 * 2^6) + ( 0 * 2^5) + (0 * 2^4) + ( 1 * 2^3)+ (0*2^2) + (0 * 2^1) + (0*2^0)=8 ;before: x=4 (bin) x=0000.0100 shl x,3 ;after: x=0010.0000 |
|||
![]() |
|
LocoDelAssembly 27 Oct 2010, 14:23
It is "imul eax, 2" actually since plain MUL doesn't have immediate operands. Note it is OK to use imul for unsigned arithmetic, the difference appears only when you make the multiplication return a result twice wider than the operands.
|
|||
![]() |
|
pearlz 27 Oct 2010, 15:37
oh! it's not mul or imul
it's for shl intruction. in here it's pseudo. not asm code. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.