Hi!

6-Ноя-2005 19:50 [EMAIL PROTECTED] (Kenneth Davis) wrote to
[EMAIL PROTECTED]:

> +++ inthndlr.c        6 Nov 2005 19:50:34 -0000       1.87.2.19
> -              r.DX = 0xA2AB;  /* on succes DS:AX set to A2AB:B97Ch */
> +              r.DX = 0xA2AB;  /* on succes DX:AX set to A2AB:B97Ch */
> @@ -1839,29 +1859,89 @@
>                 */
>                r.DX = 0xA2AB;   /* on succes DS:AX set to A2AB:B97Ch */
----------------------------------------------^^ DX

> +++ entry.asm 6 Nov 2005 19:50:34 -0000       1.27.2.4
> +                mov  dx,[cs:_DGROUP_]
> +                mov  ds,dx

        mov     ds,[cs:_DGROUP_]

> +                cmp  word [_OemHook21], -1
> +                je   no_oemhndlr
> +                cmp  word [_OemHook21+2], -1
> +                je   no_oemhndlr

     This is "if (FP_OFF (OemHook21) != -1 && FP_SEG (OemHook21) != -1)",
which is not equal to "if (OemHook21 != -1)" _and_ prevents OemHook21 point
to HMA. I suggest, check only for offset is enough. (And in this case you
may restore DS right before JE.)

> +                pop  dx
> +                pop  ds
> +                jmp  far [ds:_OemHook21]  ; invoke OEM handler (no return)

     Looks like bug: if before "ds=cs:_DGROUP_" DS doesn't contains segment
of _OemHook21, then it willn't contain it after POP DS (and JMP then tries
to get jump address from wrong point). Else, if DS contains segment of
_OemHook21 before this code, then why MOV DS above?





-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to