Mail Archives: djgpp/1997/01/26/10:13:09
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.
- Raw text -