Classic Computer Magazine Archive COMPUTE! ISSUE 34 / MARCH 1983 / PAGE 187

Atari Mass Line Delete

Aaron M. Contorer

Probably just about everyone who has tried to write a lengthy BASIC program on the Atari has encountered the most serious bug in Atari BASIC: system lockup. When changes are made in a program so that a major portion of the program must be moved either up or down in memory, BASIC can cause the computer to completely stop working, or to "lock up." In such cases, there is usually no recourse but to turn the computer off and back on, completely erasing the memory. One good solution is this program, "Mass Line Delete."

If changes in a BASIC program are made by the program itself (through the use of the "dynamic keyboard"), system lockup will not occur. "Mass Line Delete" will erase a specified area of a target program — for example, lines 100 through 200 — without causing the computer to crash. Use of Mass Line Delete also saves a considerable amount of typing, since the only line numbers the user must type are the start and end of the area to be erased, as opposed to typing in the number of every line in the area.

The program itself is as brief as possible so that it will leave most of the computer's memory for the main program. To use Mass Line Delete, first type it in, then list it to cassette by typing LIST "C" or to disk by typing LIST "D:DELETE. LST". Then, at any point during work on another program that you wish to use Mass Line Delete, retrieve it using the ENTER command and type GOTO 32600. In response to the utility's prompt, type the starting and ending line numbers of the program area to be deleted. Mass Line Delete will delete the appropriate lines and automatically end. You may then continue work on your program.

Remember that the safest way to make sure that your program is not lost forever is to SAVE it at least every half-hour that you work on it.

32600 GRAPHICS 0:? :? " "
32605 TRAP 32605:POKE 84,11:? "Start, end";:INPUT S, E
32610 IF INT(S)<> ABS(S) OR S>32099 OR INT (E) <>ABS (E) OR E>32099 OR E<S THEN ? CHR$(253): GOTO 32605
32615 GRAPHICS 0:? :?
32620 ? S:S=S+l
32625 ? "CONT":POSITION 0,0:POKE 842, 13:STOP
32630 POKE 842,12:IF S<=E THEN 32615