Classic Computer Magazine Archive COMPUTE! ISSUE 54 / NOVEMBER 1984 / PAGE 10

READERS' FEEDBACK

The Editors and Readers of COMPUTE!

TI Reverse Flash

I own a TI-99/4A with Extended BASIC, but have programmed on a number of computers. Several of these computers, such as the Apple and Atari, have reverse video characters. Since the TI lacks reverse characters, I wrote the following short routine to simulate them:

100 REM INVERSE CHAR
110 CALL SCREEN (2)
120 FOR  I = 65 TO 90 :: CALL CHARPAT (1, A$) ::
    CALL CHAR (1 + 32, A$) :: NEXT  I
130 CALL CLEAR  
140 FOR I = 9 TO 12 :: CALL COLOR (1, 2, 16) ::
    NEXT I :: FOR I = 5 TO 8 :: CALL COLOR (1, 16, 2) :: NEXT I 
150 A$ = "INVERSE"
160 B$ = "inverse"
170 DISPLAY  AT (11, 11) : A$  ::  FOR  I = 1
    TO  50 :: NEXT  I :: DISPLAY AT (11, 11) : B$  ::
    FOR  1 = 1  TO 50 ::  NEXT I :: GO TO 170
180 END

This routine replaces the lowercase letters (produced with the ALPHA LOCK key up) with inverse capitals. First, in line 120, the CHARTPAT and CHAR subprograms replace the lowercase letters (characters 97–122) with capitals. Next, in line 140, color codes are assigned to the redefined characters to create inverse characters.

For added effect, a flashing routine similar to that produced with the Apple's FLASH command has been added in line 170.

J. P. Lester

Thank you for contributing this handy routine.