As I understand it the float.asm file is part of the AN526 by mistake. First I can't find any link in the AN526.pdf to floating point maths. And secondly the code have some errors (specially the division). The autors in this example are using the following format: Exponent: 8 bits or 1 file register range -128 to 127 Mantissa: 16 bits or 2 file registers bit# FEDC BA98 7654 3210 where bit F is the MSB and bit 0 ist the LSB. Bit F shows the sign. Bit = 1 means the number is negative, Bit F = 0 means the number is positive. Each of the other bits are related to a power of two, like in fix point numbers, but with negativ exponets: bit E -> 2 exp(-2) bit D -> 2 exp(-3) bit C -> 2 exp(-4) aso. The best way to understand this is an example: (using the test module at the end) The equivalent of 1 is in floating point: Mantissa: 2 exp(-2) Exponent 2 exp(2) In notation of erik it is A = 4000h exp(02h). For a test set B = 4000h exp(02h) too. A+B = 4000h exp(03h) = [2exp(-2)]*[2exp(03h)] = 0.25*8 = 2 B-A = 0000h exp(02h) = [0]*[2exp(02h)] = 0 A*B = 4000h exp(02h) = 1 and a little more difficult: A = 7.5 = {[2exp(-2)]+[2exp(-3)]+[2exp(-4)]+[2exp(-5)]}*[2exp(4)] = 7800h exp(04h) B = 2.5 = {[2exp(-2)]+[2exp(-4)]}*[2exp(4)] = 5000h exp(04h) A+B = 5000h exp(05h) = {[2exp(-2)]+[2exp(-4)]}*[2exp(5)] = 0.25*32 + 0.0625*32 = 8 + 2 = 10 B-A = B000h exp(04h) = - 5000h exp(04h) (complement) = -{[2exp(-2)]+[2exp(-4)]}*[2exp(4)] = -(0.25*16 + 0.0625*16) = -(4 + 1) = -5 A*B = 4B00h exp(06h) = {[2exp(-2)]+[2exp(-5)]+2exp(-7)] +[2exp(-8)]}*[2exp(6)] = 0.25*64 + 0.03125*64 + 0.0078125 + 0,00390625*64 = 16 + 2 + 0.5 + 0.25 = 18.75 This kind of floating point format is very unusualy, but very useful for PICs, because it needs only 24 bit per number. (IEEE needs 32 bit.) Unfortunately the division don't works. If anybody have realy need of a division function please conntact me by personal mail. Jens Wagner Leipzig, Germany