🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #32913

Re: Read Screen Character

#32913
From: Leo de Wit
Date: Sun, 19 Jun 1988 09:46
36 lines
2301 bytes
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.
Technical Details
Message-ID: <512@philmds.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!philmds!leo
References: <8806151250.AA29397@ucbvax.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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