Typer's Toolbox (TOOLBOX.BAS)
Typer's Toolbox, utility by Steven Bobulsky, 75
Description
Typer's Toolbox, utility by Steven Bobulsky, 75
From the Antic disk of January 1984 (Vol. 2 No. 10).
From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.
What is in this file
Atari BASIC program · 3.8 KB
- Dialect
- Atari BASIC
- Lines
- 55
- Variables
L,I,Y$,Z$,T,A,E,X,C,K,Q,U,S
BASIC listing (55 lines)
29995 REM ***TYPER'S TOOLBOX**
29996 REM *BY STEVEN BOBULSKY*
29997 REM * ANTIC MAGAZINE *
29998 REM * JANUARY, 1984 *
29999 REM ********************
30000 CLR :TRAP 30000:? "↰Enter the starting line number.":INPUT L:? :? "Increment between lines";:INPUT I
30010 DIM Y$(120),Z$(120):T=0:IF L>32699 THEN 30000
30020 TRAP 30020:? "↰Enter '1' for regular lines":? "OR '-1' for DATA lines.":INPUT A:IF ABS(A)<>1 THEN 30020
30030 E=0:IF A=1 THEN GOTO 30310
30040 X=1:C=0:I=ABS(I):? "↰DATA MODE:":? :? "Enter your items, or none,& hit RETURN twice when finished."
30050 ? :? L;" Item #";X;:INPUT Z$:? :Y$(LEN(Y$)+1)=Z$:Y$(LEN(Y$)+1)=",":X=X+1:C=C+1
30060 IF Z$<>"" THEN E=0:GOTO 30050
30070 IF Z$="" THEN Y$(LEN(Y$))="":X=X-1:C=C-1:E=E+1:IF E=2 THEN 30090
30080 IF E=1 THEN 30050
30090 IF Y$="" THEN 30120
30100 T=T+C:Y$(LEN(Y$))=""
30110 E=0:? "↰":? :? L;"DATA";Y$:? :? :? "CONT":POSITION 0,0:POKE 842,13:STOP
30120 GOSUB 30300:LIST L:? :? "Proposed next line is ";L+I:? :LIST L+I:? :? "RETURN=continue":?
30130 ? "Any other key = MENU":CLOSE #1:OPEN #1,4,0,"K:":GET #1,K:CLOSE #1:IF K=ASC(CHR$(155)) THEN 30290
30140 GOSUB 30300:LIST L:? :IF A=-1 THEN ? L;:? " item count=";C:? "Items in current block=";T:? :?
30150 ? :? "Current line";:? " =";L:? "Proposed next line =";L+I:LIST L+I:? :? "1=next line":? "2=edit"
30160 ? "3=change increment":? "4=shift modes":? "5=restart (no lines lost)":? "6=Delete a line range."
30170 ? :? "MODE:";:IF A=1 THEN ? "Regular lines.":? :? "Free RAM=";FRE(0)
30180 IF A=-1 THEN ? "DATA lines":? :? "Free RAM=";FRE(0)
30190 IF FRE(0)<400 THEN ? "MEMORY CRITICAL":? "LIST or SAVE your program lines":? "to tape or disk.":END
30200 CLOSE #1:OPEN #1,4,0,"K:":GET #1,K:IF K<ASC("1") OR K>ASC("6") THEN 30200
30210 IF K=ASC("2") THEN ? "↰EDIT:When done, hit RETURN over CONT.":LIST L:?
30220 IF K=ASC("2") THEN ? :? L;" ";:IF A=-1 THEN ? "DATA";" ";
30230 IF K=ASC("2") THEN ? Y$:? :? :? "CONT":POSITION 0,0:STOP
30240 IF K=ASC("2") THEN ? "↰":Y$="":LIST L:? :GOTO 30150
30250 IF K=ASC("3") THEN ? "↰Enter the new line increment.";:INPUT I:? "↰":? :LIST L:Y$="":? :GOTO 30150
30260 IF K=ASC("4") THEN ? "↰":? :? :LIST L:Y$="":X=1:A=-A:GOTO 30150
30270 IF K=ASC("5") THEN GOTO 30000
30280 IF K=ASC("6") THEN GOTO 30390
30290 Y$="":? "↰":X=1:L=L+I:I=ABS(I):GOTO 30030
30300 POKE 842,12:? "↰":RETURN
30310 ? "↰REGULAR MODE":? "Type in the line or just press":? "RETURN to skip to the MENU.":? :? L;" ";
30320 CLOSE #1:OPEN #1,4,0,"K:":GET #1,K:Y$(LEN(Y$)+1)=CHR$(K)
30330 IF K=ASC(CHR$(155)) THEN GOTO 30350
30340 PRINT CHR$(K);:GOTO 30320
30350 IF Y$=CHR$(155) THEN ? "↰No new entry on line ";L:I=ABS(I):GOTO 30150
30360 IF K=ASC(CHR$(155)) THEN GOTO 30370
30370 ? :? :? "CONT":POSITION 0,2:POKE 842,13:STOP
30380 GOSUB 30300:I=ABS(I):LIST L,L+I:? :? :GOTO 30120
30390 ? "↰RANGE DELETE UTILITY:CAUTION":? "ANY line range may be specified, even this program, if you wish."
30400 TRAP 30400:? :? " LOWEST line to delete";:INPUT Q:? "HIGHEST line to delete";:INPUT U:IF Q>U THEN 30400
30410 ? :? "Enter the line increment.":? "(If unsure, use '1' for this value)":INPUT S:IF Q>32700 THEN 30400
30420 ? "↰Lowest line =";Q:? "Highest line =";U:? "ARE YOU SURE?":? :? "Press 'Y' to continue,":POKE 702,64
30430 ? "or any other key to abort.":CLOSE #1:OPEN #1,4,0,"K:":GET #1,K:IF K<>ASC("Y") THEN ? "↰":GOTO 30150
30440 ? :? "If you want to watch the process,":? "press '1'. If you would like speed,"
30450 ? "any other key will blank the screen":? "during the delete to initiate":? "'direct memory access.'"
30460 CLOSE #1:OPEN #1,4,0,"K:":GET #1,K:? "↰":IF K<>ASC("1") THEN POKE 559,0:CLOSE #1
30470 POSITION 2,11:? "POKE 842,12:POKE 559,34:CONT":POSITION 2,4:? "POSITION 2,6:? Q:POSITION 2,4"
30480 POSITION 2,7:? "Q=Q+S:IF Q<=U THEN POSITION 2,1":POSITION 2,0:POKE 842,13:STOP
30490 ? "↰":TRAP 30000:POKE 559,34:GOTO 30150
