Classic Computer Magazine Archive ANTIC VOL. 6, NO. 2 / JUNE 1987

Tech Tips


COLDSTART IN BASIC
The following three shorties from Fred Olivas appeared in recent issues of the Santa Barbara Atari Computer Enthusiasts newsletter. You may have seen these tips before, but they are worth repeating.

Whenever you want to simulate a cold-start (reboot the disk) in your own BASIC programs, use this statement:

X=USR(52487)

COLDSTART FROM RESET
If you would like your computer to reboot when [RESET] is pressed, use one of the following in your BASIC program:

X=USR(61783) or POKE 580,1

NO QUESTION?
If you would like an INPUT statement not to give the annoying "?" try this:

100? "ENTER NAME: ";:INPUT #16,N$



DRIVE SPEED CHECK
If you are experiencing disk errors, your disk drive may not be operating at the correct speed. Atari disk drives normally run at about 288 RPM. If yours varies by more than three RPM from this figure, you should have your disk drive adjusted. The following program is a shortened version of one we have seen credited to the July 1985 newsletter of the San Diego Computer Enthusiasts.

   10 DR=l:DIM DR$(6):DR$="D1:* *"

20 XIO 3,#2,4,0,DR$:POKE 764,255

30 ? CHR$(125);"INSERT DISK IN DRIVE ";CHR$(48+DR)

40? " AND PRESS ANY KEY..."

50 IF PEEK(764)= 255 THEN 50

60 ? :? "PRESS [RESET] TO END

70 FOR I=1536 TO 1627:READ D:POKE I,D

80 NEXT I:POKE 1537,DR:GRAPHICS 2+16

90 X=USR(1536)

100 SP = PEEK(1662) + PEEK(1663) * 256

110 SP=INT(24*3600/SP+0.5)

120 POSITION 0,5:? *6,SP:GOTO 90

200 DATA 169,0,141,l,3,141,11,3,169,82,141,2,3,169,62,141,5,3,32,83,228,169,0,

141,4,3,141,128,6,141

210 DATA l0,3,141,129,6,141,130,6,133,20,133,19,133,18,32,83,228,166,20,138,

237,128,6,142,128,6,16,2,105,255

220 DATA 174,129,6,201,18,48,l,232,232,138,201,24,16,6,142,129,6,76,44,6,165,

19,141,127,6,165,20,141,126,6,104,96

ROM AND BASIC TEST
Some of us are still confused as to which versions of the graphics chip, ROM chip and BASIC are in our computer. The following program sent in by James Keho of Glendale, Arizona will end the confusion.

   100 DIM R$(1),B$(1)

115 POKE 53278,0:GRAPHICS 18

120 POKE 53248,0:POSITION 1,3:? #6;"THIS ATARI HAS THE:"

125 POSITION 4,5:? #6;CHR$(71-PEEK(53252));"TIA CHIP"

130 IF PEEK(58383)=0 THEN 150

140 R$="A":GOTO 180

150 R$="B"

180 ? #6;" OS ROM VER. ";R$

190 P=PEEK(43234):IF P=162 THEN B$="A"

200 IF P=96 THEN B$="B"

210 IF P=234 THEN B$="C"

220 ? #6;" BASIC VER. ";B$

230 GOTO 230

FILE READER
Here's a routine that will allow you to read disk files without having to TRAP the end-of-file error. It was sent in by David Tallent of Stone Mountain, Georgia.

   100 DIM A$(1000):CHAN=3

110 OPEN #CHAN,4,0, "D:FILENAME.TXT"

120 INPUT #CHAN,A$:PRINT A$

130 IF PEEK(835+CHAN * 16)<>3 THEN 120

140 CLOSE #CHAN:END

This routine should work for all text files except one opened for a directory. The variable A$ should be DiMmed big enough to hold any amount of text in your file between carriage returns. CHAN is set equal to whatever channel you wish to use.



If you have a Tech Tip that you would like to share with other readers, send it along to Antic Tech Tips, 544 Second Street, San Francisco, CA 94107 You might get your name in print. We always welcome very short programs that demonstrate the Atari's powers, simple hardware modifications, or useful macros for popular software


IF YOU'D ENJOY SEEING MORE ARTICLES LINE THIS ONE, CIRCLE 184 ON THE READER SERVICE CARD.