Classic Computer Magazine Archive COMPUTE! ISSUE 73 / JUNE 1986 / PAGE 73

Sideways Text For Atari

Bill Morris

Here's a short machine language routine that converts your lowercase letters (a-z) to uppercase sideways letters. Why? Well, it's so short that it's worth typing in just to see the amusing effect, but it's also useful for labeling charts and designing one-of-a-kind title screens. The program works on any Atari 400/800, XL, or XE.


Wouldn't it be nice to have sideways letters that could be displayed anywhere on a GRAPHICS 0 screen? Imagine the interesting title displays you could add to programs. Or, from a more practical standpoint, sideways letters could be more than just a show-off effect for charting programs-they could become a necessity.
    One way to get sideways letters is to spend a couple of hours with graph paper or a character editor to redefine the lowercase character set. But that would be the hard way. Such a laborious task is best left to a labor-saving device such as your Atari computer.
    The program below contains a machine language routine that decides where in memory to place the new character set, relocates the set to that area, changes the character base pointer, erases the lowercase alphabet, and replaces it with uppercase letters that are rotated 90 degrees to the left.
    You might notice that the machine language routine doesn't contain any data to define what the sideways letters should look like. Instead, it actually flips each letter mathematically before relocating it in memory. It does all this in about one second and takes up less space in your BASIC program than would the DATA statements alone if you were doing it the hard way.

Sideways Text In Action
If you want to see sideways text on your own computer screen, just type in the program, save a copy on disk or tape, and then run it. What you'll see is the word SIDEWAYS displayed in GRAPHICS 0 actually turned sideways. Next to this you'll see the word TEXT in normal letters.
    Everything appears on a light screen with dark characters. On the normal default screen of white let ters on a blue background, the sideways text can be hard to read, so dark letters are preferable. Also, for charts, you might want to blank out the screen borders by adding this line:

95 POKE 712,PEEK(710)

    Lines 40-90 POKE the machine language routine into memory page 6, but once the routine is executed, you can reuse this memory for some other purpose without affecting the sideways text. It stays sideways until you press SYSTEM RESET.

Sideways Text For Atari
For instructions on entering this listing, please
refer to "COMPUTEI's Guide to Typing In
Programs" in this issue of COMPUTE!.


IK 10 ? CHR$ (125)
JA 20 POKE 559,0
NF 30 GOSUB 20000
MJ 40 POKE 559,34
BE 50 X=USR (1536)
FM 60 POKE 710, 158: POKE 709,
      0
FN 70 ? " s"
GE 80 ? " y"
EN 90 ? " a"
NA 100 ? " w TEXT"
HK 110 ? " e"
HK 120 ? " d"
IA 130 ? " i"
IL 140 ? " s"
BJ 150 ? " "
60 160 END
BL 20000 FOR A=1536 TO 1715:
         READ B:POKE A,B:NEX
         T A:RETURN
MC 20010 DATA 104,165,89,56,
         233,4
BK 20020 DATA 141,244,2,133,
         205,169
BK 20030 DATA 224,133,207,16
         9,0,133
BB 20040 DATA 204,133,206,16
         2,0,160
BG 20050 DATA 0,177,206,145,
         204,200
IB 20060 DATA 208,249,230,20
         5,230,207
OO 20070 DATA 232,224,4,208,
         238,32
FL 20080 DATA 167,6,160,0,16
         9,0
IC 20090 DATA 145,204,200,19
         2,216,208
JB 20100 DATA 249,32,167,6,1
         69,0
LM 20110 DATA 141,186,6,141,
         182,6
MB 20120 DATA 141,183,6,169,
         8,141
MF 20130 DATA 184,6,141,185,
         6,174
CJ 20140 DATA 182,6,169,128,
         141,181
GB 20150 DATA 6,172,183,6916
         9,1
LP 20160 DATA 141,180,6,189,
         0,225
IO 20170 DATA 45,180,6,205,1
         80,6
PI 20180 DATA 208,8,177,204,
         24,109
CG 20190 DATA 181,6,145,204,
         173,180
HI 20200 DATA 6,10,141,180,6
         ,200
CC 20210 DATA 204,185,6,208,
         224,173
IN 20220 DATA 181,6,74,141,1
         81,6
CB 20230 DATA 232,236,184,6,
         208,203
MD 20240 DATA 173,184,6,141,
         182,6
IL 20250 DATA 141,183,6,24,1
         05,8
MD 20260 DATA 141,184,6,141,
         185,6
ND 20270 DATA 238,186,6,173,
         186,6
DA 20280 DATA 201,27,208,167
         ,96,173
IF 20290 DATA 244,2,24,105,3
         ,133
OO 20300 DATA 205,169,0,133,
         204,96