Classic Computer Magazine Archive COMPUTE! ISSUE 32 / JANUARY 1983 / PAGE 196

Atari Autonumber

Barry M. Bernstein, Willowdale, Ontario

This provides quite a convenience when using Atari BASIC. AUTONUM adds automatic line numbering to Atari BASIC. It is used in much the same way as the Atari ASSEMBLER/EDITOR NUM function is used.

The program creates a cassette boot program to be loaded in when you turn the computer on with the BASIC cartridge in place. Once in, it can be called at any time and can quite easily be disengaged or reactivated.

Type in the BASIC program, being especially careful to get the DATA statements correct, and then execute the following statement in direct mode:

A = USR(12288)

You will hear two beeps, signalling you to press PLAY and RECORD on the 410 (with a tape in place) and then pressing the RETURN key. You have just made a boot tape.

To use BASIC AUTONUM, load the boot tape in the 410 tape player, make sure the BASIC cartridge is in place, press the START console switch and turn the computer on. When it beeps, press PLAY on the 410 and then RETURN. The AUTONUM program is now in memory. To activate it execute the following in direct mode:

A = USR(1550, a, b)

where a is the line number to begin at and b is the step size. If b is omitted then a is the step size and it will begin where it left off. If both a and b are omitted then it will begin numbering where it left off (ten to begin with) and increment by tens. You may have to press RETURN twice to activate AUTONUM. To disengage the automatic numbering simply press RETURN twice in a row. It is reactivated by repeating the above procedure.

Though BASIC AUTONUM may take up to half an hour to type in, you will find that it is well worth the effort for the great convenience that it offers, especially when typing in large programs.

10 DIM A$ (100), B$(2), H$ (23) : H$ = " {,}{A}{B}{C}{D}{E}{F}{G}{H}(I)!!!!!!!{J}{K}{L}{M}{N}{O}
20 MEM = 1536 : M = -1
30 READ A$
40 FOR I = 0 TO 49 : B$ = A$ (I*2 + 1, I*2 + 2)
50 IF B$ = " YY " THEN RESTORE 700 : MEM = 12 288 : M = -1 : GOTO 30
60 IF B$ = "ZZ" THEN ? "ALL DONE" : END
70 N = 0 : FOR J = 1 TO 2 : N = N * 16 + ASC (H$(ASC(B$(J)) - 47)) : NEXT J : M = M + 1 : POKE MEM + M, N
90 GOTO 30
100 DATA 000200060D06A93C8D02D318606068C900D00BA90085CBA91085CC4C4F0685CFC901F00B20D306A5D585
200 DATA A5D585CBA5D485CCA5CFC902D00FF838A5CEE5CC85CEA5CDE5CB85CDD8A9808510A9628D0802A9068D09
300 DATA C9FFF011AD09D2C90CF0034CBEFFA9FF85CF4CBEFFAD09D2C90CD015A9808510A9BE8D0802A9FF8D0902A
400 DATA 0085CFF818A5CE65CC85CEA5CD65CB85CDD820BD06A5CD20CA06A5CE20BD06A5CE20CA064CBEFF29F04A4A4
500 DATA F660290F18693020A4F6606885CC6885CB6885D56B85D420AAD9A5D4C941F00BA5D585D4A90085D54CF70
600 DATA A5CC4860YY
700 DATA A210A9039D4203A9089D4A03A9089D4B03A94A9D4403A9309D45032056E43028A90B9D4203A9009D4403A
800 DATA 4803A9019D49032056E4300AA90C9D42032056E430006860433A9BZZ