Open Brett208 opened 5 years ago
You're quite right. That would be a very nice problem to solve.
I'm not currently sure how, but it seems NASM supports Conditional Assembly (section 4.4). That may allow usage similar to how some C++ code conditionally defines either __declspec(dllexport)
or __declspec(dllimport)
. However, in those C++ projects, the macro is set in the project file of the project itself, rather than the project that imports it.
The NASM -d
command line option can be used to pre-define a macro.
Alternatively, the NASM -p
command line option can be used to pre-include a file.
Those might both be a way of defining an alternative address.
How to control this from the host project is unclear though.
The other option, is to hurry up and find a way to replace the assembly file with another method. That would also eliminate this burden.
Is there a way to automatically switch between the 2 load addresses? I have to keep being very careful about what I commit in the .asm file and probably accidently commited the change recently. It would just ease some admin burden on my part.
Would a MACRO that was definable from NetFixClient or something work for this.
Thanks, Brett