home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / pascal / 5058 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  944 b 

  1. Path: sparky!uunet!gatech!news.ans.net!cmcl2!adm!news
  2. From: S105728@umrvma.umr.edu ( Steve Poulsen)
  3. Newsgroups: comp.lang.pascal
  4. Subject: re: read char from screen
  5. Message-ID: <32203@adm.brl.mil>
  6. Date: 26 Aug 92 03:23:52 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 21
  9.  
  10. Have a pointer point to the absolute address of [B800:0000] for color or
  11. [B000:0000] in mono.  Use a record like:
  12.  
  13. Location = Record
  14.   Character:Byte;
  15.   Attribute:Byte;
  16. End;
  17.  
  18. Screen = Record
  19.   Memory: Array [1..2000] Of Location;
  20. End;
  21.  
  22. Then declare a var of Screen absolute.  To read a char just figure
  23. the row and column (start at 0,0)  Screen.Memory[x+y*80].Character
  24. You can also use a better record of double array for x and y.
  25.  
  26. ========================================      ,--,
  27.   Steven P. Poulsen <S105728@UMRVMA>       ,'  '--,
  28.   Student of Electrical Engineering        ---, ,'
  29.   University of Missouri - Rolla            ,','
  30. =======================================    , '
  31.