flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Roman
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
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
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
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
Thanks work !
|
|||
![]() |
|
Roman
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
You have to combine the dot and the label with a hash:
Code: dd 56.0,BortX,BortUpY,-m\#.\#n,ScalBort |
|||
![]() |
|
Roman
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.