home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / alt / hackers / 1327 < prev    next >
Encoding:
Text File  |  1992-08-29  |  1.7 KB  |  42 lines

  1. Newsgroups: alt.hackers
  2. Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!usenet.ins.cwru.edu!yamauchi
  3. From: yamauchi@ces.cwru.edu (Brian Yamauchi)
  4. Subject: YAFP: TRS-80 Super Graphics
  5. Message-ID: <YAMAUCHI.92Aug29141341@fox.ces.cwru.edu>
  6. Sender: news@usenet.ins.cwru.edu
  7. Nntp-Posting-Host: fox.ces.cwru.edu
  8. Organization: Case Western Reserve University
  9. Date: 29 Aug 92 14:13:41
  10. Approved: awjones@beacon.bloom.oh.us
  11. Lines:       30
  12.  
  13. ObHack: Anyone else remember TRS-80 "Super Graphics"?
  14.  
  15. The TRS-80 was capable of displaying character graphics (with
  16. butter-knife sharp resolution (128x72?) in two stunning colors (black
  17. and white) :-), but the catch was that it was impossible to actually
  18. enter graphics characters from the keyboard.  There were three
  19. conventional alternatives -- POKE bytes to screen memory (cumbersome),
  20. use CHR$ (slow), SET/RESET individual pixels (extremely slow).
  21.  
  22. Softside magazine published a hack to get around this.  First, define
  23. an empty string such as:
  24.  
  25. 10 A$ = "     "
  26.  
  27. In TRS-80 BASIC, string constants were stored in the memory locations
  28. for the _source_code_, so...  Insert code to use the VARPTR (variable
  29. pointer) function to find the memory location of A$.  Then POKE the
  30. bytes corresponding to your graphics into the location.  After running
  31. the program once, line 10 will look like:
  32.  
  33. 10 A$ = "<graphic-representation-of-an-alien-invader>"
  34.  
  35. Now, you can delete your VARPTR/POKE commands, and whenever you want
  36. to display your alien invader, simply PRINT A$ at the appropriate
  37. point in the screen.
  38.  
  39. I realize that this hack isn't likely to be much use to those hacking
  40. C++ for X or SVGA displays, but I thought it was an cute example of
  41. self-modifying code from the primeval days of personal computing...  :-)
  42.