Date: Wed, 11 Oct 2000 07:32:04 +0530 Message-Id: <200010110202.HAA01248@midpec.com> From: Prashant TR To: pdestroy AT netcabo DOT pt CC: djgpp AT delorie DOT com In-reply-to: <8s01vs$2ta$1@venus.telepac.pt> (pdestroy@netcabo.pt) Subject: Re: Getting char References: <8s01vs$2ta$1 AT venus DOT telepac DOT pt> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk | From: "Paulo J. Matos aka PDestroy" | Date: Tue, 10 Oct 2000 22:33:11 +0100 | DJ-Gateway: from newsgroup comp.os.msdos.djgpp | | I need a function of reference to a library to get a char from the screen. I | want to know what char is at a (x,y) position on screen. How can I do that? You could read the video memory directly. It starts at 0xb8000 for color and 0xb0000 for mono (linear address). You could use a calculation like this: char c = _farpeekb (_dos_ds, 0xb8000 + 160 * x + y * 2); (I'm assuming the coordinates are zero based). -- Prashant TR Web: http://www.midpec.com/