Sender: nate AT cartsys DOT com Message-ID: <35C35B39.D65F9006@cartsys.com> Date: Sat, 01 Aug 1998 11:15:21 -0700 From: Nate Eldredge MIME-Version: 1.0 To: Bjorn Hansen CC: djgpp AT delorie DOT com Subject: Re: Selectors References: <35C22C8B DOT 3C5A1465 AT xyz DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Bjorn Hansen wrote: > > I'm trying to write to the VGA buffer and from what I've read it > looks like I have to use the _far* functions but I am a litte confused > by them. forst of all I don't know which one to use because there are 3 > or four of each poke and peek. There are separate ones to peek/poke a byte, word, or long-word (32 bits). You will probably want the byte ones. There are also the `ns' family, but don't worry about them to start with. > More importantly( I think) is that I > realy have no clue what a selector is which I have to specefy. It's analagous to the segment in real mode. It specifies (indirectly) the address and size of the region you want to work in. Since the area you want is in conventional memory, you can use the predefined selector `_dos_ds' with an offset of `seg << 4 + ofs' (i.e. 0xA0000), and not have to worry about it beyond that. -- Nate Eldredge nate AT cartsys DOT com sses are 32 bits. The calling conventions of the compiler are different from what they assume. Furthermore, the syntax of the assembler is different (it uses AT&T syntax). I expect that chapter will be of little help to you for a while. You might have a look at: http://www.rt66.com/~brennan/djgpp/djgpp_asm.html -- Nate Eldredge nate AT cartsys DOT com