Path: utzoo!attcan!uunet!mcvax!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: Re: Read Screen Character Message-ID: <512@philmds.UUCP> Date: 19 Jun 88 09:46:00 GMT References: <8806151250.AA29397@ucbvax.Berkeley.EDU> Reply-To: leo@philmds.UUCP (L.J.M. de Wit) Organization: Philips I&E DTS Eindhoven Lines: 36 In article <8806151250.AA29397@ucbvax.Berkeley.EDU> U211510@HNYKUN11.BITNET (Wil Groenen) writes: >Dear readers, >I have a problem which some of you probably have encountered before, >that is reading a character from screen at current cursor position. >Somehow I have not been able to find the proper gemdos (?) function >call for this. Does anyone knows how to handle this, preferably in >Fortran or Pascal?? Sorry to disappoint you, but there is no trivial way to read a character from the screen. The ST has only graphics modes, no text modes as for instance the B.B.C or the MSX line of computers (storing characters in ASCII form in Ram). The MSX uses this feature for its screen editor. But, cheer up, there is a non-trivial way of doing it: you can match the bytes that form the character image against the TOS font(s) and return that character on a match or a space for instance if there is no match. This method was used by good ol' Sinclair Spectrum; that had a SCREEN$(row,col) function that returned the matching code for the image at (row,col). The Spectrum knew only one (graphics) mode. I'm planning to mail a screen dump program next week to the moderator of Comp.sources.atari.st; this program matches each character screen position against the TOS font and sends it to the printer. Really nice if you would like the compiler's output that is on the screen, or an error message, or a screenfull while you are in the editor, being dumped to the printer. It is as fast as just printing the text as a file. It uses a function that matches the character bit image at the position indicated. It is written in C (major 8-), so you could translate the source to Pascal or link the compiled C module. B.T.W. Speaking of languages, I thought you people in Nijmegen were all dedicated C/Unix hackers? Pascal ?????????? Fortran !"#$%^&*()_+=@~ %=) Leo.