title: Floating point subtraction works inconsistently
body: <p>Im trying to subtract two floating point numbers without using floating point instructions but right now it only works with some numbers, for example 10.9 - 2.5 results in 8.4 which is correct but 5.7 - 2.5 results in 7.2.</p>
  <p>I make the exponents even and then subtract the mantissas and then combine them.
  For now the sign is automatically 0 because I first want to make it work with positive numbers</p>
  <p>Here is the code:</p>
  <pre><code>; expands a floating point number into sign, exponent and fraction
  %macro expand 1
      push rax
      mov eax, %1
      rol eax, 1
      mov byte [sign], al
      and byte [sign], 1
      rol eax, 8
      mov byte [exponent], al
      shr eax, 9
      or eax, 800000h
      mov dword [fraction], eax
      pop rax
  %endmacro
  
  ; combines sign, exponent and fraction to make a floating point number
  %macro combine 1
      push rsi
      push rcx
      push rax
      push rbx
      push rdx
      mov esi, %1
      xor ecx, ecx
      mov eax, [fraction]
      mov ebx, [exponent]
      mov edx, [sign]
      shrd ecx, eax, 23
      shrd ecx, ebx, 8
      shrd ecx, edx, 1
      mov dword [esi], ecx
      pop rdx
      pop rbx
      pop rax
      pop rcx
      pop rsi
  %endmacro
  
  section .bss 
      result resd 1
  
  section .data
      source dd 5.7
      source2 dd 2.5
  
  section .text
      global _start 
  
      _start:
          xor ebx, ebx
          expand [source]
          ; store expanded parts in these registers
          mov bl, [exponent]
          mov eax, [fraction]
          mov cl, [sign]
          expand [source2]
  
          ; make exponents even
          while:
              cmp [exponent], bl
              jnl endwhile
              inc byte [exponent]
              shr dword [fraction], 1
              jmp while
          endwhile:
  
          while2:
              cmp bl, [exponent]
              jnl endwhile2
              inc bl
              shr eax, 1
              jmp while
          endwhile2:
  
  
          ; make operand 2 negative and then add them together
          neg dword [fraction]
          add eax, dword [fraction]
          mov [fraction], eax
          mov [exponent], bl
          mov byte [sign], 0
          combine result
          mov edx, [result]
  
          exit
  </code></pre>