Msg: 1155 *Conference*

12-23-91 18:19:21

From: ERIK FRANCIS

To : ALL

Subj: MODEL 100 GRAPHICS?

Where in Model 100 memory is the screen data located?  Where (or how) does it
know when a certain group of pixels is on or off?  I know the text memory is
located from FE00h to FF40h, but how about the pixels?  I saw a rather strange
algorith that was designed to detect whether a given pixxel was on or off . . .
I can't say I understood it, though.  It was in the game GRID.BA, but the
author claimed it had to blink the cursor.  It was:
 
PRINTCHR$(27)"P";:PRINT@INT(X/6)+40*(Y/8),;:Z=SGN((2^(YMOD8))AND
    PEEK((XMOD6)-20)):PRINTCHR$(27)"Q";:RETURN
 
The subroutine, according to the author, sets the pixel located at (X, Y) and
returns Z = 0 if the pixel is "on" (dark) or Z = 1 if it is "off" (light).
 
I can understand that it's doing, but why in the world must it be done in such
a roundabout way?