flat assembler
Message board for the users of flat assembler.
Index
> Main > How to write reusable code ? |
Author |
|
LiuJunfeng 04 Apr 2004, 13:31
This may be a big topic, yet it is very important.
I know macro,procedure and function can do this, but don't exactly know how |
|||
04 Apr 2004, 13:31 |
|
pelaillo 04 Apr 2004, 15:01
What do you mean?
|
|||
04 Apr 2004, 15:01 |
|
roticv 04 Apr 2004, 15:02
Maybe he is thinking along the lines of static libraries.
|
|||
04 Apr 2004, 15:02 |
|
pelaillo 04 Apr 2004, 18:53
Everyone have an own idea about the subject so we need to talk about personal preferences and why.
You need also to define target OS and application. i.e. see the differences between way-to-do callings in win32, linux, freeBSD, Menuet.... My personal preferences are: proc: A self-contained chunk of reusable code with a defined function. params passed in registers only in procs encapsulated within modules. params passed on stack when proc needs to be called from external modules or interfaces. params passed on memory locations: never. macros for very special situations (very difficult to explain) and definitely not for chunks of code. |
|||
04 Apr 2004, 18:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.