Problem !!
Author Message
Problem !!

Hi all,

I am a fresh user of assembly. So I have a problem as follows :-

----------------------------------------------------------------------------
How to represent the single precision floating-point number ?

Length            :  32 bits
Format            :  1 bit sign, 8 bit exponent, 23 bit mantissa
Sign              :  1 - negative, 0 - positive
Exponent          :  Excess-127
Mantissa          :  With implicit 1.0

Range             :  +1.11111111111111111111111 x 2^(255-127) to
-1.11111111111111111111111 x 2^(255-127)

Largest positive  :  +1.11111111111111111111111 x 2^(255-127)

Largest negative  :  -1.11111111111111111111111 x 2^(255-127)

Smallest positive :  +1.00000000000000000000000 x 2^(1-127)

Smallest negative :  -1.00000000000000000000000 x 2^(1-127)

EXACT zero        :  "0" in all 32 bits

Infinity (+/-)    :  +/-1.11111111111111111111111 x 2255-127
-----------------------------------------------------------------------------

I divide the number into 3 pieces and add them individually !! Is that
right ?

for example

DATA_SEG     SEGMENT
; float number  represent +1.11111111111111111111111 X 2^(255-127)
FNUMS             DB    0b
FNUM1             DW   11111111111111111111111b
FNUM1E            DB    1111111b ; = 128
; float number  rperesent +1.00000000000000000000000 X  2^(0)
FNUMS             DB   0b
FNUM2             DW   00000000000000000000000b
FNUM2E            DB   00000000b ; = 0
; result
RESULTS           DB   ?
RESULT            DW   ?
RESULTE           DB    ?
DATA_SEG     ENDS
---------------------------------------------------------------------------

THen add this two numbers and put back into the result, is that OK?