DOS/32 Advanced DOS Extender - Programmer's Reference 2.08 - DPMI function 0009h - Set Descriptor Access Rights Modifies the access rights and type fields in the descriptor table for the specified segment.
In: | AX = 0009h BX = selector CL = access rights/type byte CH = extended access rights/type byte
Out: | if successful: CF clear if failed: CF set AX = error code 8021h - invalid value (access rights/type bytes invalid) 8022h - invalid selector 8025h - invalid linear address (changing the access rights/type bytes would cause the descriptor to reference a linear address range outside that allowed for DPMI clients.)
> Notes: a) The access rights/type byte passed to the function in CL register has the following format:
> Bit | Designation | Description
> 0 | A | 0=not accessed, 1=accessed
> 1 | W/R | data: 0=read, 1=read/write code: must be 1 (readable)
> 2 | E/C | data: 0=expand-up, 1=expand-down code: must be 0 (non-conforming)
> 3 | C/D | 0=data, 1=code
> 4 | - | must be 1
> 5..6 | DPL | must equal caller's CPL
> 7 | P | 0=absent, 1=present
> The DPMI host interprets the value passed to the function in CH register as follows:
> Bit | Designation | Description
> 0..3 | - | reserved
> 4 | Av | can be 0 or 1
> 5 | - | must be 0
> 6 | B/D | 0=default 16-bit, 1=default 32-bit
> 7 | G | 0=byte granular, 1=page granular
b) DOS/32 Advanced DPMI and DPMI 1.0 hosts will reload any segment registers which contain the selector specified in register BX. c) Client programs should use the LAR instruction to examine the access rights of a descriptor. Copyright © DOS/32 Advanced Team 1996-2002 All Rights Reserved