home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / JSAGE / ZSUS / TCJ / TCJ45.LBR / PCPMAN.TZJ / PCPMAN.TCJ
Text File  |  1990-05-02  |  6KB  |  247 lines

  1.  
  2. .. PCPMAN.MEX  (04/14/90)
  3.  
  4. .. This subroutine script handles the manual entry of data for a
  5. .. destination RAS.
  6.  
  7. .. See if there is usable call data already defined.  If so, the
  8. .. user will be given the option of using it (in case this is a
  9. .. second attempt to make the same manual call).  Otherwise, we
  10. .. will skip that menu and go directly to the data input menus.
  11.  
  12. GOTO START
  13.  
  14. .. ------------------------------------------------------------
  15. ..
  16. ..      Subroutines (placed at beginning for speed)
  17. ..
  18. .. ------------------------------------------------------------
  19.  
  20. .. This subroutine is passed the city number in scratch variable
  21. .. %d and returns the name of the city in string variable A.
  22.  
  23. PROC CITYNAME
  24. if %d=1 A="Atlanta, GA";ENDP
  25. .. etc.
  26. if %d=34 A="Washington, DC";ENDP
  27. A="Unknown City"
  28. ENDP
  29.  
  30. .. ------------------------------------------------------------
  31.  
  32. .. This subroutine takes the city number in %d and sets the PCP
  33. .. city code into string variable C, the main area code into
  34. .. variable %f, and any additional area code into %g.  Variable
  35. .. %h is set to 1 if a "1" prefix is required.
  36.  
  37. PROC PCPCODE
  38.  
  39. .. initialize
  40.  
  41. %f=0;.          no main area code
  42. %g=0;.          no alternate area code
  43. %h=0;.          no "1" prefix needed
  44. C=" ";.         no city code
  45.  
  46. if %d=1  C="GAATL";%f=404;ENDP
  47. if %d=2  C="MABOS";%f=617;ENDP
  48. if %d=3  C="ILCHI";%f=312;%g=815;%h=1;F="815";ENDP
  49. .. etc.
  50. if %d=29 C="CASJO";%f=408;%g=415;F="415";ENDP
  51. .. etc.
  52. if %d=34 C="DCWAS";%f=202
  53.  
  54. ENDP
  55.  
  56. .. ------------------------------------------------------------
  57. ..
  58. ..      Main Code
  59. ..
  60. .. ------------------------------------------------------------
  61.  
  62. LABEL START
  63.  
  64. C=D;.           set temporary city code to current value
  65. if %c=0 GOTO SETCITY
  66. comp C " ";if value=1 GOTO SETCITY
  67. comp E " ";if value=1 GOTO SETCITY
  68.  
  69. screen on
  70.  
  71. .. ------------------------------------------------------------
  72. ..
  73. ..      Ask About Entering New RAS Data
  74. ..
  75. .. ------------------------------------------------------------
  76.  
  77. cls
  78.  
  79. %d=%c;.         convert city code into city name in A
  80. GOSUB CITYNAME
  81.  
  82. box 1 5 15 50
  83. @  3 19 say "Manual Call Entry"
  84. @  5 10 say "1. use current data"
  85. @  6 15 say "System Name:    ",F
  86. @  7 15 say "City:           ",A
  87. @  8 15 say "PCP City Code:  ",C
  88. @  9 15 say "Data Rate:      ",%b
  89. if %n>0 say " AUTO"
  90. @ 10 15 say "Area Code:      ",%a
  91. @ 11 15 say "Phone Number:   ",E
  92. @ 13 10 say "2. enter new RAS data"
  93.  
  94. @ 17 1 say "Enter selection (or 0 to return to main menu):"
  95.  
  96. LABEL ASKMODE
  97.  
  98. @ 17 48 say "       "
  99. @ 17 48
  100. input
  101.  
  102. if value=3 %m=100;READ PCPMENU
  103. if value=1 GOTO MAKECALL
  104. if value<>2 bell 1;GOTO ASKMODE
  105.  
  106. .. ------------------------------------------------------------
  107. ..
  108. ..      Get PCP Outdial City Code
  109. ..
  110. .. ------------------------------------------------------------
  111.  
  112. LABEL SETCITY
  113.  
  114. cls
  115. box 1 1 18 79
  116.  
  117. if %p=0
  118.   @ 3 28 say "PC-Pursuit City Choices"
  119. else
  120.   %d=%p
  121.   GOSUB CITYNAME;.          get current city name into A
  122.   @ 3 10 say "PC-Pursuit Cities (Currently Connected to ",A,")"
  123. endif
  124.  
  125. %x=1;.                          starting city number
  126. LABEL COLUMN
  127. %d=%x
  128. GOSUB CITYNAME
  129. %y=4;%w=%x+4
  130. if %x<10 %y=5
  131. if %x>12 %y=28;%w=%x-8
  132. if %x>24 %y=52;%w=%x-20
  133. @ %w %y say %x,". ",A
  134. %x=%x+1
  135. if %x<35 GOTO COLUMN
  136.  
  137. @ 20 5 say "City code selection (or 0 to return to main menu):"
  138.  
  139. LABEL ASKCITY
  140.  
  141. @ 20 56 say "       "
  142. @ 20 56
  143. input;%c=value
  144.  
  145. if %c=0 %m=100;READ PCPMENU;.   return to main menu
  146. %d=%c;GOSUB PCPCODE;.           set PCP code and area code data
  147. if %c=%p GOTO SETPHONE;.  if already connected, skip baud query
  148.  
  149. .. ------------------------------------------------------------
  150. ..
  151. ..      Get baud rate to use if a new city is specified.
  152. ..
  153. .. ------------------------------------------------------------
  154.  
  155. LABEL SETBPS
  156.  
  157. cls
  158. box 5 5 13 54
  159. @  7 10 say "Data rate to use for new city (",C,"):"
  160. @  9 15 say "1.  2400 AUTO"
  161. @ 10 15 say "2.  1200 FIXED"
  162. @ 11 15 say "3.  2400 FIXED"
  163. @ 15 1 say "Enter selection (or 0 to return to main menu):"
  164.  
  165. LABEL ASKBPS
  166. @ 15 48 say "        "
  167. @ 15 48
  168. input
  169.  
  170. if value=1 %b=2400;B="24";%n=2;GOTO SETPHONE
  171. if value=2 %b=1200;B="12";%n=0;GOTO SETPHONE
  172. if value=3 %b=2400;B="24";%n=0;GOTO SETPHONE
  173.  
  174. .. if bad answer, ring bell and get another answer
  175.  
  176. bell 1
  177. GOTO ASKBPS
  178.  
  179. .. ------------------------------------------------------------
  180.  
  181. LABEL SETPHONE
  182.  
  183. cls
  184.  
  185. if %g=0 %a=%f;GOTO SETNUMB
  186.  
  187. box 5 5 12 50
  188. @  7 10 say "Area Codes for PCP City Code ",C
  189. @  9 15 say "1. main area code:      ",%f
  190. @ 10 15 say "2. alternate area code: ",%g
  191.  
  192. @ 14 10 say "Area code selection: "
  193.  
  194. LABEL ASKAREA
  195.  
  196. @ 14 32 say "       "
  197. @ 14 32
  198. input
  199.  
  200. if value=1 %a=%f;%h=0;GOTO SETNUMB
  201. if value=2 %a=%g;GOTO SETNUMB
  202.  
  203. .. if invalid response, ring bell and ask again
  204.  
  205. bell 1
  206. GOTO ASKAREA
  207.  
  208. .. ------------------------------------------------------------
  209.  
  210. LABEL SETNUMB
  211.  
  212. cls
  213. say "/n/nArea code is ",%a
  214.  
  215. say "/n/nEnter phone number (###-####): "
  216. accept E,8
  217.  
  218. if %a=%g E="{F}-{E}";.  prefix the area code to the number
  219. if %h>0  E="1-{E}";.    if required, prefix "1-" to number
  220.  
  221. say "/nEnter system name (optional): "
  222. accept F
  223.  
  224. %d=%c;GOSUB CITYNAME
  225.  
  226. label MAKECALL
  227. say "/n/nReady to place the following call:/n"
  228. say "/n   System Name:    ",F
  229. say "/n   City:           ",A
  230. say "/n   PCP City Code:  ",C
  231. say "/n   Data Rate:      ",%b
  232. if %n>0 say " AUTO"
  233. say "/n   Area Code:      ",%a
  234. say "/n   Phone Number:   ",E
  235.  
  236. say "/n/nData Correct (Y//n)? "
  237. accept A,1
  238.  
  239. comp ".{A}" ".";if value=1 GOTO MAKECALL1
  240. comp A "Y";if value=1 GOTO MAKECALL1
  241. GOTO SETCITY;.                          start over again
  242.  
  243. LABEL MAKECALL1
  244.  
  245. D=C;.                           set PCP city code
  246. READ PCPCALL;.                  chain to PCPCALL script
  247.