Kernel: Fix segmenting bugs
This commit is contained in:
parent
39a1ed085c
commit
d9affa3cae
3 changed files with 23 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue