Jump to content
vladiii

ASM Problem ~X(

Recommended Posts

Posted


include 'C:\Documents and Settings\Vlad\Desktop\FASM W 167\INCLUDE\win32ax.inc'
section '.code' code readable writeable executable
tit db 'Numele melodiei ascultate este: ', 0
mel db '.', 0
hand db 'Winamp v1.x', 0
err db 'A aparut o eroare in program! Scuze!', 0
start:
mov eax, 0
push hand
push 0
Call [FindWindow]
cmp eax, 0
jz @nohand
push eax
push mel
push 512
Call [GetWindowText]
push 0
push tit
push mel
push 0
Call [MessageBox]
@nohand:
push 0
push tit
push err
push 0
Call [MessageBox]
push 0
Call [ExitProcess]
.end start

Da, nu afiseaza ce trebuie si mereu sare la labelul @nohand.

As fi recunoscator daca m-ati ajuta! Thanks ;)

Posted

Gata, rezolvai ! Thanks Slick. Acum am aflat ca daca folosesc push trebuie sa pun parametrii functiei API in ordine inversa fata de cum sunt ei declarati. Deci noul cod ar fi:


include 'C:\Documents and Settings\Vlad\Desktop\FASM W 167\INCLUDE\win32ax.inc'
section '.code' code readable writeable executable
tit db 'Numele melodiei ascultate este: ', 0
mel db '.................................', 0
hand db 'Winamp v1.x', 0
err db 'A aparut o eroare in program! Scuze!', 0
mamaia dd 0
start:
mov eax, 0
push 0
push hand
Call [FindWindow]
cmp eax, 0
jz @nohand
push 512
push mel
push eax
Call [GetWindowText]
push 0
push tit
push mel
push 0
Call [MessageBox]
push 0
Call [ExitProcess]
@nohand:
push 1
push tit
push err
push 0
Call [MessageBox]
push 0
Call [ExitProcess]
.end start

Postul asta trebuie mutat la programare :)) Daca nu o faceti voi, o sa o fac eu >:)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...