Mail Archives: djgpp/1998/02/25/01:16:32
JAP wrote:
>
> Hi again.
> I don't understand how to compute the segment and the offset from the 32 bit
> address, for example, the __tb buffer in this VESA expression:
> __dpmi_regs regs;
> regs.x.ax=0x4f00;
> regs.x.es=(__tb >> 4) & 0xffff; /* segment */
> regs.x.di=__tb & 0x0f; /* offset */
> __dpmi_int(0x10, ®s);
> I don't know what these two expressions mean.
> Thanks.
Look at 'dosmemget' function description.
'>> 4' means shifting four bits right
'& 0x0f' means AND with 15 (15dec==0x0fhex==1111bin)
--
____ ____
| \ / Dim Zegebart
____/____
Moscow Russia
WWW - http://www.geocities.com/siliconvalley/pines/7817
DZcomm - comm library for Allegro
Palantir - multytasking kernel for Allegro (based on PDMLWP)
- Raw text -