Classic Computer Magazine Archive ANTIC VOL. 5, NO. 9 / JANUARY 1987

Tech Tips

BY BILL MARQUARDT, ANTIC TECHNICAL ASSISTANT

We continue to get queries about using the extra 16K RAM of Atari XL computers as a RAMdisk. The following approach to doing this came all the way from Australia, written by Larry Nocella of the New South Wales Atari Computer Enthusiasts.

1. Boot with DOS 2.5 and BASIC.
2. POKE 1802,PEEK(1802)+128
3. Type DOS and press [RETURN]
4. Write DOS with option [H].

Now type in the following program and RUN it to create an AUTORUN.SYS file on the same disk. Thereafter, when you boot with that disk you will have a 101-sector RAMdisk available as D8. After formatting, it will say, "499 Sectors Free." But don't believe it!

20 OPEN #l,8,0,"D:AUTORUN.SYS":TRAP 50
30 READ X:IF X=-1 THEN 50
40 PUT #1,X:GOTO 30
50 CLOSE #1:END
100 DATA 255,255,0,96,43,96,162,32,169,254,157,66,
3,169,39,57,68,3,169,96,157,69,3
110 DATA 169,0,157,74,3,157,75,3,32,86,228,173
120 DATA 10,7,24,216,105,128,141,10,7,96,68,56,58,
155,0,224,2,225,2,0,96,-1

STRING SEARCHER
The following program comes from Mark Brown in the September, 1986 issue of Current Notes, the magazine of the Washington Area Atari Computer Enthusiasts. Add these lines to the end of your BASIC program and type GOTO 32650. It will LIST the file to disk as D:TTT and search for all occurrences of any string you are searching for, highlighting them in inverse video.

32650 CLR:LIST "D:TTT",0,32649
32651 DIM A$(128),B$(20),C$(20)
32652 ? CHR$(125);"STRING TO BE SEARCHED
FOR";:INPUT B$:FOR I=1 TO LEN(B$):C$(I)=CHR$
(ASC(B$(I))+ 128):NEXT I:?
32653 OPEN #l,4,0,"D:TTT":TRAP 32658
32654 R=0:INPUT #1,A$:IF LEN(A$)<LEN(B$) THEN
32654
32655 FOR J=1 TO LEN(A$)-LEN(B$)+1:IF A$(J,J+LEN
(B$)-1)=B$ THEN A$(J,J+LEN(B$)-1)= C$:J=J+LEN
(B$)-1:R=1
32656 NEXT J:IF R=1 THEN ? A$;CHR$(253);CHR$
(253)
32657 GOTO 32654
32658 CLOSE #1

ST BASIC TEXT
If you prefer to use either ST Writer or 1st Word to type your ST BASIC listings, here is the best way to do it.

ST Writer:

1. Every line number should begin at the left margin. Do not indent.

2. End each line with a carriage return.

3. Erase any printer codes at the head of the BASIC program. Replace them with this line: [CONTROL]-L, 0, [SPACE], [CONTROL]-R, 3, 0, 0, [SPACE], [CONTROL]-T, 0, [SPACE], [CONTROL]-B, 0, [SPACE], [RETURN]. (Those are zeros, not the capital letter O.)

6. Put the cursor on the first line and type: [SHIFT]-F7, [RETURN], [ESC] followed by [CONTROL]-0, 1, 0, [SPACE], [RETURN], [ESC]. (Zeros again.)

7. When process is complete, PRINT the file to disk. You now have a usable ST BASIC program. This tip was written by Brian Duggan and appeared in the July-August issue of ASTUN (Atari ST Users News), Murray, Utah.

1st Word:

Just take 1st Word out of WP (word processor) mode by clicking on that menu option and type in your program. If you don't want to type in line numbers, use labels in your code where appropriate and RUN the following ST BASIC program after your source code is saved to disk and before you attempt to LOAD it with BASIC.

10 num=10
20 fullw 2:clearw 2:gotoxy 0,0
30 input "Input file: ";filel$
40 input "Output file: ";file2$
50 open "I",#2,filel$
60 open "O",#3,file2$
70 on error goto 200
80 while 1:line input #2,ln$
90 print #3,lnum;" ";ln$
100 lnum=lnum+ l0:wend
200 close: end

The above is an abbreviated version of a program by Mike Fulton from the June, 1986 issue of OrnJuice, the newletter of the Atari Computer Association of Orange County

TOS TIPS
If you would like TOS to recognize extensions other than .PRG, .TOS, and TTP when double-clicked from the desktop, use your word processor to edit the DESKTOP.INF file. For instance, inserting this line:

#G 03 FF *.EXE@ @

will allow the ST to run *.EXE applications from the desktop. Make sure the spacing is the same as the other lines in the file. This tip from Robert Mann was also in the issue of ASTUN mentioned above.

A time saving feature of the GEM desktop that you may be unaware of is that you may select a file from a window other than the "front" window by holding down the right mouse button while you press the left button.


If you have a Tech Tip that you would like to share with other readers, send it along to Antic Tech Tips, 524 Second Street, San Francisco, CA 94107. You migbt 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.