flat assembler
Message board for the users of flat assembler.

Index > Main > [F1 Solved] Precalculated Float

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1767
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
    
Post 05 Sep 2022, 06:21
View user's profile Send private message Reply with quote
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: 2206 Time(s)

Capture.PNG


Post 05 Sep 2022, 06:44
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1767
Roman 05 Sep 2022, 06:53
Overclick
This is macro for clicking on image rect ?
Post 05 Sep 2022, 06:53
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 05 Sep 2022, 06:55
For clicking on all GUI images
Post 05 Sep 2022, 06:55
View user's profile Send private message Visit poster's website Reply with quote
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
    
Post 07 Sep 2022, 02:12
View user's profile Send private message Visit poster's website Reply with quote
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    
Post 07 Sep 2022, 02:40
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.