Classic Computer Magazine Archive ANTIC VOL. 6, NO. 7 / NOVEMBER 1987

Tech Tips

FLASH BORDER

Pep up your BASIC text display by surrounding it with a flashy, moving border. This routine was sent to Antic by Agim Perolli of Boonton, NJ:

10 GRAPHICS 0:FOR P=1536 TO 1638:READ X:POKE P,X:NEXT P
20 DATA 162,0,189,0,224,157,0,120,189,0,225,157,0,121,189,0,226,157,0,122
30 DATA 189,0,227,157,0,123,232,224,255,208,227,162,120,142,244,2,104,162,6,160
40 DATA 46,169,7,76,92,228,174,89,6,228,20,208,33,162,0,135,20,174,90,6
50 DATA 142,66,6,160,0,185,91,6,153,0,121,200,192,8,208,245,232,224,95,208
60 DATA 2,162,91,142,90,6,76,98,228,3,91,102,204,153,51,102,204,153,51,102
70 DATA 204,153,51
80 ? :? :? :? :? "@@@@@@@@@@@@@@@@@@@@"
90 FOR L=1 TO 5:? "@                  @":NEXT L
100? "@@@@@@@@@@@@@@@@@@@@"
110 DUMMY=USR(1536)

XL MEMORY EATER

Want to watch your Atari 800XL eat memory? Type in:

10 IF PEEK(53279)<>7 THEN END
20 SAVE "D:JUNK.BAS"
30 SAVE "S:"
40 ? :? :? FRE(0)
50 RUN "D:JUNK.BAS"

This short program by Antic Technical Editor Charles Jackson demonstrates a little-known problem that readers regularly ask us about. The operating system (OS) built into XL computer models adds 16 "garbage" bytes to the end of your Atari BASIC program every time you SAVE it to disk or cassette.

When you RUN this program, it will SAVE itself to disk over and over again. Each time the program SAVEs itself, it displays the amount of available memory bytes. Notice that this value decreases by 16 each time around.

Line 30 lets you see these extra bytes for yourself. The SAVE "S:" command tells your Atari to SAVE your program to the S:--Screen device. In other words, the tokenized version of your program is displayed onscreen each time it is SAVEd. You can actually watch it grow and grow. Hold down any console key to stop the program.

This program will eventually fill your disk (and probably crash it, too). So you should RUN it on a "scratch" disk that doesn't contain other material you might want to keep.

If you're editing a standard BASIC program on an Atari XL, remember that 16 "garbage" bytes will be added to your program each time you SAVE it. But fortunately, you can remove these bytes from your program in four steps!

Here's the cure:

  1. LIST your program to disk.
  2. Type NEW.
  3. ENTER your program back into the computer.
  4. SAVE it back to disk. The "garbage" bytes have been removed.

DOS CHECKUP

William Ho of Calgary, Alberta, Canada sent us this simple routine that lets you check which version of Atari DOS is active:

10 IF PEEK(1995)=170 THEN ?"DOS 2.0s"
20 IF PEEK(1995)=100 THEN ?"DOS 2.5"
30 IF PEEK(1995)=29 THEN ?"DOS 3.0"

And to check which version of Atari BASIC you have, type:

PRINT PEEK(43234)
VALUE RETURNED       BASIC
BY YOUR ATARI       VERSION
     162               A
	     96               B
	    234               C

ANOTHER XL RAMDISK

Here's how to create a 101-sectr RAMdisk while working in BASIC on your 800XL. This tip has appeared in several users group newsletters, including the April, 1987 the Northwest Phoenix (Arizona) Atari Connection's Between Bytes

This method is different from the January, 1987 RAMdisk Tech Tip which is written to your DOS 2.5 disk as an AUTORUN.SYS file. The following seps for this 101-sector RAMdisk must be repeated whenever you want to use it:

  1. Boot your 800XL with the DOS 2.5 disk containing RAMDISK.COM
  2. Type POKE 1802,PEEK(1802)+128 and press [RETURN].
  3. Type DOS and press [RETURN].
  4. Press [L] and [RETURN]. Type RAMDISK.COM and press [RETURN].
  5. Press the following: [I] [RETURN] [8] [RETURN] [Y] [RETURN].
  6. Press the following: [H] [RETURN] [8] [RETURN] [Y] [RETURN].
  7. Press [D] and [RETURN]. Type D8:DOS.SYS and press [RETURN] [Y] [RETURN].
  8. Press [B] and [RETURN].
  9. Type POKE 5439,56 and press [RETURN].
  10. Type DOS and press [RETURN].

You should now see the DOS menu almost instantly. You can store anything on drive 8 if (A.) it fits and (B.) you copy it to a retular disk before turning your computer off.

From the DOS menu, if you press [N] and [RETURN], MEM.SAV will be created on drive 8.

HEXTABLE

This short program prints a handy one-page table of binary, hexadecimal and decimal numbers for instant conversion. It comes from Mark Brow's "Atari Small Miracles" column in the June, 1987 issue of Current Notes, the magazine of the Washington (D.C.) Are Atari Computer Enthusiasts.

10 DIM HEX$(2),H$(16),BINARY$(8):H$="0123456789ABCDEF":POKE 201,5:? "Output to ?";:IMPUT HEX$:OPEN #1,8,0,HEX$
20 FOR X=0 TO 63
30 FOR DEC=X TO 255 STEP 64:V=DEC:GOSUB 50:V=DEC:GOSUB 60:? #1;DEC,HEX$;" ";BINARY$;" # ";:NEXT DEC
40 ?#1:NEXT X:END
50 FOR I=2 TO 1 STEP -1:T=INT(V/16):R=V-16*T:HEX$(I,I)=H$(R+1,R+1):V=T:NEXT I:RETURN
60 FOR I=8 TO 1 STEP -1:T=INT(V/2):R=V-2*T:BINARY$(I,I)=STR$(R):V=T:NEXT I:RETURN

At the "Output to ?" prompt, enter a device such as P: (printer), or S: (screen).