diff options
Diffstat (limited to '')
-rw-r--r-- | kernel/src/cpu/fpu.asm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/src/cpu/fpu.asm b/kernel/src/cpu/fpu.asm new file mode 100644 index 0000000..e49ab6f --- /dev/null +++ b/kernel/src/cpu/fpu.asm @@ -0,0 +1,19 @@ +global fpu_init + +fpu_init: + mov edx, cr0 + and edx, (-1) - ((1 << 3) + (1 << 4)) + mov cr0, edx + fninit + fnstsw [test] + cmp word [test], 0 + jne no_fpu + + xor eax, 0 + ret + +no_fpu: + mov eax, 1 + ret + +test: dw 0x55AA |