Date: Sun, 26 Jan 1997 16:58:25 +0200 (IST) From: Eli Zaretskii To: Gregary J Boyles cc: djgpp AT delorie DOT com Subject: Re: Segment/Offset vs Selector/Offset. In-Reply-To: <5cd3ca$5eo@lion.cs.latrobe.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 25 Jan 1997, Gregary J Boyles wrote: > Can some one briefly explain offset/selector to me. > Is it similar to segment/offset where the high byte of an address is the segment > address and the low byte is the offset? Did you read section 18.4 of the DJGPP FAQ list (available as v2/faq210b.zip from the same place you get DJGPP)? I think it should explain these things to you; if not, ask specific questions about what's described there. > // Determines the height and width of the screen. > void WindowC::GetDimensions() > { > // We need a 64 byte buffer for the display info returned by the interrupt > // function. > static unsigned char Buffer[64]; > > Regs.w.bx=0x0; > > // Place the segment and offset into es:di. > SegRegs.es=Seg(Buffer); > Regs.w.di=Off(Buffer); The usual method is to use the transfer buffer for these things. Section 18.2 of the FAQ explains how to do that.