Hi Eric and Bret,

I looked at 2D, 2F and even absolute AMIS 7D. 

> On Apr 21, 2023, at 7:44 AM, Eric Auer <e.a...@jpberlin.de> wrote:
> 
> 
> Hi Jerome,
> 
> there is no need to allocate a whole int 0x2b for just one driver.

It need not be just for one driver. 

Anyone could hook 0x2b and is a very loose and light weight method with an 
extremely low possibility of collision or conflict. Also, nothing else uses 2B 
so it will not effect general system performance. We also don’t need to worry 
about Microsoft changing things and breaking it. 

> There are mechanisms which already invite drivers to share them :-)
> 
> INT 2D - ALTERNATE MULTIPLEX INTERRUPT SPECIFICATION (AMIS) [v3.6]
>        AH = multiplex number
>        AL = function
>            00h installation check
>            01h get private entry point
>            02h uninstall
>            03h request popup
>            04h determine chained interrupts
>            05h get hotkey list
>            06h get device-driver information
>            07h-0Fh reserved for future enhancements
>                Return: AL = 00h (not implemented)
>            other  application-dependent
>        other registers vary by function (also see individual entries below)
> 
> You also are in good company there, for example screen thief uses it.

https://fd.lod.bz/rbil/interrup/tsr/2d.html 
<https://fd.lod.bz/rbil/interrup/tsr/2d.html>

I was looking at it. It seems to require a good deal of additional overhead and 
complexity for just a “hey, where are you?” install check. Which will increase 
the memory resident footprint a little unnecessarily. 

However, it is an (at least partially) accepted “standard” and possibly the 
better solution and would not increase the footprint that much. It is 
definitely worth further consideration.

> 
> INT 2F - Multiplex - NOTES
>        AH = identifier of program which is to handle the interrupt
>           00h-3Fh reserved for IBM (for DOS)
>           40h-7Fh reserved for Microsoft (for DOS)
>           80h-B7h reserved for IBM
>           B8h-BFh reserved for networks
>           C0h-FFh reserved for applications
>        AL is the function code
>   This is a general mechanism for verifying the presence of a TSR and
>   communicating with it.
> 
> AMIS got introduced (by RBIL, sort of?) because so many apps use INT 2F,
> but if you only need an install check, performance is no issue and you
> can use INT 2F without problems.
> 
> You can also use INT 2F just for detection and then acquire a pointer
> to a fast call provided by your driver if you need something quick.

I don’t think 2F would be a good choice. In part, you have the network 
redirector and other filesystem related functions on that interrupt. Every hook 
that gets installed there takes a little slice of time to process. Which in 
turn, can slow down normal file operations. 

Also, I think that there is to high a risk of having a possible collision with 
2F with programs that just arbitrarily grab a fixed “unused” function to 
intercept.

> 
> Regards, Eric
> 

I think it comes down to either using 2D or 2B. I like 2B because there is 
almost no overhead and very simple to implement on both ends. But, 2D might be 
the better way to go and is a pre-existing semi-accepted standard.

:-)

Jerome

> 
> 
> _______________________________________________
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel

_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to