Classic Computer Magazine Archive ANTIC VOL. 8, NO. 5 / SEPTEMBER 1989

Tech Tips


By Charles Jackson 

130XE owners have many reasons to appreciate DOS 2.5's 412-sector RAMdisk. It lets you save files quickly, it's reliable, and automatically installs its own copies of the DUP.SYS and MEM.SAV files, giving you instant access to the DOS menu. Since DUP.SYS is in D8:, your RAMdisk, you don't have to wait for it to load from drive 1.

You can get a 499-sector RAMdisk if you erase the DUP.SYS and MEM.SAV files. This will give you 87 more sectors. Unfortunately, you won't be able to get to the DOS menu anymore because your Atari will be looking for it on D8:, your RAMdisk. Every time you type DOS, your Atari will check your RAMdisk for a DUP.SYS file (the one you erased) and return you to a READY prompt.

Here's how to make BASIC look for DUP.SYS in drive 1.

POKE 5439, ASC("1")

You can make BASIC took for DUP.SYS in any other drive by placing the ASCII value of the drive number into memory location 5439 ($153F). POKE 5439,ASC("2") will make DOS look in drive 2.

Now you can erase DUP.SYS and MEM.SAV from your RAMdisk, giving you 87 more sectors, and you'll still be able to get a DOS menu. Just make sure you have DUP.SYS on a floppy disk!



By Arnold Putong

Error trapping and checking keyboard input can be a big hassle in BASIC. By using PEEK(764) to verify the input, you can eliminate complicated IF-THEN sequences. Location 764 holds a numeric value for the last key pressed -- it is not an ASCII code.

The following short program will allow you to determine which value is associated with each key on the keyboard. Note -- three spaces are required between the final quotation marks in line 20.

10 GRAPHICS 18:POKE 16,64:POKE 53774,64
20 POKE 752,1:? #6;" ":POSITION 8,5:?#6;PEEK(764);" ":GOTO 20

RUN the program and try pressing a key. The key's value will be printed on the screen. You can also see the combined values you get using the [CONTROL] or [SHIFT] keys.

Once you know the value of the keystrokes your program is looking for, you can use statements such as:
IF PEEK(764) = 27 THEN . . .



By Frank Jersawitz

Need a quick way to print documentation files either to the screen or the printer? You could use any of the many fine programs available, such as Two-Column Print Pro from the June 1989 Antic.

However, if you don't want to bother with other programs, there's an easy way to print your files from DOS. Simply use DOS option [C], COPY FILE. First make sure your printer is turned on! When DOS prompts you for file names, just type:


The file will be printed. Replace P: with S: and your file will be displayed on the screen. To stop the scrolling so you can read the file, press [CONTROL][1]. Press this key combination again to resume scrolling.



By James Hague

In many BASIC programs, especially games with long main loops, the user could press the joystick button so fast that the program misses it completely. There is a way to have the computer "remember" when the button is pressed, even after it is released. When the program finally gets around to checking the button's status, it seems as if it's still pressed. The key is the following command:

POKE 53277,4

Use this command before you start executing your main loop (that is, just once before the loop is entered). Then, after you have detected a button press and reacted to it, you will need to use this command again to clear the button. If you are using Player/Missile Graphics in your program, change the 4 to a 7.


Antic pays $25 for every original and exclusive Tech Tip submission that we publish. Send your 8-bit or ST disk and printout to: Antic Tech Tips, 544 Second Street, San Francisco, CA 94107. Tech Tips welcomes very short programs that demonstrate the Atari's powers, simple hardware modifications, or useful macros for popular software.