flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Teehee 02 May 2011, 18:49
+1
|
|||
![]() |
|
Enko 02 May 2011, 20:21
As I see it, overriding the DD instruction with a macro will be enough.
|
|||
![]() |
|
vid 02 May 2011, 21:15
10e9 works fine for me
|
|||
![]() |
|
Madis731 03 May 2011, 07:49
How about a workaround:
Code: dd 1'000'000'000 ; 10^9 dd 10e9 ; 1.0*10^9 - float only dd 2 shl 3 ; 2^4 Sorry, a typo! Last edited by Madis731 on 03 May 2011, 11:34; edited 1 time in total |
|||
![]() |
|
ouadji 03 May 2011, 10:29
Code: dq 1000000000 ;does compile ;but it has nothing to do with dq 10e9 ; does compile to define a "float", the "dot" is enough. The "e" are available to add an "exponent" operator. And do not tell me to use a macro, this is not a real solution. "Just a plaster on a wooden leg" ... like we say in French. (2^4 = 2 shl 3 ![]() |
|||
![]() |
|
Madis731 03 May 2011, 11:46
A lot of things are macros in FASM. Take a look at the include\macro folder.
There are good and bad macros even some *elegant* ones ![]() You want your reading experience to be easier, but FASM provides all the functionality. This is something that is best fitted job for macros. ![]() |
|||
![]() |
|
vid 03 May 2011, 12:07
So in your first post, you was trying to store 1e10 integer in a dword?
![]() |
|||
![]() |
|
Madis731 03 May 2011, 13:53
I think it fits, doesn't it!? Don't confuse me
![]() 1e9 = 1*10^9 = 1000000000 = 1 billion signed max is 2147483647 unsigned 4294967295 1e10 does NOT fit! ![]() |
|||
![]() |
|
ouadji 03 May 2011, 14:03
Quote: Macros are meant to make life easier. |
|||
![]() |
|
vid 03 May 2011, 14:20
Madis731 wrote: I think it fits, doesn't it!? Don't confuse me Carefully reread first post of the topic ![]() ![]() He wrote "dd 10e9", that's why I thought he must mean float, not integer. |
|||
![]() |
|
ouadji 03 May 2011, 14:30
it was just an example... if fasm had included a exponent operator. dd 10^9 == dd 10e9 == 1'000'000'000 ;0x3B9ACA00 |
|||
![]() |
|
edfed 10 May 2011, 11:41
be able to do that is more interresting than just 10^9 in my opinion:
Code: value = 4.543 integer =43245 dd 1.0*0.0032/value+56-integer mix int and float values in numerical expressions and let use multiple floats in expressions, if a float is in, then, result is in float. this feature i think cannot be implemented easy just with a macro, i think it can be simpler to implement it in the "kernel", fasm2.x? but exponent ^ too can be a very good feature, as i can see, 10e9 is accepted, but not 10^9. it is not very important, but can be very cool. about numerical expressions, implement cos, sin, tan, sqrt, ², etc can be very cool too. but not needed for now. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.