flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
baldr
nmake,
Preprocessor operates with symbols (though it recognizes them as numbers when needs to). For simple cases it can help: rept 10 i:0 { dd 2#i#.0 } will generate equivalent of dd 20.0, 21.0, ..., 29.0. More generic cases probably will require assembly stage to perform compile-time floating point processing (preprocessor can join symbols but can't split them, at least directly, AFAIK). Explain your problem, maybe it can be solved. |
|||
![]() |
|
nmake
My simple problem is that I need to add 2.0 to a floating point immediate parameter that I pass to a function. Thats the whole simple problem.
Code: invoke function,2.0 now, invoke the same function, but with 4.0 next time, then 6.0 next time, then 8.0 next time. Repeat this 20 times over. I used runtime floating point calculation to temporary solve it, it was just for testing purposes, building a very large stone corridor. http://i.imgur.com/tNvDPkC.jpg |
|||
![]() |
|
baldr
nmake,
Preprocessor can perform compile-time calculations. Code: rept 20 % { rept 1 %%: %*2 \{ invoke function, %%\#f \} } |
|||
![]() |
|
nmake
Yes, I forgot about the escape characters.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.