Atari Screen Display Toggle
Frank Murphy
A press of a key speeds up your Atari by 30 percent when you use this short utility. It's compatiable with most languages, including Atari BASIC and many assemblers and compilers. A disk drive is required.
When you run a BASIC program, or when you assemble or compile programs in other languages, your computer is fighting against itself. In one corner is the 6502 microprocessor, doing its best to run your program at 1.78 megahertz. In the other corner is the Antic video chip which has the job of constantly updating your screen. Antic turns off the 6502 repeatedly to look at screen memory and character definitions. "Atari Screen Display Toggle" lets you turn the Antic chip off or on with a single keypress—speeding your computer up by as much as 30 percent. Of course, the price to pay for turning off Antic is a blank screen.
Typing It In
Type in program 1 and save a copy to disk. Since the program requires accurate entry, be sure to use "The Automatic Proofreader" program located elsewhere in this issue when you type it in.
Load Program 1 and type RUN. You are asked to choose whether you want to save the programs as a binary file or POKE it directly in memory. If you're going to be using the program in BASIC, Choose P, for Put into memory. Choose C, for Create disk file, to be able to use Screen Display Toggle from within any language. If you choose this option, you must create a filename for the program. I suggest a name like SDT.OBJ.
If you choose to create a binary file, go to the DOS menu and select L, Binary Load. When you are asked for a filename, respond with the name you used to create the file. If you are using an alternative DOS like OS/A+ or DOS XL, simply type the name of the file at the DOS prompt.
Screen Display Toggle (SDT) is ready. Press SHIFT-CTRL-S to blank the screen and speed up the computer. Repeat the keystroke to return the screen to normal. Whenever you need an extra burst of speed, SDT is the answer.
Program 2 is the source code for SDT. You do not need to enter this program to use Atari Screen Display Toggle—it is included for those interested in machine language programming. The program, as written, is assembled into the cassette buffer. Those who wish to use the program with a cassette drive can assemble the program at another location (two possibilities are $100 and $600).
Program 1: Atari Screen Display Toggle
For instructions on entering this program, please refer to "COMPUTE!'s Guide to Typing In Programs" elsewhere in this issue.
NO 1 REM COPYRIGHT 1987 COMPUTE! PUBLICATIONS, INC. (3 SPACES) ALL RIGHTS RESERVED. IA 2 PRINT "{CLEAR}" B6 5 DIM X $ (40) : OPEN # 2, 4, 0, "K:": POKE 752, 1 BB 10 PRINT "{10 SPACES} COPYRIGHT 1987":PRINT "{5 SPACES}COMPUTE! PUBLICATIONS, INC.": PRINT "{8 SPACES} ALL RIGHTS RESERVED." A0 20 ? :? :? "Put into memory, or Create Disk File?" JI 25 GET #2, X : X $ = CHR $ (X) : IF (X $ < > "P") AND (X $ < > "C")THEN 25 MG 30 IF X $ = "C" THEN 50 KC 40 RESTORE 130 : FOR X = 1026 TO 1072 : READ Y : POKE X, Y : NEXT X : POKE 1024, PEEK (520): POKE 1025, PEEK (521) GC 45 POKE 520, 2 : POKE 521, 4 : POKE 752, 0 : END EA 50 POKE 752, 0 :? :? "Enter On : Filename:" ; : INPUT #16, X $ DD 60 IF (X $ (2, 2) <> ":") AND (X $ (3, 3) <> ":") THEN GO SUB 95 EL 70 OPEN # 1, 8, 0, X $:FOR X = 1 TO 53 : READ Y: PUT # 1, Y : NEXT X : CLOSE # 1 : POKE 752, 0 : END MB 95 X = LEN (X $) : X $ (20) = X $ : X $ (1, 2) = "D : " : X $ (3) = X $ (20) : X $ (1, X + 3) = "" : RETURN AP 100 DATA 255, 255 DO 110 DATA 2, 4 HD 120 DATA 42, 4 PD 130 DATA 173, 9, 210, 201, 254 PP 140 DATA 208, 8, 173, 74, 2, 73 CD 150 DATA 254, 141, 47, 2, 108, 0 IM 160 DATA 4, 173, 8, 2, 141, 0 IP 170 DATA 4, 173, 9, 2, 141, 1 JF 180 DATA 4, 169, 2, 141, 8, 2 NE 190 DATA 169, 4, 141, 9, 2, 96 LH 200 DATA 226, 2, 227, 2, 20, 4
Program 2: SDT Source Code
0100 ;---------------------------; 0110 ; Source Code: Screen Toggle ; 0120 ;---------------------------; 0130 ; Copyright 1987 COMPUTE! PUBL.,; 0140 ;INC. ALL RIGHTS RESERVED ; 0150 ;-----------------------------; 1000 KBCODE = $ D209 1010 SDMCTL = $ 022F 1020 OLDVEC = $ 0400 1030 VKEYBD = $ 0208 1990 START = $ 0402 1995 *= START 2000 ; This is where the new interrupt 2010 ; routine is handled. 2020 ; 2030 LDA KBCODE 2040 CMP # $FE ; Check for SH-CT-S 2050 BNE NEXT 1 2060 LDA SDMCTL ; 2070 EOR # $ FE ; Toggle Display 2080 STA SDMCTL; 2090 NEXT 1 2100 ; New functions follow.... 2990 JMP (OLDVEC) 3000 ; 3005 ; Initialize our new routine 3010 ; 3015 INIT 3020 LDA VKEYBD ; You can write 3030 STA OLDVEC ; your own prgs. 3040 LDA VKEYBD + 1 ; that make use 3050 STA OLDVEC + 1 ; of VKEYBD's 3060 LDA #START&255 ; vector by using 3070 STA VKEYBD ; code similar to 3080 LDA #START/256 ; this with your 3090 STA VKEYBD + 1 ; own routine's 3100 RTS ; address. 9000 ;