flat assembler
Message board for the users of flat assembler.

 Index > Main > [F1 Solved] Precalculated Float Goto page Previous  1, 2
Author
Roman

Joined: 21 Apr 2012
Posts: 1718
Roman 05 Sep 2022, 06:21
I want four float numbers, not one !

I do this !
Code:
```
rept 4 a:1  {
rept 1 n:a*2 \{
SumForMyFloat equ n\#f \} }

;in some place code
irpv ik,SumForMyFloat {  dd ik   }  ;i get 2.0, 4.0, 6.0, 8.0
```

Or this
Code:
```rept 4 a:1  {
rept 1 n:a*2+a \{
SumForMyFloat equ n\#f \} }
;in some place code
irpv ik,SumForMyFloat {  dd ik   }  ;i get 3.0, 6.0, 9.0, 12.0
```
05 Sep 2022, 06:21
Overclick

Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 05 Sep 2022, 06:44
What exactly you want? Do you really need to calculate it or just put #f in the end of some constant? You can use macro values for that.

 Description: Filesize: 26.81 KB Viewed: 2003 Time(s)

05 Sep 2022, 06:44
Roman

Joined: 21 Apr 2012
Posts: 1718
Roman 05 Sep 2022, 06:53
Overclick
This is macro for clicking on image rect ?
05 Sep 2022, 06:53
Overclick

Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 05 Sep 2022, 06:55
For clicking on all GUI images
05 Sep 2022, 06:55
Overclick

Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 07 Sep 2022, 02:12
Any chance to precalculate square root? ))
I trying this:
Code:
```   rept 1 num:W*W+H*H {Square=num#f }
Result=((Square-0x3F800000) shr 1)+0x3F800000

dq Result  ;Seems ok
dd Result  ;Error value out of range
```
07 Sep 2022, 02:12
Overclick

Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 07 Sep 2022, 02:40
Compiled but who knows...
Code:
```        rept 1 num:W*W+H*H {Square=dword num#f }
Result=((Square-0x3F800000) shr 1)+0x3F800000
dd Result    ```
07 Sep 2022, 02:40
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainTutorials and ExamplesDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsOS ConstructionIDE DevelopmentProjects and IdeasNon-x86 architecturesHigh Level LanguagesProgramming Language DesignCompiler Internals Other----------------FeedbackHeapTest Area
Goto page Previous  1, 2

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum