www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/25/01:16:32

Message-ID: <34F3B710.7E67@post.comstar.ru>
Date: Wed, 25 Feb 1998 09:15:44 +0300
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: Comstar Ltd.
MIME-Version: 1.0
To: JAP <jap AT mundivia DOT es>
CC: DJGPP Mail List <djgpp AT delorie DOT com>
Subject: Re: Xpressions
References: <6cun1l$qct$1 AT talia DOT mad DOT ibernet DOT es>

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, &regs);
> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019