flat assembler
Message board for the users of flat assembler.
Index
> Main > Return a value from proc |
Author |
|
Killswitch 29 Apr 2006, 08:27
Hey,
If I use the proc macro, how can I return a value from the procedure? Thanks for your help! |
|||
29 Apr 2006, 08:27 |
|
silkodyssey 29 Apr 2006, 09:20
The standard way to return a value is in the eax register but you're free to do it however you wish.
_________________ silkodyssey |
|||
29 Apr 2006, 09:20 |
|
Killswitch 29 Apr 2006, 12:50
So something like this:
Code: proc ... Mov [eax],1 ret endp Would leave 1 in eax? |
|||
29 Apr 2006, 12:50 |
|
Killswitch 29 Apr 2006, 13:46
That was a silly mistake (you can't tell I'm quite a noob )!
Thanks a lot for your help guys! |
|||
29 Apr 2006, 13:46 |
|
silkodyssey 29 Apr 2006, 15:14
Quote:
I think making mistakes is a very good way to learn especially when you have to go through turtuous debugging sessions to correct those mistakes. _________________ silkodyssey |
|||
29 Apr 2006, 15:14 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.