Hi,

> At present, the interface program for Logger just performs a slightly 
> optimized brute force search for the Logger device driver. Although reliable, 
> it is very slow compared to providing a simple interrupt call to test for 
> installation.

given that this detection will be done once per program start: how many 
microseconds do you expect to save?

>  Looking at the different interrupts, I think I have come up with a solution 
> that will work well for Logger and any other driver or program that needs 
> such a check. So, I’d like to propose a “standard” we could use. I’d like to 
> get your feedback on what I’m thinking…

setting a "standard" which is used probably exactly once ? we write year 2023 ;)

https://xkcd.com/927/

INT 2D has been mentioned by others



> Looking at RBIL, interrupt 0x2b is barely used by anything. Under MS-DOS and 
> FreeDOS, this simply points to an IRET. Under IBM ROM-DOS, AH functions 
> 0x00-0x03 do some things. But, all other calls do nothing. 

>  https://fd.lod.bz/rbil/interrup/dos_kernel/2b.html 
> <https://fd.lod.bz/rbil/interrup/dos_kernel/2b.html>

> An install check issuing this interrupt would be simple to perform. A program 
> could set the Carry Flag, load AH/AX with “check for install” function and 
> set DS:BX to point to an identifier string (minimum 8 characters, no 
> maximum). Then call the interrupt. On return, if the Carry Flag is still set, 
> then the install check failed. If the Carry Flag is clear, it succeeded and 
> other register would be modified to according to the needs of the programs. 

> Implementation for Logger (as an example) could be:

>         
> CHECK:
>         push cs
>         pop  ds                         ; set DS to our code segment
>         stc                             ; set the carry flag            
>         mov  ax, 0xfd00                 ; set AX to install check function
>         mov  bx, LOGGER_ID              ; offset to LOGGER device driver ID
>         int  0x2b                       ; call install check interrupt
>         jc   NOT_INSTALLED              ; nothing changed, driver is not 
> loaded

                                           ;you should add 
          cmp ax, MAGIC_VALUE
          jne   NOT_INSTALLED

your proposed INT2B might be used by some other software that for some crazy 
reasons 
clears the carry flag.

anyway, INT2D is probably the better choice anyway.



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

Reply via email to