| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ret
sorry im a nub
ret returns from the method rite? or does it exit? lets say i think somethign like this Code:
__asm
{
main:
jmp addsomething
jmp subtractsomething
ret
addsomething:
add eax, 12345
ret
subtractsomething:
sub eax. 54321
ret
}
|
|
#2
|
||||
|
||||
|
Re: ret
No. It only returns to the call it correspondense. It jumps back to address that is on the stack. If your code should work properly it must be:
Code:
__asm
{
main:
call addsomething
call subtractsomething
ret
addsomething:
add eax, 12345
ret
subtractsomething:
sub eax, 54321
ret
}
__________________
I am not offering technical guidiance via email or IM Come on share your photo with us! CG members photo album! Use the Code Tags! |
|
#3
|
|||
|
|||
|
Re: ret
thx
|
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|