Cyjon
Cyjon copied to clipboard
FPU
Ok, I need some help with file fpu.asm
Procedure soler_fpu_float_to_fraction, should return INTEGER from FRACTION
eg.
in:
soler_fpu_precision dq 4 ; convert max 4 digits after "."
soler_fpu_float_result dq 5.076 ; float
out:
soler_fpu_precision dq 3 ; integer
soler_fpu_fraction dq 76 ; integer
soler_fpu_precision contains number of digits after "." soler_fpu_fraction contains integer of 076
FPU is hard to digest for me, and Bochs doesn't help with that...
Some explanation:
; this procedure wil change X to ZERO in variable soler_fpu_float_result
call soler_fpu_float_only ; X.Y > 0.Y