Device drivers: Changing the attribute word at install time? (Developers)
> 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:
- Device drivers: Changing the attribute word at install time? - mbbrutman, 02.10.2023, 23:47 (Developers)
- Device drivers: Changing the attribute word at install time? - glennmcc, 03.10.2023, 03:43
- Device drivers: Changing the attribute word at install time? - mbbrutman, 03.10.2023, 20:21
- Device drivers: Changing the attribute word at install time? - ecm, 03.10.2023, 20:56
- Device drivers: Changing the attribute word at install time? - mbbrutman, 03.10.2023, 21:26
- Device drivers: Changing the attribute word at install time? - tkchia, 03.10.2023, 21:32
- Device drivers: Changing the attribute word at install time? - mbbrutman, 03.10.2023, 22:48
- Device drivers: Changing the attribute word at install time? - tom, 04.10.2023, 23:43
- Device drivers: Changing the attribute word at install time? - tkchia, 03.10.2023, 21:32
- Device drivers: Changing the attribute word at install time? - mbbrutman, 03.10.2023, 21:26
- Device drivers: Changing the attribute word at install time? - ecm, 03.10.2023, 20:56
- Device drivers: Changing the attribute word at install time? - tkchia, 03.10.2023, 21:28
- Device drivers: Changing the attribute word at install time? - mbbrutman, 03.10.2023, 22:51
- Device drivers: Changing the attribute word at install time? - bretjohn, 06.10.2023, 21:35
- Device drivers: Changing the attribute word at install time? - mbbrutman, 07.10.2023, 20:42
- Device drivers: Changing the attribute word at install time? - bretjohn, 09.10.2023, 19:17
- Device drivers: Changing the attribute word at install time? - mbbrutman, 02.11.2023, 19:39
- Device drivers: Changing the attribute word at install time? - bretjohn, 09.10.2023, 19:17
- Device drivers: Changing the attribute word at install time? - mbbrutman, 07.10.2023, 20:42
- Device drivers: Changing the attribute word at install time? - bretjohn, 06.10.2023, 21:35
- Device drivers: Changing the attribute word at install time? - mbbrutman, 03.10.2023, 22:51
- Device drivers: Changing the attribute word at install time? - Rugxulo, 23.11.2023, 22:15