flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Plase make init of quad float in text.

Author
Thread Post new topic Reply to topic
Zetus



Joined: 03 Jun 2004
Posts: 37
Zetus
Please make init for variables as:

aaa dd 1.23f
mov [aaa],2.34f

for quads (dq) and extended m/b
quads are very useful for big math...

Thanks a lot Smile
Post 09 Jul 2010, 07:41
View user's profile Send private message ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17273
Location: In your JS exploiting you and your system
revolution
It is a CPU limitation. You can't define immediate constants larger than 32 bits in that way. You have to transfer into a register first.
Code:
use64
var dq ?
mov rax,1.23456789012345
mov [var],rax    
and
Code:
var dq 1.23456789012345    
Post 09 Jul 2010, 07:47
View user's profile Send private message Visit poster's website Reply with quote
Zetus



Joined: 03 Jun 2004
Posts: 37
Zetus
One of way, but I think compiler can fill reserved (8bytes) field for dq with proper values.
as dd 0adfd0000h,4053c7e6h
is equal of dq 79.1235455f
I think it's possible.
Post 09 Jul 2010, 12:22
View user's profile Send private message ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17273
Location: In your JS exploiting you and your system
revolution
Zetus wrote:
One of way, but I think compiler can fill reserved (8bytes) field for dq with proper values.
as dd 0adfd0000h,4053c7e6h
is equal of dq 79.1235455f
I think it's possible.
Both forms work like that in fasm. dq 123.456 is perfectly fine, see my post above.

What is your question actually?
Post 09 Jul 2010, 12:30
View user's profile Send private message Visit poster's website Reply with quote
Zetus



Joined: 03 Jun 2004
Posts: 37
Zetus
in my 1.67.23
*aaa dq 0.15f -> extra characters on line*
old version?
Post 14 Jul 2010, 04:13
View user's profile Send private message ICQ Number Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
aaa is a cpu command, reserved hence
"_aaa dq 0.15f" will work

update your compiler:
http://flatassembler.net/download.php

save these manuals:
http://board.flatassembler.net/topic.php?t=11394&start=2
Post 14 Jul 2010, 04:37
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2020, Tomasz Grysztar.

Powered by rwasa.