Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Device drivers: Changing the attribute word at install time? (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 03.10.2023, 20:56

> The sentence says the driver install routine is called first, and then the
> attributes are evaluated. Which makes sense as there is no need to worry
> about driver chains or attributes if the install routine in the driver
> errors out.

UPX sources indicate that "OpenDOS" wants the interrupt field untouched by the packer, that is it may read it before running the unpacker (strategy entrypoint).

https://github.com/upx/upx/blob/7f9d381c7b594ecf7d...f3c0f16527599/src/stub/src/i086-dos16.sys.S#L42

https://github.com/upx/upx/blob/7f9d381c7b594ecf7d...f3c0f16527599/src/stub/src/i086-dos16.exe.S#L34

section         DEVICEENTRY
                .long   -1
                .short  attribute
                .short  strategy        /* .sys header */
                .short  interrupt       /* opendos wants this field untouched */


Here's this part in EDR-DOS, an OpenDOS derivative: https://hg.pushbx.org/ecm/edrdos/file/e1dbcad5136e/drbio/config.a86#l556


        mov     ax,es:DH_STRATEGY[di]   ; Set up the STRATEGY Entry Point
        mov     strategy_off,ax
        mov     strategy_seg,es

        mov     ax,es:DH_INTERRUPT[di]  ; Set up the INTERRUPT Entry Point
        mov     interrupt_off,ax
        mov     interrupt_seg,es
        call    init_static_request


Evidently it does read both entrypoint offsets before calling the strategy during device initialisation.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 85 users online (0 registered, 85 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum