Mail Archives: djgpp/1997/12/10/20:20:15
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
- Raw text -