230 WAIT -16384,128: GET L$: GOSUB 1460: FOR I = 1 TO 12: IF L$ < >C$(I) THEN NEXT : ON (L$ = "?") GOTO 2130: FOR I = 1 TO 10:P = PEEK( -16336): NEXT : GOTO 230
240 X = I:I = 999: NEXT :CAC = 0: ON X GOTO 520,920,1560,1500,2030,950,1780,1660,890,420,470,290
250 DATA "D. Dial a number","H. Hang up telephone","C. Toggle copy on/off","K. Clear copy buffer","T. Toggle show line on/off","A. Toggle autosave"
330 VTAB 1: POKE 1403,66: INVERSE : PRINT " ":A$ = " ": GOSUB 1600: REM RESET TOP LINE
340 IF PEEK(ZP) = 0 THEN 170: REM open-apple hit
350 IF PEEK(ZP) = 2 THEN HOME : VTAB 12:A$ = "Saving buffer as: " +AF$ + RIGHT$("00" + STR$(AC),2): GOSUB 1420:A$ = AF$ + RIGHT$("00" + STR$(AC),2):CAC = 1: GOSUB 1720:AC = AC +1: POKE ZP,1: CALL BS +27: GOTO 320: REM AUTOS
360 HOME :A$ = "Carrier Lost":CN% = 0: CALL BS +51: REM flush
370 VTAB 12: GOSUB 1420: VTAB 22: PRINT "press return for the menu...";: GET A$
380 GOTO 170
390 END
400 :
410 :
420 BD = PEEK(772) +1 -(3 *( PEEK(772) = 2)): REM bump baud up one
430 POKE ZP,BD: CALL BS +6: REM change baud rate
440 GOTO 230: REM back to main menu
450 :
460 :
470 HOME : IF CN% = 1 THEN PRINT : PRINT "You are still connected!"
480 PRINT "Are you sure you want to quit? N"; CHR$(8);: GET L$: IF L$ < >"Y" AND L$ < >"y" THEN 170
490 TEXT : HOME : PRINT : CALL BS +48: END : REM GIVE UP MEMORY
500 :
510 :
520 A$ = " ": GOSUB 1600: PRINT "What number do you want to dial?":TB = 10:RD = 0: CALL BS +51: REM FLUSH BUFFER
530 FOR I = 1 TO 7: VTAB 4 +I: PRINT SPC( TB);I;"."; SPC( 2);NA$(I);: POKE 1403,TB +41: PRINT NU$(I): NEXT
540 VTAB 12: PRINT : PRINT SPC( TB);"8. Make a phonebook entry"
550 PRINT : PRINT SPC( TB);"9. Quick dial a number": PRINT : PRINT SPC( TB);"Q. Return to main menu"
560 VTAB 22: POKE 1403,0: PRINT "Choose: ";
570 GET L$: IF (L$ <"1" OR L$ >"9") AND L$ < >"q" AND L$ < >"Q" AND L$ < > CHR$(27) AND L$ < > CHR$(13) THEN 570
580 IF L$ = "Q" OR L$ = CHR$(27) OR L$ = CHR$(13) OR L$ = "q" THEN 170
590 IF L$ = "8" THEN 750: REM new number for phone book
600 IF L$ <"8" THEN A$ = NU$( VAL(L$)): ON A$ = "-" GOTO 520: HOME : PRINT "Dialing ";NA$( VAL(L$));" at ";A$;"...": GOTO 630: REM dial from phonebook
610 IF L$ = "9" THEN HOME : PRINT "Enter number to dial: ";: GOSUB 2060:A$ = IN$
620 IF L$ = "9" AND A$ = "" THEN 520
630 CALL BS +51: REM flush buffer out to be sure
640 FOR I = 1 TO LEN(A$): POKE 511 +I, ASC( MID$ (A$,I,1)): NEXT
650 POKE ZP, LEN(A$): CALL BS +21: REM dial number
660 PRINT : PRINT :V = PEEK(37):F = FRE(0)
670 PRINT "Waiting for carrier..."
680 IF NOT RD THEN VTAB 20: PRINT "(press return for the menu or any other key to re-dial)"
690 CALL BS +24: REM wait for connect
700 CN% = PEEK(ZP): IF CN% = 1 THEN 290: REM right into term mode
710 IF CN% = 0 AND NOT RD THEN JJENN$ = A$:A$ = "Unable to Connect": CALL BS +51: HOME : GOTO 840
720 IF CN% = 0 THEN 740
730 X = CN%:CN% = 0: CALL BS +42: ON X = 128 +27 OR X = 128 +13 GOTO 170: POKE -16368,0: ON RD GOTO 520: REM Rtn for menu or any other key for re-dial, UNLESS we're doing continuious re-dialing
740 HOME : PRINT "Re-dialing ";A$;"...":X = FRE(0): ON NOT RD GOTO 630: VTAB 20: PRINT "(press any key to stop continuious dialing)": VTAB 3: GOTO 630
750 VTAB 12: POKE 1403,0: CALL -958: PRINT : PRINT SPC( TB);"Replace which entry? ";: GET L$: IF L$ >"7" OR L$ <"1" THEN 520
760 L = VAL(L$): VTAB 12: POKE 1403,0: CALL -958
770 PRINT : PRINT "Enter the name of system #";L;":": PRINT ":";: FOR I = 1 TO 35: PRINT "_";: NEXT : FOR I = 1 TO 36: PRINT CHR$(8);: NEXT
780 PRINT ":";: GOSUB 2060:A$ = IN$: ON A$ = "" GOTO 520: IF LEN(A$) >35 THEN VTAB 12: POKE 1403,0: CALL -958: PRINT : PRINT "Name too long!": GOTO 770
790 PRINT : PRINT "Enter the number for system #";L;":": PRINT ":";: FOR I = 1 TO 14: PRINT "_";: NEXT : FOR I = 1 TO 14: PRINT CHR$(8);: NEXT
800 GOSUB 2060:B$ = IN$
810 X = FRE(0): IF LEN(B$) >21 OR B$ = "" THEN VTAB 14: POKE 1403,0: CALL -958: PRINT : PRINT "Number too long!": GOTO 790
820 NU$(L) = B$:NA$(L) = A$: VTAB 12: POKE 1403,0: CALL -958: PRINT : PRINT "Storing phonebook...": PRINT D$"OPEN NT.PHONEBOOK": PRINT D$"WRITE NT.PHONEBOOK": FOR I = 1 TO 7: PRINT NA$(I): PRINT CHR$(34);NU$(I): NEXT : PRINT D$"CLOSE"
830 GOTO 520
840 VTAB 10: GOSUB 1420: VTAB 12: HTAB 15: PRINT "Do you want to continually re-dial this number? Y"; CHR$(8);
850 GOSUB 1450: IF L$ = "N" OR L$ = CHR$(27) THEN 520
860 RD = 1:A$ = JJENN$:X = FRE(0): GOTO 740
870 :
880 :
890 CALL BS +18: GOTO 180: REM send break signal
900 :
910 :
920 ON CN% = 0 GOTO 180: HOME :CN% = 0: VTAB 12: PRINT "Hanging up telephone...": CALL BS +33: GOTO 170: REM call hangup routine if connected
930 :
940 :
950 HOME : IF AU = 1 THEN AU = 0: POKE ZPBYTE,0: CALL BS +15:AC = 0:A$ = "Autosave Disabled": GOTO 370
960 A$ = "Menu": GOSUB 1600: IF PEEK(224) < >0 OR PEEK(225) > <104 THEN PRINT "If you continue, you will erase what is in the buffer now!": PRINT
970 PRINT "Enable autosave? N"; CHR$(8);
980 GOSUB 1450: IF L$ = "n" OR L$ = "N" OR L$ = CHR$(27) OR L$ = CHR$(13) THEN 170
990 PRINT "Yes": PRINT : PRINT "Enter filename to save as (max. 13 characters):": PRINT ":";: GOSUB 2060:AF$ = IN$: IF AF$ = "" THEN 180
1000 A$ = AF$: GOSUB 1010:AF$ = A$: ON LEN(AF$) <14 AND NF < >0 GOTO 1020:A$ = "Illegal filename": GOTO 370: REM TURN AUTOSAVE BACK OFF
1010 NF = 1:B$ = "": FOR NC = 1 TO LEN(A$):L$ = MID$ (A$,NC,1): GOSUB 1460:B$ = B$ +L$:NA = ASC(L$):NF = ((NA >64 AND NA <91) OR (NA = 46) OR (NA >47 AND NA <58 AND NC >1)) AND NF = 1: NEXT :A$ = B$: RETURN : REM check filename
1020 IF PEEK(770) = 0 THEN POKE ZP,1: CALL BS +27: REM DO BUFFER ACTION: TURN IT ON IF IT'S OFF
1030 AU = 1: HOME : VTAB 14:A$ = "Files will be called '" +AF$ +"01', '" +AF$ +"02', and so on": GOSUB 1420:A$ = "Autosave Enabled":AC = 1: POKE ZP,129: CALL BS +15: GOTO 370: REM ENABLE & CLEAR BUFFER
1040 :
1050 :
1060 HOME : INVERSE : POKE 35,23: POKE 34,2: PRINT CHR$(12);: NORMAL : VTAB 5:A$ = " N I B B L E T E R M ":X$ = "": GOSUB 1420: FOR I = 1 TO LEN(A$):X$ = X$ +" ": NEXT : VTAB 4:A$ = X$: GOSUB 1420: PRINT : GOSUB 1420
1070 A$ = " By Eric C. Mueller ": VTAB 9: GOSUB 1420
1080 A$ = " Copyright 1988 by Microsparc, Inc. ": VTAB 14: GOSUB 1420
1090 A$ = " please wait, reading telephone book and setup information... ": VTAB 20: GOSUB 1420
1100 NORMAL : VTAB 22: POKE 1403,0: CALL -958: REM clear out bottom two lines to black
1110 FOR I = 1 TO 31:SP$ = SP$ +" ": NEXT : DIM C$(12),J$(7),DF$(12),P(12),F(12)
1120 FOR I = 1 TO 10 STEP 2: READ A$: READ B$:J$((I +1)/2) = A$ + LEFT$(SP$,31 - LEN(A$)) +B$:C$(I) = LEFT$(A$,1):C$(I +1) = LEFT$(B$,1): NEXT : REM build menu
1130 C$(I) = "Q":C$(I +1) = " ": REM QUIT AND CONNECT are final two commands
1180 POKE ZP,123: CALL BS +48: PRINT D$"bloadnt.obj";MT: CALL BS +39: REM load driver depending on modem type
1190 VTAB 22: POKE ZP,SL: CALL BS: REM POKE SLOT AND INIT MODEM
1200 XX = FRE(0):XX = PEEK(ZP)
1210 IF XX = 1 THEN FOR I = 1 TO 1999: NEXT : POKE ZP,SL: CALL BS
1220 POKE ZP,BD: CALL BS +6: REM SET UP default baud rate
1230 POKE 216,0
1240 X = FRE(0): VTAB 21: PRINT : PRINT D$;"OPEN NT.PHONEBOOK": PRINT D$;"READ NT.PHONEBOOK": FOR I = 1 TO 7: INPUT NA$(I): INPUT NU$(I): NEXT : PRINT D$"CLOSE": REM read in phonebook
1250 POKE 216,0: ONERR GOTO 1830
1260 GOTO 170: REM and begin program
1270 POKE 216,0: ONERR GOTO 1830
1280 POKE 34,17: HOME : POKE ZP,0: FOR BE = 768 TO 778: READ BR: POKE BE,BR: NEXT : CALL 768: IF PEEK(ZP) = 0 THEN MT = 2: GOTO 1320: DATA 56,32,31,254,176,4,169,255,133,8,96: REM i.d. IIGS
1290 HOME : PRINT : PRINT "Are you using the GS modem port or a Super Serial card? (G/S): ";:V = PEEK(37):H = PEEK(1403): PRINT : PRINT : PRINT "If you're using a Datalinker or Epic modem, pick 'S'.": VTAB V +1: POKE 1403,H
1300 GET X$: IF X$ < >"G" AND X$ < >"S" AND X$ < >"s" AND X$ < >"g" THEN 1300
1310 MT = 2 +(X$ = "G" OR X$ = "g"): REM MT = 2 for SSC; MT = 3 for GS
1320 IF ( PEEK(64435) = 6 AND PEEK(64448) = 0) OR MT = 3 THEN SL = 2: GOTO 1350: REM Apple IIc & GS port has modem in slot two
1330 POKE 34,17: HOME : PRINT : PRINT "What slot is it modem in? ";
1340 GET SL$:SL = VAL(SL$): IF SL <1 OR SL >7 THEN 1340
1350 POKE 34,17: PRINT : HOME : POKE 34,2: PRINT : PRINT "What would you like to use as a default baud rate (enter 0 to use 300 baud, 1 touse 1200 baud, or 2 to use 2400 baud): 1"; CHR$(8);
1360 GET BD$:BD = VAL(BD$): ON BD <0 OR BD >2 GOTO 1360: IF BD$ = CHR$(13) THEN BD = 1: REM set default of 1200
1370 VTAB 5: PRINT D$"CLOSE": PRINT D$"OPENNT.CONFIG": PRINT D$"CLOSE": PRINT D$"DELETENT.CONFIG": PRINT D$"OPENNT.CONFIG": PRINT D$"WRITENT.CONFIG": PRINT SL: PRINT BD: PRINT MT: PRINT D$"CLOSE": REM save modem info
1380 PRINT D$"opennt.phonebook": PRINT D$"close": PRINT D$"deletent.phonebook": PRINT D$"opennt.phonebook": PRINT D$"writent.phonebook": FOR I = 1 TO 7: PRINT "(empty)": PRINT "-": NEXT : PRINT D$"CLOSE"
1390 CALL 54915: GOTO 1180: REM reset stack & return
1400 :
1410 :
1420 POKE 1403,(40 -( LEN(A$)/2)) -1: PRINT A$: RETURN : REM center line
1430 :
1440 :
1450 GET L$: IF L$ > <"Y" AND L$ > <"N" AND L$ < >"y" AND L$ < >"n" AND L$ < > CHR$(27) AND L$ < > CHR$(13) THEN 1450
1460 L$ = CHR$( ASC(L$) -(32 *( ASC(L$) >95))): REM convert to uppercase
1660 IF PEEK(224) = 0 AND PEEK(225) = 104 THEN HOME :A$ = "Buffer Empty": GOTO 370
1670 A$ = "Menu": GOSUB 1600: PRINT "Write buffer to disk? N"; CHR$(8);: GOSUB 1450: IF L$ = "N" OR L$ = "n" OR L$ = CHR$(27) OR L$ = CHR$(13) THEN 170
1990 IF CN% THEN VTAB 7: HTAB 7: PRINT "##### You are still connected---your phone is off-hook! #####"
2000 IF O = 0 THEN VTAB 21:A$ = "Press return to exit": GOSUB 1420: POKE -16368,0: GET L$: TEXT : HOME : CALL 37120 +48: END
2010 IF O = 1 THEN VTAB 21:A$ = "Please correct error and press return to continue": GOSUB 1420: POKE -16368,0: WAIT -16384,128: GET L$: RESUME : REM CONTINUE
2020 VTAB 21:A$ = "Press return for the menu": GOSUB 1420: POKE -16368,0: WAIT -16384,128: GET L$: GOTO 170
2030 CALL BS +9: GOTO 180: REM toggle show line on/off
2040 IF LN = 120 THEN TEXT : HOME : VTAB 23: HTAB 1: PRINT "error loading file NT.OBJ...press Return to exit ";: POKE -16368,0: GET A$: HOME : VTAB 23: END
2050 TEXT : HOME : VTAB 23: PRINT "FILE NT.OBJ";MT;" NOT FOUND...PRESS RETURN TO EXIT ";: POKE -16368,0: GET A$: TEXT : HOME : VTAB 23: CALL 37120 +48: END
2060 IN$ = "":LE = 0:IMAX = 36
2070 GET IA$: IF IA$ = CHR$(13) THEN RETURN
2080 IF LE = IMAX THEN GOTO 2100
2090 IF IA$ > = " " AND IA$ < = "~" THEN PRINT IA$;:LE = LE +1:IN$ = IN$ +IA$: GOTO 2070
2100 IF LE >1 AND IA$ = CHR$(8) THEN CALL -1008: PRINT " ";: CALL -1008:LE = LE -1:IN$ = LEFT$(IN$,LE): GOTO 2070
2110 IF LE = 1 AND IA$ = CHR$(8) THEN CALL -1008: PRINT " ";: CALL -1008: GOTO 2060
2120 PRINT CHR$(7);: GOTO 2070
2130 HOME : PRINT : PRINT "Enter prefix or press Return ": PRINT ":";: GOSUB 2060
2140 IF IN$ < >"" THEN PRINT CHR$(4)"PREFIX ";IN$
2150 PRINT CHR$(4)"CATALOG"
2160 PRINT : PRINT "Press Return to continue ";: POKE -16368,0: GET A$: HOME : GOTO 170