flat assembler
Message board for the users of flat assembler.
Index
> Main > How create float structure ? Lets say df. |
Author |
|
ProMiNick 20 Jan 2019, 11:15
Roman, thou found my code.
Code: struc dt [arg] { label . tword ; add this for correcteness if arg eqtype 1.0 dt arg else if arg eqtype 1; may be this helps dt arg#.0 else match sign value,arg { match =INF,value { dq $8000000000000000 \\} match =NaN,value { dq $C000000000000001 \\} ; NaN is big range of values, and it is useless in practic (Infinity useless too) dw $7FFF - (sign $4000 - $4000) \} end if ;if thou define table it is enought, but for single tbyte may be "dw ?" needed for alignment after it } alternative: Code: Inf equ -$4000+$4000+$7FFF:$8000000000000000 NaN equ Inf or use case Code: dt Inf,+Inf,-Inf,+NaN(Index),-NaN(Index); where Index - any value from 1 to $7FFFFFFFFFFFFFFF Last edited by ProMiNick on 25 Jan 2019, 08:24; edited 2 times in total |
|||
20 Jan 2019, 11:15 |
|
Roman 20 Jan 2019, 14:03
Yes. I found on site KalibriOS.
ProMiNick did you been on GD.ru ? |
|||
20 Jan 2019, 14:03 |
|
l4m2 08 Feb 2019, 04:11
Code: macro df [x] { forward dq x#.0 } |
|||
08 Feb 2019, 04:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.