diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-11-29 15:36:52 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-11-29 15:36:52 +0000 |
commit | 691069fa45d30814d6fc57a96376b234f6018344 (patch) | |
tree | 7c3064403b09168030ffb857b31f669548796454 | |
parent | f1fde81b82e7d08273a01f6270130782a3261395 (diff) | |
download | ovm-691069fa45d30814d6fc57a96376b234f6018344.tar.gz ovm-691069fa45d30814d6fc57a96376b234f6018344.tar.bz2 ovm-691069fa45d30814d6fc57a96376b234f6018344.zip |
Added todo for preprocessor "%MACRO"
This is different to "%CONST" in that it can take token parameters and
use them. This allows the construction of user code at compile time,
which can be very useful for a variety of use cases.
-rw-r--r-- | todo.org | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -76,6 +76,20 @@ That would be a very simple way of solving the static vs dynamic linking problem: just include the files you actually need. Even the standard library would be fine and not require any additional work. Let's see how this would work. +** TODO Macros +Essentially constants expressions which take literal parameters +(i.e. tokens) and can use them throughout the body. Something like +#+begin_src asm +%macro(name)(param1 param2 param3) +... +%end +#+end_src +Where each parameter is substituted in a call at preprocessing time. +A call should look something like this: +#+begin_src asm + $name 1 2 3 +#+end_src +and those tokens will be substituted literally in the macro body. * TODO Standard library :ASM:VM: I should start considering this and how a user may use it. Should it be an option in the VM and/or assembler binaries (i.e. a flag) or |