flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > virtual: include data in output? |
Author |
|
revolution 17 Feb 2012, 04:33
yoshimitsu wrote: So is there any way to write data which doesn't get dropped in a virtual-directive? Code: virtual
file ...
load var1 dword ...
load var2 dword ...
end virtual
dd var1,var2 |
|||
17 Feb 2012, 04:33 |
|
yoshimitsu 17 Feb 2012, 04:45
That's what the task is like :P
I'm trying to write an external program as a FASM macro. Thing is I want to process a string array, not a fixed number of values. So I would need to work with an indeterminate amount of labels and I can't really think of a way getting this to work. I thought of something like an equ-array like the append-macro from the documentation, but that would mix assembler and preprocessor stage, wouldn't it? |
|||
17 Feb 2012, 04:45 |
|
revolution 17 Feb 2012, 04:57
For an array of EQUs you would need to know ahead of time (before the file directive is executed) how many labels to allocate. Assembler always runs after the preprocessor so you can't back-port the label count into the preprocessor. The only possible way is to allocate the expected maximum number of labels and monitor inside the loop if you ever exceed this value. Not a nice solution no matter how you do it, but it could work.
|
|||
17 Feb 2012, 04:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.