diff --git a/com/@rdos.asm b/com/@rdos.asm index f3fb108..83e817a 100644 --- a/com/@rdos.asm +++ b/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 diff --git a/kernel/far.asm b/kernel/far.asm index 239cd2b..a799241 100644 --- a/kernel/far.asm +++ b/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 diff --git a/rom/uartctrl.asm b/rom/uartctrl.asm index b5bd775..ae0ced3 100644 --- a/rom/uartctrl.asm +++ b/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