Kernel: Fix segmenting bugs

This commit is contained in:
Nero 2021-04-20 16:27:10 +00:00
parent 39a1ed085c
commit d9affa3cae
3 changed files with 23 additions and 2 deletions

View file

@ -32,3 +32,15 @@ xchgdes push ds
pop ds
pop es
ret
; normalize ptr in ds:dx
norm mov ax, ds
mov cl, 4
push dx
ror dx, cl
and dh, 0xF
add ax, dx
mov ds, ax
pop dx
and dx, 0xF
ret