Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: sar AT maties DOT sun DOT ac DOT za, djgpp AT delorie DOT com Date: Thu, 19 Jun 1997 15:52:38 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: NASM - How to access vid ram inside DJ Precedence: bulk sar AT maties DOT sun DOT ac DOT za wrote: > Gil Myers wrote: > > > > acebear AT pukopn1 DOT puk DOT ac DOT za wrote in article > > <33A083D9 DOT 11AC AT pukopn1 DOT puk DOT ac DOT za>... > > > How would you write a NASM generated COFF .o that will make it possible > > > to directly access VGA memory (320x200) under DJGPP directly from an > > > external, NASM coded asm prog without the usual slew of segment > > > violation errors? > > >> Workaround one is to turn off protection. This is described in the FAQ, > > and the > > actual functions to do so are in the file SYS/NEARPTR.H. This is very > > dangerous. > > Why is it dangerous? I checked the FAQ & docs you refer to, they also > discourage it, but it looks like THE fastest method. Since memory > protection is there to prevent different programs in the same physical > memory of stepping on each other, and DJGPP always runs as the only > program in its memory space, what is the problem? Eli explained why that isn't true. In addition I can add that that isn't THE fastest method. In many cases is just as fast as far ptrs (where you don't loose protection), of course that depends on your program. I have a test that shows a simple situation (is a particular one but isn't so crazy because is the common situation) where you can see that nearptrs aren't faster than farptrs. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013