flat assembler
Message board for the users of flat assembler.
Index
> Main > How to do nested procedures with proc macros |
Author |
|
revolution 11 Jun 2023, 23:58
There is no need to nest.
Code: proc func1 ccall [printf], "%d", 6 call func2 ret endp proc func2 ccall [printf], "%d", 5 ret endp call func1 |
|||
11 Jun 2023, 23:58 |
|
moistMaven 12 Jun 2023, 02:11
Quote:
What if I need to use the parameters of the first function in the other |
|||
12 Jun 2023, 02:11 |
|
revolution 12 Jun 2023, 02:20
Pass it along:
Code: proc func1 param1 ccall [printf], "%d", 6 stdcall func2, [param1] ret endp proc func2 param2 ccall [printf], "%d", [param2] ret endp stdcall func1, 5 |
|||
12 Jun 2023, 02:20 |
|
moistMaven 12 Jun 2023, 02:47
Actually I was making an compiler so generating nested assembly was easy but now I'll have to write extra logic. Anyway thanks man.
|
|||
12 Jun 2023, 02:47 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.