.. PCPMAN.MEX (04/14/90) .. This subroutine script handles the manual entry of data for a .. destination RAS. .. See if there is usable call data already defined. If so, the .. user will be given the option of using it (in case this is a .. second attempt to make the same manual call). Otherwise, we .. will skip that menu and go directly to the data input menus. GOTO START .. ------------------------------------------------------------ .. .. Subroutines (placed at beginning for speed) .. .. ------------------------------------------------------------ .. This subroutine is passed the city number in scratch variable .. %d and returns the name of the city in string variable A. PROC CITYNAME if %d=1 A="Atlanta, GA";ENDP .. etc. if %d=34 A="Washington, DC";ENDP A="Unknown City" ENDP .. ------------------------------------------------------------ .. This subroutine takes the city number in %d and sets the PCP .. city code into string variable C, the main area code into .. variable %f, and any additional area code into %g. Variable .. %h is set to 1 if a "1" prefix is required. PROC PCPCODE .. initialize %f=0;. no main area code %g=0;. no alternate area code %h=0;. no "1" prefix needed C=" ";. no city code if %d=1 C="GAATL";%f=404;ENDP if %d=2 C="MABOS";%f=617;ENDP if %d=3 C="ILCHI";%f=312;%g=815;%h=1;F="815";ENDP .. etc. if %d=29 C="CASJO";%f=408;%g=415;F="415";ENDP .. etc. if %d=34 C="DCWAS";%f=202 ENDP .. ------------------------------------------------------------ .. .. Main Code .. .. ------------------------------------------------------------ LABEL START C=D;. set temporary city code to current value if %c=0 GOTO SETCITY comp C " ";if value=1 GOTO SETCITY comp E " ";if value=1 GOTO SETCITY screen on .. ------------------------------------------------------------ .. .. Ask About Entering New RAS Data .. .. ------------------------------------------------------------ cls %d=%c;. convert city code into city name in A GOSUB CITYNAME box 1 5 15 50 @ 3 19 say "Manual Call Entry" @ 5 10 say "1. use current data" @ 6 15 say "System Name: ",F @ 7 15 say "City: ",A @ 8 15 say "PCP City Code: ",C @ 9 15 say "Data Rate: ",%b if %n>0 say " AUTO" @ 10 15 say "Area Code: ",%a @ 11 15 say "Phone Number: ",E @ 13 10 say "2. enter new RAS data" @ 17 1 say "Enter selection (or 0 to return to main menu):" LABEL ASKMODE @ 17 48 say " " @ 17 48 input if value=3 %m=100;READ PCPMENU if value=1 GOTO MAKECALL if value<>2 bell 1;GOTO ASKMODE .. ------------------------------------------------------------ .. .. Get PCP Outdial City Code .. .. ------------------------------------------------------------ LABEL SETCITY cls box 1 1 18 79 if %p=0 @ 3 28 say "PC-Pursuit City Choices" else %d=%p GOSUB CITYNAME;. get current city name into A @ 3 10 say "PC-Pursuit Cities (Currently Connected to ",A,")" endif %x=1;. starting city number LABEL COLUMN %d=%x GOSUB CITYNAME %y=4;%w=%x+4 if %x<10 %y=5 if %x>12 %y=28;%w=%x-8 if %x>24 %y=52;%w=%x-20 @ %w %y say %x,". ",A %x=%x+1 if %x<35 GOTO COLUMN @ 20 5 say "City code selection (or 0 to return to main menu):" LABEL ASKCITY @ 20 56 say " " @ 20 56 input;%c=value if %c=0 %m=100;READ PCPMENU;. return to main menu %d=%c;GOSUB PCPCODE;. set PCP code and area code data if %c=%p GOTO SETPHONE;. if already connected, skip baud query .. ------------------------------------------------------------ .. .. Get baud rate to use if a new city is specified. .. .. ------------------------------------------------------------ LABEL SETBPS cls box 5 5 13 54 @ 7 10 say "Data rate to use for new city (",C,"):" @ 9 15 say "1. 2400 AUTO" @ 10 15 say "2. 1200 FIXED" @ 11 15 say "3. 2400 FIXED" @ 15 1 say "Enter selection (or 0 to return to main menu):" LABEL ASKBPS @ 15 48 say " " @ 15 48 input if value=1 %b=2400;B="24";%n=2;GOTO SETPHONE if value=2 %b=1200;B="12";%n=0;GOTO SETPHONE if value=3 %b=2400;B="24";%n=0;GOTO SETPHONE .. if bad answer, ring bell and get another answer bell 1 GOTO ASKBPS .. ------------------------------------------------------------ LABEL SETPHONE cls if %g=0 %a=%f;GOTO SETNUMB box 5 5 12 50 @ 7 10 say "Area Codes for PCP City Code ",C @ 9 15 say "1. main area code: ",%f @ 10 15 say "2. alternate area code: ",%g @ 14 10 say "Area code selection: " LABEL ASKAREA @ 14 32 say " " @ 14 32 input if value=1 %a=%f;%h=0;GOTO SETNUMB if value=2 %a=%g;GOTO SETNUMB .. if invalid response, ring bell and ask again bell 1 GOTO ASKAREA .. ------------------------------------------------------------ LABEL SETNUMB cls say "/n/nArea code is ",%a say "/n/nEnter phone number (###-####): " accept E,8 if %a=%g E="{F}-{E}";. prefix the area code to the number if %h>0 E="1-{E}";. if required, prefix "1-" to number say "/nEnter system name (optional): " accept F %d=%c;GOSUB CITYNAME label MAKECALL say "/n/nReady to place the following call:/n" say "/n System Name: ",F say "/n City: ",A say "/n PCP City Code: ",C say "/n Data Rate: ",%b if %n>0 say " AUTO" say "/n Area Code: ",%a say "/n Phone Number: ",E say "/n/nData Correct (Y//n)? " accept A,1 comp ".{A}" ".";if value=1 GOTO MAKECALL1 comp A "Y";if value=1 GOTO MAKECALL1 GOTO SETCITY;. start over again LABEL MAKECALL1 D=C;. set PCP city code READ PCPCALL;. chain to PCPCALL script