delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/11/01:15:23

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Getting char
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <pvs7usg07juqiikuggud824j6unn780ubc@4ax.com>
References: <8s01vs$2ta$1 AT venus DOT telepac DOT pt> <200010110202 DOT HAA01248 AT midpec DOT com>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 28
X-Trace: /KHlxMWUeq7KeoZh3i+kEdK/cXmSF5zvh4LCpcw6U3PwG6TuP0AgmpjKmAnZ06DsvSAq6eAExAKX!FY6XYw7NNXkgaD5KvrPJFEi/ygzC9H11QaqTVn6cAFTjJ/p8zMog2/ZWZ6fH48g8CliD7NTZ1zGG!cX8vZg==
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Wed, 11 Oct 2000 05:01:06 GMT
Distribution: world
Date: Wed, 11 Oct 2000 05:01:07 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Wed, 11 Oct 2000 07:32:04 +0530, Prashant TR <tr AT midpec DOT com> wrote:

>| From: "Paulo J. Matos aka PDestroy" <pdestroy AT netcabo DOT pt>
>| 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);

YM
unsigned char c = _farpeekb (_dos_ds, 0xb8000 + 160 * y + x * 2);
^^^^^^^^                                        ^^^^^^^   ^^^^^
Remember: row major.

-- 
<O
( \   GNOME vs. KDE: the game!
 X    http://pineight.8m.com/nes.htm

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019