Character Set Rotation

Date: 1984
Type: Program
Platform(s): TS 2068
Tags: Font

An 80-byte machine-code routine that rotates the character set 90 degrees counterclockwise, with or without mirror imaging. An initialization routine (USR 64324) copies the ROM characters to RAM at FC00; the rotate routine (USR 64256) turns every character a quarter turn, and POKE 64281,9 before one call adds a mirror image. The demo prints the alphabet in all four rotations and then mirrored.

Only text printed after a rotation changes, because the TS2068 has a bit-mapped display. In the article you enter the bytes with a short INPUT/POKE program and save them as “rotate” CODE; the tape here has that CODE block and the demo, with a two-line loader added in front that loads both. Type RUN after loading.

Published in Syntax June 1984 (Character Set Rotation).

Related Articles

This machine code routine allows you to rotate the character set in any of four directions, with or without mirror imaging it.

Image Gallery

Source Code

   5 CLEAR 64255
  10 LET init=64324
  20 LET rot=64256
  30 LET mir=64281
  35 PRINT "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  36 PRINT
  40 RANDOMIZE USR init
  50 POKE 23606,0: POKE 23607,251
  55 FOR x=1 TO 4
  60 RANDOMIZE USR rot
  70 PRINT "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  75 NEXT x
  77 PRINT
  80 POKE mir,9
  90 RANDOMIZE USR init
  95 RANDOMIZE USR rot
 100 POKE mir,1
 105 FOR x=1 TO 4
 110 RANDOMIZE USR rot
 120 PRINT "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 130 NEXT x
 160 RANDOMIZE USR init

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.