Message-ID: <34F3B710.7E67@post.comstar.ru> Date: Wed, 25 Feb 1998 09:15:44 +0300 From: Dim Zegebart Reply-To: zager AT post DOT comstar DOT ru Organization: Comstar Ltd. MIME-Version: 1.0 To: JAP CC: DJGPP Mail List Subject: Re: Xpressions References: <6cun1l$qct$1 AT talia DOT mad DOT ibernet DOT es> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk 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)