The TRS-80 had very rudimentary graphics. Little rectangles could be displayed to a maximum of 128 squots (square dots) across by 48 down, always beginning with row 0.
Squots could be put onto the screen with the SET(X,Y) command, removed with the RESET(X, Y) command, and checked for on/off status with the POINT (X, Y) command.
However, using SET/RESET was the slowest way to manipulate graphics and to do anything approximating gaming one would need another method.
In addition to the SET/RESET to control each squot, the TRS-80 had a character set which would include a 2 x 3 squot matrix. These characters, from 128 through 191, ran the gamut from completely off/black (128) to completely on (191), and everything in between.
The 2 x 3 matrix running from 128 to 191 was actually an 8-bit binary representation of a 7 bit number "1xxxxxxx" so if you wanted the top two squots it would be "10000011", the middle 2 squots would be "10001100", etc. The actual CHR$(xx) representations appear below on this page.
If you don't want to construct the block from that kind of binary, think of them as their decimal representations. The top 2 boxes would be 1 and 2. The middle boxes would be 4 and 8. The bottom boxes would be 16 and 32. So if you wanted a block that had only the left 3 lit up, you would add 1, 4, and 16 to the base of 128, which would give you CHR$(149) or
.
But there's more!! While you could use PRINT and PRINT@ to put those CHR$(xxx) matrices on the screen (putting up 6 squots at once), you could also pack them into strings and move those strings around. This is called "String Packing" and is virtually identical to the packing technique used in embedding machine language routines in BASIC programs. String Packing is explained on the String Packing page.
(Unknown).jpg)
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191