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