Browse Source

Kernel: Fix segmenting bugs

master
Nero 5 months ago
parent
commit
d9affa3cae
  1. 9
      com/@rdos.asm
  2. 12
      kernel/far.asm
  3. 4
      rom/uartctrl.asm

9
com/@rdos.asm

@ -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

12
kernel/far.asm

@ -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

4
rom/uartctrl.asm

@ -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…
Cancel
Save