HINTS & TRICKS

OS detecion
The new Revision B Operating System was released in January 1982. To determine if your machine has the version B type in this BASIC instruction.

PRINT PEEK(58383)
if result = 56 then you have Revision A
if result = 0 then you have Revision B

Typing curvey arrow
You type the curvey arrow by hitting ESC and then shift and clear together. It clears the screen.

Detecting if you have GTIA installed in your system

10 GRAPHICS 9
20 GOTO 20

If you get a black screen, you have the new chip. If you get a blue screen, you have the old chip.

Eliminating question mark following an INPUT statement in ATARI BASIC

Programmers new to ATARI BASIC wonder about the question mark that appears following an INPUT statement. It generally looks something like this:

WHAT IS YOUR NAME?

If you don't want to phrase the prompt as a question, and only need a single-key response, you can open a channel to the keyboard:

10 PRINT "ENTER MENU ITEM"
20 DIM AN$(1):0PEN #1,4,0,"K:": GET #1, A
30 AN$ = CHR$(A):CLOSE #1

This returns the ATASCII code only for the last key pressed. To get more than one-key input, adapt the technique of this example:

10 DIM NAME$(10)
20 OPEN #1,4,0,"E:":REM OPEN A CHANNEL TO SCREEN EDITOR
30 ?:? "Enter your name and press [RETURN]" :INPUT #1,NAME$
40 ?: ? "Now your age.": INPUT #1, AGE
50 ?:?:? NAME$;" is ";AGE;" years old.":CLOSE #1

Keep in mind that opening a channel to the screen editor (line 20) resets the Graphics Mode to 0, clears the screen and sets colors to default values. If you are planning a fancy Graphics 0 format, set it up after opening the channel to "E:"

Erasing duplicate files on same disk

I inadvertently changed the name of one file on my disk to the exact name of another file on the same disk. I now have two files on the same disk with the same name and I am unable to access the second file. If I try to change the name or delete one of the files, both are affected. Will I ever see that second file again?

Follow this procedure:

1. Load file and transfer to another disk (for backup).

2. Type POKE 3118,0 [RETURN] (immediate mode, no line #).

3. Go to DOS. To proceed, press [START].

4. Rename the file (DOS option E) and only the first one will be renamed.

5. Go back to BASIC (DOS option B), POKE 3118,184 (back to normal), and all will be well. You will have the two files with different names now on the main disk, with the first file backed up on the second disk.

Problem with two files with the same name on a disk

Have you ever ended up with two files with the same name on a disk? If you try renaming them with option E on the DOS menu, both files get renamed. The problem can be renamed with a sector editor, but there is an easier way. From BASIC, type the following statements: POKE 3111,76; POKE 3112,234; POKE 3113,18. Now go to DOS and use option E as usual for renaming a file. Only the first file found will be renamed. Use option H (Write DOS files) to save this modified DOS. Otherwise, restore things to normal by choosing option M (run at address) and entering E477 to reboot the system. Or you could turn the computer on and off.

Disabling BREAK key
POKE 53774,64 and POKE 16,64 (the shadow register) to disable the BREAK key. To keep the key disabled, you must use these POKEs after every PRINT, OPEN and GRAPHICS statement.

Automatic coldstart
POKE 580,1 to make the computer automatically coldstart when SYSTEM RESET us pressed.

Restarting any BASIC program to when [SYSTEM RESET] is pressed
The effect is the same as if you had stopped the program by any normal means, then typed in RUN again. Follow these rules:
1. These lines must be the first three lines of the program.
2. The name of the string variable (here, RESET$) must not be used else where in the program.
3. Once the program has been RUN you cannot access the disk drive unless you reset the values of DOSINIT by doing a POKE 12,64:POKE 13,21, and then press [SYSTEM RESET] again.

0 DIM RESET$(60)

2 I=ADR(RESET$):H=INT(I/256):L=I-H*256:POKE 12,L:POKE 13,H:POKE 842,12:GRAPHICS 0
To use the routine, type it in and LIST to disk or cassette. Then LOAD a BASIC program and check to see that it doesn't use lines 0-2. If it does, renumber those lines. Then ENTER the LISTed routine. After you RUN the program for the first time, pressing [RESET] will automatically RUN it again.

To disable the [BREAK] key, include POKE 16,64:POKL 53774,64 after every GRAPHICS command. To even further protect your program ,create a RUN-only file by adding the following line:

32767 POKE PEEK(138)+ 256*PEEK(139)+ 2,0:SAVE "D:filename.ext":NEW

For cassette, change "D:filefiame.ext" to "C:". Making sure that you have another version of the program saved somewhere else, type GOTO 32767. The file that results can only be executed with RUN. It can be LOADed, but not LISTed. Even you will no longer be able to see the listing.

The routine does not work correctly on a cassette-only system unless you POKE 9,1. Add the POKE statement to the end of line 0.

Helping Letter Perfect

There is inability to obtain a printout of the file directory on storage disk of Letter Perfect. For some reason, LJK has customized their DOS and offset the disk directory by two sectors, compared to Atari DOS. Therefore, DOS can't find the directory. The secret is to POKE 4226,107.

Automatic coldstart from program
It is a documented fact that POKE 580,1 and [SYSTEM RESET] will do a cold start boot. But did you ever wish you could do the same thing from a program? A simple A = USR (61733) will do a complete reboot of the system. This happens to be the address of the "reset" on the 6502 processor.

It works on non-XL models. On 1200XL, Error 9 shows up. Fix this by using A= USR(58487), which is the cold start entry point for ALL models. If you wish to reset only, without pushing the RESET button, use A= USR(58484) in your program.

ATARI BASIC revision
You can tell which revision of BASIC you have by PEEKing location 43234.

If you get PEEK result(PRINT PEEK(43234) as:
- 162(you have Revision A)
- 96(you have Revision B)
- 234
(you have Revision C)

Printout from Atari's Home Filing Manager

Before you load Home Filing Manager, turn on your Alphacom printer and execute the following command from BASIC:

OPEN #4,8,0,''P:" PRINT #4;CHR$(27);"F"

This allows the printer to recognize and print all of the Atari's special characters, including inverse characters. You can then load and use Home Filing Manager as usual. Don't turn the printer off, though, or you'll have to re-execute the above command.

Handling your RS-232

The RS-232 handler isn't resident in the Atari OS-it must be loaded from disk.- turn on the 850 interface, then boot from the Atari DOS Master Disk or from a disk containing the AUTORUN.SYS file (from the Master Disk). This loads the RS-232 handler and adds its address to the handler table. Then simply use the RS-232 port as another I/O channel First, OPEN #1,8,0,"Rl:", then use PRINT #l or PUT #l to send data to the port. Finally, CLOSE #1. Of course, this can only be used to modify BASIC programs that use the printer Modifying machine language programs that use printers, such as LJK's Letter Perfect requires extensive technical expertise and probably wouldn't be worth the trouble.
As far as we know, the only commercial word processing program for the Atari using the RS-232 port is Atari's own Atariwriter. Choose SAVE from the main menu, then type R1: at the prompt for device and file name. If you use Atariwriter without a disk drive, the RS-232 handler is automatically booted if the 850 is turned on and connected before the computer is turned on.

Operating system identification

Atari has gone through six Operating Systems. The older 400/800's both contained identical OS's and went through revisions A and B. There were two OS's for the 1200XL, referred to as 10 and 11 at Atari. The new 600/800XL's have had revisions 1 and 2. If location 64728 contains 162, you have a 400/800, otherwise you have an XL. To determine which 400/800, look in location 65528. A 221 there means you have revision A, 214 means revision A PAL, 243 means revision B, and 34 is revision B PAL. If you have an XL computer you can test for the OS at location 65527, where a PEEK will generate the revision numbers 10, 11, 1 or 2.

Problems with OSS DOS XL 2.2 or 2.3 and Atariwriter

Here's a discovery for readers that have a disk drive with OSS DOS XL 2.2 or 2.3 and use Atariwriter. You cannot use this DOS with this word processor. To fix this incompability problem, delete the file called STARTUP.EXC.

Counting on Bank Street Writer

HI am a freelance writer using an Atari 800 and Bank Street Writer (Broderbund).  How can I get a program to count words accurately?  How much will it cost?
Cheryl Kennedy
North Little Rock, AR
As far as we know, there is no commercial word-count program for Bank Street Writer However, we wrote a short, fairly accurate BASIC program to do this, and it won't cost you a cent.  Replace SAMPLE in line 10 with the name of your text file.

10 OPEN #1,4,0,"D:SAMPLE"
20 TRAP 100
30 GET #1,B
40 IF B<>32 and B<>142 THEN 30
50 GET #1,B:IF B=32 OR B=155 THEN 50
60 COUNT=COUNT+1
70 GOTO 30
100 PRINT "Word Count = ";COUNT

Wipe out your program with one simple POKE

For those jaded Atari owners who are looking for just one more thing to do with their machines, we offer the following: POKE 202,1. Place this poke in your favorite program and your program will be wiped from memory when it ends. Your program will also be wiped if you hit [BREAK] or [SYSTEM RESET]. In fact, anything which generates the READY prompt will result in erasure of the program. Interesting possibilities for protection schemes, no? Location 202 is the Load in Progress flag. When it has been set (by poking with a 1) the computer begins part of the load procedure immediately following the generation of the READY prompt. Among other things, the load procedure clears all program lines and variables from memory.

Adequate SAVETEMPTS and GETTEMPS routines

The SAVETEMPTS and GETTEMPS routines are adequate only if the interrupt routine does not perform mathematical operations other than addition and subtraction. The following versions of those routines will work properly in more general cases. Change the arrays in SAVETEMPS and GETTEMPS to the following:

SAVETEMPS="[$A2 $07 $B5 $CO $48 $B5 $A8 $48 $B5 $AO $48 $B5 $80 $48 $CA $10 $F2 $A5 $D3 $48]",
GETTEMPS="[$68 $85 $D3 $A2 $00 $68 $95 $80 $68 $95 $AO $68 $95 $A8 $68 $95 $CO $E8 $EO $08 $DO $FO]"

Enter DOS, but you don't want to lose your program and you don't have a MEM.SAV file
Create a MEM.SAVE file from BASIC by typing X=USR(5947) NOTE: To return to BASIC, XL owners must press the [RESET] key after the disk stops turning. The 400 and 800 will generate an ERROR 9 message when the MEM.SAV file has been created.

Filenames with numbers, punctuation marks and lowercase letters with DOS 2.0S
To make the changes permanent, type {H} to WRITE NEW DOS FILES when the DOS menu appears. POKE 3818,33:POKE 3822,123:DOS

Format your disk from BASIC
Typing X=USR(3352) will format your disk from BASIC.

Re-running from RESET
Is there any way to make a program rerun automatically if the [SYSTEM RESET] key is pressed? Yes.

This BASIC program below will POKE in a machine language routine which resets the disk boot pointer to a new program that essentially types RUN when you push [SYSTEM RESET]. This is easy to do for machine language programs, but is not so clear for BASIC programs.
To make machine language programs restart, put the initialization address in locations 12 and 13 ( OC and OD). [SYSTEM RESET] will just start the program over.
To reset and RUN a BASIC program, type in this routine (it goes in page 6). Then LOAD your BASIC program. Type POKE 12,0 and POKE 13,6 to run the program when SYSTEM RESET is pressed. You can put the POKEs in the program if you are not going to have to access the disk drive in the program.

10 FOR B=1536 TO 1590:READ A:POKE B,A:NEXT B
20 DATA 162,0,142,68,2,232,134,9,173,48,2,133,203,173
30 DATA 49,2,133,204,160,4,177,203,133,205,200,177,203
40 DATA 133,206,162,0,1
60,82,189,52,6,145,205,232,200,224
50 DATA 3,208,245,169,12,141,252,2,108,250,191,50,53,46
55 LIST 60,70
60 REM **BE SURE TO POKE 12,0 AND
70 REM ** * POKE 13,6 AFTER TYPING RUN

DOS 3 FMS errors
Early versions of DOS 3 contained errors in the File Management System (FMS) files. To determine which version of DOS 3 you have, type:

PRINT PEEK(3889)

If the result is 78, you own the latest version. If you get a 76, however, you've got the early version of DOS 3. Follow these instructions to update your copy of DOS 3.
  1. Type in the following program listing and SAVE it to disk.

10 POKE 3889,78:POKE 39
23,78:POKE 3943,78
26 POKE 3929,76:POKE 38
95,76:POKE 3901.77
30 POKE 3935,77:POKE 39
55,77:POKE 2117,240

  2. RUN the program.
  3. Go to DOS, put a blank disk in your drive, and use option [I] to initialize the disk. (Remember to type [Y] to WRITE FMS.SYS).
  4. Copy all the files (except the FMS.SYS file) from your Master disk to your new disk. When you're done, you should use your new disk in place of your Master Disk.
Of course, there is a better way: shun DOS 3 and use any other DOS instead.

Disable keyboard
POKE 16,255 to completely DISABLE the KEYBOARD. This will prevent mischief by those you wish to keep away from your programs.

Examine the tokenized BASIC program which you have in memory
You can use the SAVE"S:" command to examine the tokenized BASIC program which you have in memory Simply LOAD in a BASIC program, and while in the immediate mode, type SAVE"S:" . The screen will clear and the tokenized program will be listed on the screen. One further extension of the SAVE "S:" command is to examine the contents of your Atari's memory by using the screen. You must change the value of the registers which store the end of the BASIC file. You can then list out all memory to the top of memory ( FFFF). To do this, POKE 140, 255 and POKE 141, 255, then type SAVE"S:". When this has been done, your program will list, then all free memory, followed by the BASIC cartridge and the Operating System.

Borrow DOS Vector for your own use
When you type DOS in BASIC, a pointer is followed to a routine which loads in the DUP.SYS package of utilities. You can borrow this vector for your own use. The location of the DOS vector is in RAM at locations 10 and 11 ($0A and $0B). Since they are in RAM in page 0, you can change them to point anywhere you want. You could point it at the start of BASIC (40960) or at a subroutine you loaded into memory. Remember, all you have to do to enter the routine once you have changed the vector is type DOS. After you set 10 and 11 they will be reset when you press SYSTEM RESET unless you do the following. Locations 5446 and 5450 ($1546 and $154A) contain the value that the warmstart routine places back into 10 and 11. So if you POKE your DOS VECTOR location into 5446 and 5450 (LO-HI), you will keep your new pointer until you turn off the power.

Incorporating the "Help" key
To clear the HELP key, POKE 732,0. To read that key. PEEK(732). A 17 represents the HELP key, an 81 represents SHIFT HELP, and a 145 means CONTROL-HELP

Smooth scrolling of programs
LOAD a BASIC program, POKE 622,255 ($26E) and then LIST. The program scrolls smoothly off the screen. Now, if you type DOS and list the disk directory, you'll see fine scrolling is still enabled. Cancel fine scrolling by POKE 622,0.

Fine scrolling works with the text screen editor (E:) but other graphics modes still require special display list techniques.

Redirecting the screen display to the printer
You can redirect the screen display to the printer by POKE 838,202 and POKE 839,254 ($346, $347). To send it back to the display again, use POKE 838,175 and POKE 839,242.

Enabling the international or European character set in XL/XE
The XL/XE has another set of letters and numbers – the international, or European, character set. You can switch from your normal ATASCII display to this set by POKE 756,204 ($2F4) and return to the American set by POKE 756,224. If you change over, try typing several CONTROL-key combinations to see the other character set.

The international character set takes 1K of memory from 52224 to 53247 ($CC00-$CFFF). If you use a program to turn your OS ROM into OS RAM, you can use this space for your own routines or graphics.

Controlling delay rate for repeating keys and the speed of the repeat
You can control the delay rate for repeating keys and the speed of the repeat. Location 729 ($2D9) controls the delay between the time a key is pressed and the time it begins repeating, measured increments of 1/60th second each – one VBLANK interval. Initially it is set at 48 – 0.8 seconds before a key will repeat. A short delay can speed things up, try POKE 729,6. Increase the delay time by POKE 729,120. Any number between one and 255 will do, while zero means no repeat at all.

Location 730 ($2DA) controls the repeat rate – the number of times a key repeats in a second while you hold down the key. It is initially set at 6. Like 729, the rate is a measure of VBLANK intervals (60ths of a second), so this default value is 10 repeats per second. Therefore, 60 would be one a second, 1 would be 60 per second. Zero means no repeats at all.

Disabling the keyboard completely
To disable the keyboard completely, POKE 621,255 ($26D). You'll have to press [RESET] to regain control, or have your program POKE zero into this location (perhaps when a console key is pressed, since this doesn't lock out the console keys).

Turn off noisy click each time a key is pressed
The XE and XL computers produce a noisy chirp each time a key is pressed. You can turn it off by POKE 731,255 ($2DB) and back on with POKE 731,0. The difference betwen turning the volume on your TV down and POKEing 731 is that other sound prompts are still active – cassette or disk load sounds for example. Only the keyboard is silenced.

Come to DOS without rebooting
Did you forget to hold down the [OPTION] key when you turned on the computer? Instead of rebooting the system, simply POKE 1016,255 ($3FB) with any non-zero number and press [RESET]. You'll jump to DOS immediately and the system won't see BASIC installed. Of course, if you want to go to BASIC later, you'll have to re-boot.

Print out a disk directory from the DOS 2 menu
It's easy to print out a disk directory from the DOS 2 menu. Press [A][RETURN], then type: ,P:[RETURN] (Don't forget the comma before the P).

Play your soundtracks on your old cassette recorder
Don't retire that faithful old cassette recorder into the closet after you upgrade to a disk drive. Use it to play a music soundtrack or voice narration controlled by your BASIC programs. The sound will come out of your TV or monitor speaker.

Insert a cassette recording into the drive and press the Play button.
Whenever you want the soundtrack to start, cue it with a program line such as: 10 POKE 54018,52:REM TURN ON CASSETTE MOTOR
When you want to turn off the sound, use this line: 20 POKE 54018,60:REM TURN OFF MOTOR

Modifying Atari DOS 2.0 for special purposes
First, a few words of CAUTION: The following enhancements were designed specifically for Atari DOS 2. We don't know exactly what would happen if you try these changes any other DOS, but we doubt if the results would be anything good. And be sure to keep a backup copy of original DOS 2, in case you later change your mind about using any of these modifications.

DUPLICATE FILENAMES
One problem with DOS 2 is that it is possible to rename a file to an existing filename. If you attempt to delete or rename one of them, they will both be deleted or renamed. Here is a solution to this problem.

Take a disk with the DOS.SYS and DUP.SYS files on it. Put it in your drive and turn on your computer. At the READY prompt, type POKE 3117,234 and POKE 3118,234. Then type DOS. This patch will let you rename the first file without affecting the second when using option E from the DOS menu.

ERROR 164
You will see Error 164 (File Number Mismatch) if your file is scrambled. Normally, your computer won't allow you to see the file and you are hopelessly lost if this was your only copy. However, if you do a POKE 4148,234: POKE 4149,234 you will be able to LOAD your file, garbage and all, and correct it! Be sure to SAVE the corrected file to another disk and avoid using the damaged version.

OVER TWO DRIVES
You must tell DOS that you have more than two drives attached to your system if you want to access them. Location 1802 is the flag for this purpose. Each bit in the byte stored there represents a drive. Setting a bit will allow DOS to access the corresponding drive.

Normally, the lowest two bits are set, so you would find a 3 in location 1802. By POKEing in a 7 you set DOS for three drives, and by POKEing in 15, you set DOS for four drives. This is because the bit patterns are 0111 and 1111 respectively This is a change that should be made permanent by re-writing DOS to disk after the POKE. You can access as many as eight drives. But keep in mind that every drive you add requires 128 bytes of memory to store its buffer.

OPEN FILE LIMITS
DOS limits you to three simultaneously open files. But if you find this restrictive, you can expand the limit to seven by simply doing a POKE 1801,7. A buffer of 128 bytes is used for each file. Use a number less than seven if you don't want to give up all that valuable RAM.

LOWERCASE FILENAMES
If you are bored with all uppercase filenames try this: POKE 3818,48:POKE 3822,123. Now you can use any ATASCIT character from CHR(48) to CHR(122) ("0" to "z"). Note that the second POKE value is the ATASCII value plus one. It is not recommended to go above or below these values.

CHANGING WILDCARDS
This tip is of dubious value, but if you would like your wildcard character to be something other than the asterisk [*], POKE 3783 with the ATASCII value of your chosen character.

PERMANENT POKES
Remember that all the above POKEs are made from BASIC in the immediate mode. You do not need line numbers. The changes can then be made permanent by typing DOS to go to the DOS menu and using option H to rewrite your modified version of DOS to disk.

DIRECTORY TEXT
Would you like to create a text file on your disk that contains the directory?

10 DIM A$(20),B$(1280)
20 OPEN #1,6,0,"D:*.*":TRAP 80
40 INPUT #1;A$:B$(LEN(B$)+1)=A$
60 GOTO 40
80 CLOSE #1:OPEN #1,8,0,"D:DISKDIR"
90 B$(LEN(B$)+1)=" ":B$(LEN(B$)+1)=A$
110 M=17:FOR N=1 TO LEN(B$)/M
130 PRINT #1,B$((N-1)*M+1,N*M)
140 NEXT N:CLOSE #1

Noisy I/O flag
If you would like to turn off the sound of data pulses coming out of your video speaker during disk or cassette I/O, type POKE 65,0. Bring It back with POKE 65,1.

Rerun an AUTORUN.SYS file without turning off your Atari XL or XE
Here's a tricky way to rerun an AUTORUN.SYS file without turning off your Atari XL or XE. Press [RESET]. Type in BYE and press [RETURN]. You will see the Self-Test Menu. Press [RESET] again and AUTORUN.SYS will take off.

Binary locating
Want to find out where a binary program is being loaded? The first six bytes will give you the answer.

The following program reads them:
10 OPEN #2,4,0,"D:YOURPROG. OBJ"
20 FOR 1=1 TO 6:GET #2,A
30 PRINT A:NEXT I:CLOSE #2

Ignore the first two values which will be 255. Multiply the fourth value by 256 and add the third byte to the result. You now have the starting address. Repeat the above for values five and six to find the ending address of the binary program.

Eliminating annoying "?" followed immediately after INPUT statement in ATARI BASIC
If you would like an INPUT statement not to give the annoying "?" try this:

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

Function Key Value Chart

You can use this handy chart by Carl Evans to help your program keep track of which console key is being pressed.

Keys Pressed PEEK(53279) Binary Code
None 7 00000111
START 6 00000110
SELECT 5 00000101
START and SELECT 4 00000100
OPTION 3 00000011
START and OPTION 2 00000010
SELECT and OPTION 1 00000001
All Three 0 00000000

Atari DOS version detection
This simple routine 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" 

AtariWriter+ and Panasonic 1091
The Panasonic 1091 printer works quite well with the Epson printer driver in AtariWriter Plus, except that it prints a zero at the top of the first page of a document. This can be eliminated by typing [CONTROL] [O], 24, [RETURN] at the beginning of the document.

The [CONTROL] [O] is the control character used to place printer codes in the text and 24 is Panasonic's decimal code for Cancel-which clears the text in the print buffer. However, this will not work if the top margin value is greater than 0 in the Global Format. To set the top margin, go to the text file and press [CONTROL] [T], then type in the desired margin setting. (Somebody could also find that this procedure doesn't work when you print selected pages of a multi-page document.)

Single-stepping in MAC/65 assembler-editor

This single-step routine works with the version of DDT (Dunion's Debugging Tool) built into the MAC/65 assembler-editor from Optimized Systems Software. Our technical staff was unable to fully test the technique prior to deadline:

Let's say you're using the [OPTION] key to single-step through a program that you're revising, and you reach a code block that includes a tight loop which is executed many times. For example:

       LDX #117
LP  LDA BUF,X
       STA OUT,X
       DEX
       RPL LP
       JSR SOMEPLACE

Now, you know that loop will work okay, but using [OPTION] to go through it will take forever. So Instead, use the [OPTION] key to single-step down to the first occurrence of the BPL (or any similar branch instruction). Then press [N]--the loop will execute and the program will stop on the next instruction, ready for an [OPTION].

Normally, N means to skip the Next instruction. DDT executes it by placing a temporary break-point on the instruction past the next one and then doing a GO (or START). So with a branch instruction, N puts the break right after the branch. Only when the branch is not taken is the break activated.

Caution: Don't use this technique on a branch that might never "fall through." Since DDT does a GO, your program may run away too quickly to recover.

Disable BASIC

While in BASIC on an Atari XL or XE, if you type POKE 1016,1 and press [RETURN] and then press [RESET], you can disable BASIC. The computer will perform a warmstart, you'll be returned to DOS and if you try to return to BASIC, you'll be told there's no cartridge present.

Get inverse characters on a graphics screen when using a special font
One-line subroutine you may use often is a way to get inverse characters on a graphics screen when using a special font. The font's address is always determined this way: POKE 756,(hi-byte only, lobyte=0); I use the following subroutine to invert the character set from the value it has at that time:

A=PEEK(756)*256:FOR I=0 TO 1023: POKE A+I,255-PEEK(A+I):NEXT I: RETURN

Running a machine language routine on [RESET)
Running a machine language routine on [RESET) is tricky. While nothing happens to your Atari's built-in RESET routine itself (location 61723), DOSINI (memory locations 12 and 13) is affected. The RESET routine jumps to the operating system's warm-start routine WARMSV (58484, $E474). But DOSINI is executed during warm-start, so we can use DOSINI to trap [RESET].

To do this, you must store the low byte of your routine's starting address into location 12, and the high byte in location 13. However, DOSINI MUST be executed. The first instruction in your routine MUST be a JSR to the original DOSINI starting location.

Now when you press [RESET], the operating system jumps to what it thinks is DOSINI but is actually your program. Then your program will JSR to the real DOSINI, and when it returns, the operating system will continue on its merry way, running the rest of your machine language program.

Create an autorun file that will LOAD and RUN BASIC programs
On the DOS 2.5 master disk there is a SETUP.COM file which will create AUTORUN.SYS files for BASIC.

The menus are easy to follow. Note that SETUP.COM will work on the disk in drive 1 unless you use option 1 in the menu below:

Choose an option:

1. Change current drive number
2. Change system configuration
3. Set up AUTORUN for Boot

The DOS 2.5 Master disk came with new Atari drives from the 1050 on. If you don't have a copy, check with your local dealer or users group about the best way to get a copy.

Newsroom XETEC fix

If you own an Atari 130XE, a Panasonic 1080i printer and a Xetec Graphix interface, this fix is for you.

This setup work fine, until you have got Newsroom from Springboard Software. For some reason, you have got a lot of strange characters on my page when you tried to create a newsletter.

Set the Newsroom printer driver to Epson MX-70 and set Xetec DIP switch 2 to the ON position. The program will run faultlessly. Just don't forget to reset the DIP switch when you're done!

Where are those 8K of RAM in Memory Test?
Suposse your XL/XE machine seems to be suffering loss memory. The Memory Test shows that you have 8K of RAM missing. Is there a way to recover that lost RAM, or does your computer need servicing?

  No, your computer is fine. Your XL/XE's built-in BASIC is using that 8K of memory. The next time you use the computer, try this: First, unplug your disk drives from the computer (DOS takes up a certain amount of space, too). Next, hold down the [OPTION] key (this disables BASIC) and turn on your Atari. Run the Memory Test again and watch that 8K reappear!

As you might guess, many commercial programs should be booted with [OPTION] held down, to free that memory and disable BASIC for programs that don't need it.

Get RAMbrandt to print or dump graphics onto star NX-1000 Rainbow printer

How can you get RAMbrandt to print or dump graphics onto my star NX-1000 Rainbow printer? Is there a utility program I should be using?

RAMbrandt can only print in black and white, unless you have an Okimate 20 color printer. To get your pictures to print in color, you can save them in Micro Illustrator format from RAMbrandt. Then you can use YEMACYB/4 software This color screen dump utility can print your Micro Illustrator formatted pictures in full color.

Quick way to print documentation files either to the screen or the printer

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:

D:FILENAME.EXT,P:

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.

Improved trigger response

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.

Bigger 130XE RAMDisks

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!

RAMBrant Tip

For anyone interested in a new usage for RAMbrant, I have found that MODULE 1 (DOS utils) loads in Computereyes picture files. After loading in a closeup of a person's face, you can use the WINDOW option while in the MIRROR drawing mode and get the mirror images of both halves of a person's face. The results are surprising and quite impressive in the 16-shade mode, which can be printed out using MODULE 2, the GTIA 16-shade printer dump.

Antic Music Processor (AMP) works with DOS XE and an XF551 drive

Antic Music Processor (AMP) works with DOS XE and an XF551 drive. You can fit a lot of songs on a double-sided disk, and the songs can be categorized in subdirectories such as ROCK, CLASSIC, TV SHOWS, etc.

NLQ ATARI XMM-801

The Atari XMM-801 is a fine printer for general purposes, but it lacks a near letter-quality (NLQ) print mode. However, it does offer bold printing and double-strike printing, both of which improve the print quality somewhat.

What the XMM-801 manual doesn't state, though, is that both double-strike and bold printing can be used at the same time, producing near letter-quality print. Doing so is quite easy, whether from BASIC or using a word processor--just send codes for [ESC], CHR$(69), [ESC] and CHR$(71).

For example, using either AtariWriter or AtariWriter Plus, you can turn on NLQ mode by typing:

[CONTROL] [O]27E[CONTROL] [O]27G

Hold down the [CONTROL] key as you type the capital letter O. To turn off NLQ, type:

[CONTROL] [O]27F[CONTROL] [O]27H

Note that after certain other printer control codes it may be necessary to reinitialize NLQ mode. The NLQ code may also be inserted with a custom printer driver (see your word processor manual).

But "there ain't no such thing as a free lunch." Printing NLQ takes longer, while ribbons and printhead receive four times the wear of draft mode printing, so reserve this NLQ technique for your final copy.

XMM-801 Draft Sample






XMM801 NLQ Sample






Which DOS?

Sometimes it can be helpful to know which DOS you booted with. With one or two PEEKs from BASIC you can easily find out. Use this table to determine the DOS version:


PEEK( )      Value        DOS Version
           Returned

3889          0          SpartaDOS 2.3e
              13            DOS 4.0
              15         SpartaDOS 1.1
              19         Atari DOS 2.5 
              76         Atari DOS 3.0
              78         Atari DOS 3.0
              89         SpartaDOS 3.2d
              108          MYDOS 4.0
              207        OSS OS/A+ 4.00
              221          MYDOS 4.50
              238        OSS DOS XL 2.3
              244         Atari DOS XE

1804          0          OSS DOS XL 2.3
              124        Atari DOS 2.0s

Just type PRINT PEEK(3889) [RETURN] at the READY prompt in BASIC, and compare the number printed on your screen with this chart. Note that Atari DOS 3.0 may return either a value of 76 or 78 at location 3889. Both Atari DOS 2.OS and OSS DOS XL 2.3 show a value of 238 at location 3889. To distinguish between the two, check location 1804.

Installing DOS

To put DOS on a non-DOS disk from BASIC, simply open a file called DOS.SYS for output, and then close it. The DOS you booted with will be written to the disk, and you can now boot with that disk. You won't be able to get a DOS menu from it -- that part of the operating system is contained in the file DUP.SYS, which must be copied separately.

The following commands to install DOS on drive 1 work with Atari DOS 2.0 and 2.5 and MYDOS, and quite possibly with other operating systems too:

100 OPEN #l,8,0,"D1:DOS.SYS"
110 CLOSE #1