WIP on FCB disk i/o

This commit is contained in:
Nero 2019-10-08 17:54:39 +00:00
parent 58a95932b5
commit 7877809bc1
6 changed files with 95 additions and 103 deletions

14
lib/log2.asm Normal file
View file

@ -0,0 +1,14 @@
; Calculate dual logarithm (int)
; IN AX number
; OUT AX dual logarithm
log2:
push cx
mov cx, 16
.loop:
sar ax, 1
loopnz .loop
xchg ax, cx
pop cx
neg ax
add ax, 15
ret