From e024f72a4cf2be6bb65587f0df8d126b9f81ecb7 Mon Sep 17 00:00:00 2001 From: lpproj Date: Sat, 6 Feb 2016 13:32:36 +0900 Subject: [PATCH 1/2] Fix initial DTA --- kernel/intr.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/intr.asm b/kernel/intr.asm index 423bf9c..da14d5b 100644 --- a/kernel/intr.asm +++ b/kernel/intr.asm @@ -313,8 +313,8 @@ ALLOCMEM: global SET_DTA SET_DTA: pop ax ; ret address - pop bx ; seg(dta) pop dx ; off(dta) + pop bx ; seg(dta) push ax ; ret address mov ah, 1ah push ds From cab8092ad6c4e1060c52011ab2056b364bd1625d Mon Sep 17 00:00:00 2001 From: lpproj Date: Sat, 6 Feb 2016 13:43:34 +0900 Subject: [PATCH 2/2] Fix memory break in NUL device --- kernel/io.asm | 1 + kernel/kernel.asm | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/io.asm b/kernel/io.asm index 32d13af..ee8b30a 100644 --- a/kernel/io.asm +++ b/kernel/io.asm @@ -212,6 +212,7 @@ uUnitNumber dw 0 ; at any time. The request is stored into memory in the one and only ; location available for that purpose. ; + global GenStrategy GenStrategy: mov word [cs:_ReqPktPtr],bx mov word [cs:_ReqPktPtr+2],es diff --git a/kernel/kernel.asm b/kernel/kernel.asm index 3e97279..9892844 100644 --- a/kernel/kernel.asm +++ b/kernel/kernel.asm @@ -287,10 +287,9 @@ segment CONST ; NUL device strategy ; global _nul_strtgy + extern GenStrategy _nul_strtgy: - mov word [cs:_ReqPktPtr],bx ;save rq headr - mov word [cs:_ReqPktPtr+2],es - retf + jmp far GenStrategy ; ; NUL device interrupt @@ -299,7 +298,9 @@ _nul_strtgy: _nul_intr: push es push bx - les bx,[cs:_ReqPktPtr] ;es:bx--> rqheadr + mov bx,LGROUP + mov es,bx + les bx,[es:_ReqPktPtr] ;es:bx--> rqheadr cmp byte [es:bx+2],4 ;if read, set 0 read jne no_nul_read mov word [es:bx+12h],0