Kernel: Fix segmenting bugs
This commit is contained in:
parent
39a1ed085c
commit
d9affa3cae
@ -23,15 +23,20 @@ init: call rstseg
|
||||
|
||||
call rstseg
|
||||
mov dx, testdta
|
||||
push ds
|
||||
call norm
|
||||
call setdta
|
||||
pop ds
|
||||
|
||||
mov dx, testfcb
|
||||
call norm
|
||||
|
||||
call open
|
||||
|
||||
int 3
|
||||
|
||||
call read
|
||||
|
||||
mov ax, [cs:testdta]
|
||||
mov cx, [cs:testdta+2]
|
||||
int 3
|
||||
|
||||
hlt: hlt
|
||||
|
@ -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
|
||||
|
@ -77,6 +77,10 @@ init push ax
|
||||
mov al, 8
|
||||
out dx, al
|
||||
|
||||
; DS = interrupt table
|
||||
xor ax, ax
|
||||
mov ds, ax
|
||||
|
||||
; hook video services
|
||||
; keep original ptr in intvec 47h for chaining
|
||||
mov ax, int10
|
||||
|
Loading…
Reference in New Issue
Block a user