Atari REMover
Jeff Stefonski
This short BASIC utility automatical pend REMover to the end of the AK 32002 IF LINE = 32000 THEN
32015
ly removes REM statements from pro first program by ENTERing it from FA 32003 PRINT CHR*<125)sPOS
grams. It runs on the Atari 400/800, disk or cassette. (Example: ENTER ITION 2,6:LIST LINE
XL, and XE series computers. "C:" for cassette or ENTER"D:///e- HH 32004 LOCATE 3 + LEN(STRt(L
INE)),7,A:LOCATE 4+
name.ext" for disk.) Type GOTO
LEN(STRt(LINE)),7,B
32000 and press RETURN to acti :LOCATE 5+LEN(STR*(
vate REMover. The routine looks LINE)),7,C
Many programmers use REMark
through your program and deletes CA 32005 IF A = B2 AND B = 69 AN
statements to document how their D C=77 THEN 32009
each line that contains nothing but
programs work—a good program DP 32006 L=1:FOR X=7 TO 9:FO
a REM statement. If a multistate- R Y=2 TO 39:L0CATE
ming practice. Once the program is
ment line ends with REM, the REM Y, X,M:L* <L)=CHR*<M)
finished and debugged, however, :L=L+1:NEXT Y:NEXT
portion is cut off and the line is
the REMs can be deleted to save X
reentered. SI 32007 FOR X = l TG 110:IF L
memory and slightly increase exe
It may take a while for REMover *<X,X+3)=":REM" THE
cution speed (although it's a good
to delete all the REMs in a large N 32012
idea to save a version with the ND 32008 NEXT X j STMTAB = STMTA
program, so be patient. After the
REMs in case you have to make B+PEEK(STMTAB+2):GO
job is done, REMover deletes itself. TO 32001
modifications later). Scanning
Note that REMover uses line KH 32009 PRINT CHR* ( 1 25 ) : POS
through a program and deleting ITION 2,6:PRINT LIN
numbers above 32000. If your pro
REM statements one by one has E
gram uses the same line numbers,
always been a tedious job. But it's NC32010 POSITION 0,0:POKE 8
renumber it before using this rou 42,13:P0SITIGN 2,7:
easy with "Atari REMover."
tine. If your program contains a PRINT "CONT":POSIT I
This short routine automatical ON 2,4:ST0P
GOTO or GOSUB to a REM line
ly removes the REMs from BASIC LN32011 POKE 842,12:G0T0 32
(poor programming practice in any
programs, leaving everything else 001
case), change the line reference IH32012 PRINT CHR* ( 1 25) : POS
intact. Type in Atari REMover as
yourself after using REMover. ITION 2,6:PRINT L*<
listed below, then save the program 1,X-l):PRINT "CUNT"
by LISTing it to disk or cassette. You FC32013 POSITION 0,0:POKE 8
must store the program with LIST, 42,13JP0SITI0N 2,4:
Atari REMover STOP
rather than SAVE, (Example: LIST JF 32014 POKE 842, 12iSTMTAB=-
For instructions on entering this listing, please
"C" for cassette or LIST"D:/z7e- refer to "COMPUTEI's Guide to Typing In Pro
STMTAB + PEEK (STMTAB4-
name.ext" for disk.) Since Atari grams" published bimonthly in compute!. 2):GOTO 32001
Bl 32015 PRINT CHR*(125):POS
REMover deletes itself from memory 00 32000 CLR :GRAPHICS 0:STM ITION 2,i:F0R X = 320
after running, be sure to save a copy TAB=PEEK<136)+PEEK< 00 TO 32016:PRINT X
before using it for the first time. 137)*256:P0KE 82,2: iNEXT XjPRINT "PRIN
POKE B3,39:DIM L*(1 T CHR*(125):PDKE B4
REMover is easy to use. First
14) 2,12iEND"
load the program from which you CL32001 LINE=PEEK<STMTAB)+P BI 32016 POKE 842, 13: POSITID
want to delete the REMs. Then ap- EEK <STMTAB+1> *25£ N 2,2:ST0P ©
November 1985 COMPUTE] 115
PI us/Term
For Commodore 1660 Modem
Mark Wood
By adding a few lines to COMPUTE! '$ tone dialing, depending on which 2040 NEXT:IFLEN(ZXS)=0THEN1760
:rem 62
popular "Plus/Term" program, you service you have on your phone
2050 PRINT"{DOWN){2 SPACES]
can use it with a Commodore 64 and system. You may add spaces or {RVSjR{OFF)OTARY OR {RVS}
the Commodore 1660 direct-conned dashes between the numbers if you T{OFFjONE?" :rem 232
modem, dialing and hanging up un like, but they're not necessary. If 2060 GETTY$:IFTYSo"R"ANDTY$<>
der program control. "T"THEN2060 :rem 208
you press RETURN without enter
2070 FORWXE=1TOLEN(ZXS):DIG(WX
ing a number, or enter a string that
E)=VAL{MIDS(ZX$,WXE,1 )):H
contains no numbers, Plus/Term EXT :rem 154
"Plus/Term," published in COM simply returns you to terminal 2080 POKE56579,(PEEK(56579)OR3
mode. Rotary dialing is simulated 2):POKE565 77,(PEEK(56577)
PUTE!, February 1985 (and in Tele
AND223):FORJ=1TO600:NEXT
computing on the Commodore 64, by rapidly disconnecting and re
:rem 127
COMPUTE! Books), is an excellent connecting the line the correct 2090 PRINT"E3 DOWN}{5 RIGHTjDI
terminal program, offering an 80- number of times for each number. ALING...":IFTYS="R"THEN21
Tone dialing signals are generated 60 :rem 71
column display mode (with
2100 POKE54296,15:POKE54276,16
"Screen-80,"computed gazette, with the 64's SID chip.
:POKE54283,16:POKE54277,0
September 1984) and many other ;POKE54284,0 :rem 46
desirable features. However, since Plus/Term Modifications 2110 POKE54278,240:POKE54285,2
For instructions on entering this listing, please 40:POKE54295,0:FORWXE=1TO
my Commodore 1660 is a direct-
refer to "COMPUTEI's Guide to Typing In LEN(ZX$) :rem 236
connect modem which doesn't Programs" published bimonthly in computei. 2120 POKE54272,SID(DIG(WXE),1)
allow manual dialing, I had no way :POKE54273,SID(DIG(WXE),2
to use Plus/Term. My solution was 10 DATA152,85,74,60,117,77,168 ) :rem 13
,44,152,85,168,44,161,94,16 2130 POKE54279,SID(DIG(WXE),3)
to add auto-dialing and hang-up
8,44,117,77,85,49 :rem 156 :POKE 542 80,SID(DIG(WXE),4
routines to the program. ) :rem 23
20 DATA152,85,85,49, 161,94,85,
To include these new features 49,117,77,150,54,152,85, 150 2140 POKE54276,17:POKE54283,17
in Plus/Term, you'll first need to ,54,161,94,150,54 :rem 140 :FORDEL=1TO75:NEXT
271 PRINTA$"H. HANG UP"; :rem 129
type in the original program. Then
jrem 68 2150 POKE54276,16:POKE54283,16
type in the additional lines listed 272 PRINTA$"D. DIAL"; :rem 152 :FORDEL=1TO75:NEXT:NEXT:P
below. Once you're finished, resave 281 IFM1S="H"THENPOKE56577,(PE OKE54296,0:GOTO1760:rem 9
the program (perhaps with a differ EK(56577)OR32) :rem 8 2160 FORWXE=1TOLEN(ZX?):VA=DIG
282 IFMJS="D"THEN2020 :rem 133 {WXE):IFVA=0THENVA=10
ent name to distinguish it from the
685 DIMDIG(15):FORWXE=0TO9:FOR :rem 19
original Plus/Term). COL=1T04:READSID(WXE,COL): 2170 FORCL=1TOVA:POKE56577,(PE
Plus/Term now offers two ad NEXT:NEXT : rem 33 EK(565 77)OR32):FORDEL=1TO
ditional options: You can dial a 2020 ZX$="":AZ$="":INPUT"{CLR] 26:NEXT ;rem 78
number from within the program {6 DOWN}{2 RIGHTlNUMBER T 2180 POKE56579,(PEEK(56579)OR3
O DIAL";AZ$:IFLEN{AZ$)=0T 2):POKE56577,(PEEK(56577)
(press D) or hang up the line when
HEN1760 :rem 120 AND223):NEXT :rem 110
ever you want (H). After selecting 2030 FORJ=1TOLEN(AZS):G$=MID${ 2190 FORDEL=1TO250:NEXT:NEXT:G
Dial, type in the number you want, AZ?,J,1):IFG$=>"0"ANDGS<= OTO1760 :rem 99
then choose between rotary and "9"THENZX$=ZX?+GS:rem 190
116 COMPUTEI November 1985