Date: Wed, 10 Dec 1997 17:18:15 -0800 (PST) Message-Id: <199712110118.RAA12569@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Charles Krug , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Storing text screens in protected mode? Precedence: bulk At 09:03 12/10/1997 -0500, Charles Krug wrote: >One of my favorite real mode tricks is to have my text screens stored in >an integer array. Reletively simple to do in real mode--just set SI to >point to the screen buffer, DI to my array, CX to the buffer size and >"rep stosw" it over. This was a very important trick on 8088 >systems--though it's less important now. > >Question--is it possible to get the base address of the screen buffer in >protected mode or is it necessary to go back to real mode to do this You can do something like this: char buffer[4096]; /* or whatever */ movedata(_dos_ds,0xB8000,_my_ds(),buffer,4096); /* I think it's b8000 */ Read FAQ section 18.4 for more information, and the libc docs on `movedata'. Nate Eldredge eldredge AT ap DOT net