EASy68K
http://www.easy68k.com/EASy68Kforum/

How do you store a decimal with a fraction?
http://www.easy68k.com/EASy68Kforum/viewtopic.php?f=6&t=911
Page 1 of 1

Author:  Steve [ Sat Oct 09, 2010 5:05 pm ]
Post subject:  How do you store a decimal with a fraction?

Code:
        ORG     $1000
  DN    DC.L    10.125
        END     $400

in the debug it is stored as:

00001000= 0000000A

That just seems to be storing 10

Author:  clive [ Sat Oct 09, 2010 10:33 pm ]
Post subject: 

DC.L defines a 32-bit INTEGER constant

The 68000 doesn't natively support floating, for the 68020 w/68881 or 68882 FPU you can do the following.

Code:
28   000000A6 4049 0FDB                 dc.s    3.14159265358979
29   000000AA 4009 21FB 5444            dc.d    3.14159265358979
              2D11
30   000000B2 4000 0000 C90F            dc.x    3.14159265358979
              DAA2 2168 87DE
31   000000BE 0000 0003 1415            dc.p    3.14159265358979
              9265 3589 7900

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/