flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Roman 06 Mar 2020, 07:31
I try this work
rept 5 n:0 { dd 56.0,BortX,BortUpY,-n#.0,ScalBort dd 56.0,BortX2,BortUpY,-n#.0,ScalBort } But this not work error rept 5 n:0 { dd 56.0,BortX,BortUpY,-n*5#.0,ScalBort dd 56.0,BortX2,BortUpY,-n*5#.0,ScalBort } |
|||
![]() |
|
revolution 06 Mar 2020, 08:24
Dealing with binary floating point numbers is tricky. You need to separate the mantissa from the exponent, then do the addition, adjust the exponent and mantissa, and recombine into floating point format.
If would likely e easier to do everything in integers first and then add the final ".0" as the final step and let the assembler convert it to floating point. |
|||
![]() |
|
Tomasz Grysztar 06 Mar 2020, 08:33
Roman wrote: I try this work Code: rept 5 n:0 dd 56.0,BortX,BortUpY,-n*5#.0,ScalBort dd 56.0,BortX2,BortUpY,-n*5#.0,ScalBort end rept |
|||
![]() |
|
revolution 06 Mar 2020, 08:40
And in fasm where I mentioned doing the computations in integers:
Code: rept 5 n:0 { rept 1 m:n*5 \{ dd 56.0,BortX,BortUpY,-m\#.0,ScalBort dd 56.0,BortX2,BortUpY,-m\#.0,ScalBort \} } |
|||
![]() |
|
Roman 06 Mar 2020, 09:01
Thanks work !
|
|||
![]() |
|
Roman 06 Mar 2020, 09:03
But not work this:
Code: rept 5 n:0 { rept 1 m:n*293 \{ dd 56.0,BortX,BortUpY,-m\#.n,ScalBort dd 56.0,BortX2,BortUpY,-m\#.m,ScalBort \} } Fasm get error reserved word used as symbol |
|||
![]() |
|
revolution 06 Mar 2020, 09:13
You have to combine the dot and the label with a hash:
Code: dd 56.0,BortX,BortUpY,-m\#.\#n,ScalBort |
|||
![]() |
|
Roman 06 Mar 2020, 09:16
Big thanks for you help !
I create 3d level for my Directx 12 game shooter. This very help me fast and easy create 3d level float data. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.