Home » Archimedes archive » Acorn User » AU 1995-05.adf » !PhoneDay_PhoneDay » Quantum/!Executor/PhoneDay

Quantum/!Executor/PhoneDay

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1995-05.adf » !PhoneDay_PhoneDay
Filename: Quantum/!Executor/PhoneDay
Read OK:
File size: 0DFB bytes
Load address: 0000
Exec address: 0000
File contents
    1REM (v1.2) This program alters phone numbers for PhoneDay.
    2REM ON ERROR PRINTERL:END
    3SYS "OS_GetEnv" TO command%
    4command$=FNgetstring(command%)
    5input$=RIGHT$(command$,LEN(command$)-INSTR(command$,""" ")-1)
    6IF LEFT$(input$,4)="ASIC" THEN input$="?":PROCexit(input$,2)
    7IF LEN(input$) < 10 THEN PROCexit(input$,0)
    8
    9REM this checks to see if BT numbers are being entered
   10IF INSTR(input$,"10") >0 AND INSTR(input$,"10") < 5 THEN
   11 start%=INSTR(input$,"10"):PROCexit(input$,0)
   12ELSE
   13 start%=INSTR(input$,"0")
   14ENDIF
   15phone$=RIGHT$(input$,LEN(input$)-start%+1)
   16IF INSTR(phone$,"ptr_write") >0 THEN input$="?": PROCexit(input$,2)
   17
   18REM special cases of complete changes and prefixes
   19DATA "0272","0117","9"
   20DATA "0602","0115","9"
   21DATA "0533","0116","2"
   22DATA "0742","0114","2"
   23DATA "0532","0113","2"
   24DATA "010","00",""
   25
   26REM no change numbers
   27DATA 0201,0210,0211,0220,0221,0230,0231,0240,0251,0281
   28DATA 0310,0311,0370,0374,0378,0385,0390,0391,0401,0402
   29DATA 0410,0411,0421,0441,0447,0486,0498,0500,0510,0511
   30DATA 0521,0537,0541,0552,0585,0587,0589,0596,0601,0605
   31DATA 0607,0610,0611,0632,0640,0645,0649,0658,0660,0679
   32DATA 0682,0696,0699,0701,0710,0711,0735,0739,0741,0755
   33DATA 0774,0781,0774,0781,0783,0791,0800,0801,0802,0804
   34DATA 0810,0811,0831,0836,0839,0850,0860,0867,0881,0891
   35DATA 0894,0897,0898,0901,0907,0910,0911,0921,0927,0930
   36DATA 0941,0956,0958,0961,0965,0973,0976,0979,0987,0990
   37DATA 0991,0996,0998,0999,08364
   38
   39DIM from$(6),to$(6),prefix$(6)
   40FOR loop%=1 TO 6
   41READ from$(loop%),to$(loop%),prefix$(loop%)
   42NEXT
   43
   44
   45REM check for these special cases first
   46flag%=FALSE
   47FOR loop%=1 TO 6
   48 check$=LEFT$(phone$,LEN(from$(loop%)))
   49 IF check$=from$(loop%) THEN flag%=loop%:loop%=6
   50NEXT
   51IF flag%>0 THEN
   52 to$=to$(flag%):prefix$=prefix$(flag%)
   53 len%=LEN(to$)
   54 line$=RIGHT$(phone$,LEN(phone$)-len%)
   55 IF flag%=6 THEN cut$="":line$=FNstripout_leftchar(line$)
   56 cut%=FALSE:cut$=""
   57 WHILE LEFT$(line$,1) <"0" OR LEFT$(line$,1) > "9"
   58  line$=FNstripout_leftchar(line$):cut%=TRUE
   59 ENDWHILE
   60 line$=to$+cut$+prefix$+line$
   61 PROCexit(line$,1)
   62ENDIF
   63
   64REM check for no change numbers
   65DIM nochange$(105)
   66FOR loop%=1 TO 105
   67READ nochange$(loop%)
   68NEXT
   69flag%=FALSE
   70FOR loop%=1 TO 105
   71 check$=LEFT$(phone$,LEN(nochange$(loop%)))
   72 IF check$=nochange$(loop%) THEN flag%=loop%:loop%=105
   73NEXT
   74IF flag%>0 THEN
   75 start%=1
   76 PROCexit(input$,0)
   77ENDIF
   78
   79
   80REM check unique jersey case of '0534 7XXXX'
   81IF LEFT$(phone$,4)="0534" THEN
   82 s$=RIGHT$(phone$,LEN(phone$)-4)
   83 WHILE LEFT$(s$,1) < "0" OR LEFT$(s$,1)> "9"
   84  s$=RIGHT$(s$,LEN(s$)-1)
   85 ENDWHILE
   86 IF LEFT$(s$,1)="7" AND LEN(s$)= 5 THEN
   87  line$="01534 8"+s$
   88  PROCexit(line$,1)
   89 ELSE
   90   part$=RIGHT$(phone$,LEN(phone$)-1)
   91   line$="01"+part$
   92   PROCexit(line$,1)
   93 ENDIF
   94ENDIF 
   95
   96
   97 
   98REM now check if the number starts '01', this indicates it has already been changed!
   99REM if not and the first digit is a '0' then do the change! 
  100IF LEFT$(phone$,2)="01" THEN
  101 PROCexit(input$,3) 
  102ENDIF
  103IF LEFT$(phone$,1)="0" THEN
  104 part$=RIGHT$(phone$,LEN(phone$)-1)
  105 line$="01"+part$
  106 PROCexit(line$,1)
  107ENDIF
  108
  109
  110 
  111REM if input$ is blank or not any of the above, do nothing
  112PROCexit(input$,2)
  113END
  114:
  115DEF FNstripout_leftchar(word$)
  116cut$+=LEFT$(word$,1)
  117=RIGHT$(word$,LEN(word$)-1)
  118:
  119DEF PROCexit(finished$,altered%)
  120
  121CASE altered% OF
  122
  123 WHEN 0 :
  124 OSCLI("Set KSPhone "+input$)
  125 OSCLI("Set KSmatch 0")
  126 
  127 WHEN 1 :
  128 part1$=LEFT$(input$,start%-1)
  129 OSCLI("Set KSPhone "+part1$+finished$)
  130 OSCLI("Set KSmatch 1")
  131 
  132 WHEN 2 :
  133 OSCLI("Set KSPhone "+input$)
  134 OSCLI("Set KSmatch 2")
  135
  136 WHEN 3 :
  137 OSCLI("Set KSPhone "+input$)
  138 OSCLI("Set KSmatch 3")
  139ENDCASE
  140QUIT
  141:
  142DEF FNgetstring(ptr%)
  143p$=""
  144 WHILE (?ptr%>31 AND ?ptr%<256) AND LEN(p$)<255
  145  c%=?ptr%
  146  p$+=CHR$ c%
  147  ptr%+=1
  148 ENDWHILE
  149=p$
  150:
<� (v1.2) This program alters phone numbers for PhoneDay.
� ON ERROR PRINTERL:END
ș "OS_GetEnv" � command%
!command$=�getstring(command%)
4input$=�command$,�(command$)-�command$,""" ")-1)
4� �input$,4)="ASIC" � input$="?":�exit(input$,2)
&� �(input$) < 10 � �exit(input$,0)

	8� this checks to see if BT numbers are being entered

,� �input$,"10") >0 � �input$,"10") < 5 �
) start%=�input$,"10"):�exit(input$,0)
�

 start%=�input$,"0")
�
&phone$=�input$,�(input$)-start%+1)
;� �phone$,"ptr_write") >0 � input$="?": �exit(input$,2)

4� special cases of complete changes and prefixes
� "0272","0117","9"
� "0602","0115","9"
� "0533","0116","2"
� "0742","0114","2"
� "0532","0113","2"
� "010","00",""

� no change numbers
7� 0201,0210,0211,0220,0221,0230,0231,0240,0251,0281
7� 0310,0311,0370,0374,0378,0385,0390,0391,0401,0402
7� 0410,0411,0421,0441,0447,0486,0498,0500,0510,0511
7� 0521,0537,0541,0552,0585,0587,0589,0596,0601,0605
7� 0607,0610,0611,0632,0640,0645,0649,0658,0660,0679
 7� 0682,0696,0699,0701,0710,0711,0735,0739,0741,0755
!7� 0774,0781,0774,0781,0783,0791,0800,0801,0802,0804
"7� 0810,0811,0831,0836,0839,0850,0860,0867,0881,0891
#7� 0894,0897,0898,0901,0907,0910,0911,0921,0927,0930
$7� 0941,0956,0958,0961,0965,0973,0976,0979,0987,0990
%� 0991,0996,0998,0999,08364
&
' � from$(6),to$(6),prefix$(6)
(� loop%=1 � 6
),� from$(loop%),to$(loop%),prefix$(loop%)
*�
+
,
-)� check for these special cases first
.flag%=�
/� loop%=1 � 6
0$ check$=�phone$,�(from$(loop%)))
10 � check$=from$(loop%) � flag%=loop%:loop%=6
2�
3� flag%>0 �
4* to$=to$(flag%):prefix$=prefix$(flag%)
5 len%=�(to$)
6" line$=�phone$,�(phone$)-len%)
78 � flag%=6 � cut$="":line$=�stripout_leftchar(line$)
8 cut%=�:cut$=""
9( ȕ �line$,1) <"0" � �line$,1) > "9"
:,  line$=�stripout_leftchar(line$):cut%=�
; �
<! line$=to$+cut$+prefix$+line$
= �exit(line$,1)
>�
?
@!� check for no change numbers
A� nochange$(105)
B� loop%=1 � 105
C� nochange$(loop%)
D�
Eflag%=�
F� loop%=1 � 105
G( check$=�phone$,�(nochange$(loop%)))
H6 � check$=nochange$(loop%) � flag%=loop%:loop%=105
I�
J� flag%>0 �
K
 start%=1
L �exit(input$,0)
M�
N
O
P.� check unique jersey case of '0534 7XXXX'
Q� �phone$,4)="0534" �
R s$=�phone$,�(phone$)-4)
S" ȕ �s$,1) < "0" � �s$,1)> "9"
T  s$=�s$,�(s$)-1)
U �
V � �s$,1)="7" � �(s$)= 5 �
W  line$="01534 8"+s$
X  �exit(line$,1)
Y �
Z!   part$=�phone$,�(phone$)-1)
[   line$="01"+part$
\   �exit(line$,1)
] �
^� 
_
`
a 
bV� now check if the number starts '01', this indicates it has already been changed!
c>� if not and the first digit is a '0' then do the change! 
d� �phone$,2)="01" �
e �exit(input$,3) 
f�
g� �phone$,1)="0" �
h part$=�phone$,�(phone$)-1)
i line$="01"+part$
j �exit(line$,1)
k�
l
m
n 
o<� if input$ is blank or not any of the above, do nothing
p�exit(input$,2)
q�
r:
s� �stripout_leftchar(word$)
tcut$+=�word$,1)
u=�word$,�(word$)-1)
v:
w� �exit(finished$,altered%)
x
yȎ altered% �
z
{
 � 0 :
| �("Set KSPhone "+input$)
} �("Set KSmatch 0")
~ 

 � 1 :
� part1$=�input$,start%-1)
�' �("Set KSPhone "+part1$+finished$)
� �("Set KSmatch 1")
� 
�
 � 2 :
� �("Set KSPhone "+input$)
� �("Set KSmatch 2")
�
�
 � 3 :
� �("Set KSPhone "+input$)
� �("Set KSmatch 3")
��
�Ș
�:
�� �getstring(ptr%)
�	p$=""
�* ȕ (?ptr%>31 � ?ptr%<256) � �(p$)<255
�  c%=?ptr%
�  p$+=� c%
�
  ptr%+=1
� �
�=p$
�:
�
00000000  0d 00 01 3c f4 20 28 76  31 2e 32 29 20 54 68 69  |...<. (v1.2) Thi|
00000010  73 20 70 72 6f 67 72 61  6d 20 61 6c 74 65 72 73  |s program alters|
00000020  20 70 68 6f 6e 65 20 6e  75 6d 62 65 72 73 20 66  | phone numbers f|
00000030  6f 72 20 50 68 6f 6e 65  44 61 79 2e 0d 00 02 1b  |or PhoneDay.....|
00000040  f4 20 4f 4e 20 45 52 52  4f 52 20 50 52 49 4e 54  |. ON ERROR PRINT|
00000050  45 52 4c 3a 45 4e 44 0d  00 03 1d c8 99 20 22 4f  |ERL:END...... "O|
00000060  53 5f 47 65 74 45 6e 76  22 20 b8 20 63 6f 6d 6d  |S_GetEnv" . comm|
00000070  61 6e 64 25 0d 00 04 21  63 6f 6d 6d 61 6e 64 24  |and%...!command$|
00000080  3d a4 67 65 74 73 74 72  69 6e 67 28 63 6f 6d 6d  |=.getstring(comm|
00000090  61 6e 64 25 29 0d 00 05  34 69 6e 70 75 74 24 3d  |and%)...4input$=|
000000a0  c2 63 6f 6d 6d 61 6e 64  24 2c a9 28 63 6f 6d 6d  |.command$,.(comm|
000000b0  61 6e 64 24 29 2d a7 63  6f 6d 6d 61 6e 64 24 2c  |and$)-.command$,|
000000c0  22 22 22 20 22 29 2d 31  29 0d 00 06 34 e7 20 c0  |""" ")-1)...4. .|
000000d0  69 6e 70 75 74 24 2c 34  29 3d 22 41 53 49 43 22  |input$,4)="ASIC"|
000000e0  20 8c 20 69 6e 70 75 74  24 3d 22 3f 22 3a f2 65  | . input$="?":.e|
000000f0  78 69 74 28 69 6e 70 75  74 24 2c 32 29 0d 00 07  |xit(input$,2)...|
00000100  26 e7 20 a9 28 69 6e 70  75 74 24 29 20 3c 20 31  |&. .(input$) < 1|
00000110  30 20 8c 20 f2 65 78 69  74 28 69 6e 70 75 74 24  |0 . .exit(input$|
00000120  2c 30 29 0d 00 08 04 0d  00 09 38 f4 20 74 68 69  |,0).......8. thi|
00000130  73 20 63 68 65 63 6b 73  20 74 6f 20 73 65 65 20  |s checks to see |
00000140  69 66 20 42 54 20 6e 75  6d 62 65 72 73 20 61 72  |if BT numbers ar|
00000150  65 20 62 65 69 6e 67 20  65 6e 74 65 72 65 64 0d  |e being entered.|
00000160  00 0a 2c e7 20 a7 69 6e  70 75 74 24 2c 22 31 30  |..,. .input$,"10|
00000170  22 29 20 3e 30 20 80 20  a7 69 6e 70 75 74 24 2c  |") >0 . .input$,|
00000180  22 31 30 22 29 20 3c 20  35 20 8c 0d 00 0b 29 20  |"10") < 5 ....) |
00000190  73 74 61 72 74 25 3d a7  69 6e 70 75 74 24 2c 22  |start%=.input$,"|
000001a0  31 30 22 29 3a f2 65 78  69 74 28 69 6e 70 75 74  |10"):.exit(input|
000001b0  24 2c 30 29 0d 00 0c 05  cc 0d 00 0d 18 20 73 74  |$,0)......... st|
000001c0  61 72 74 25 3d a7 69 6e  70 75 74 24 2c 22 30 22  |art%=.input$,"0"|
000001d0  29 0d 00 0e 05 cd 0d 00  0f 26 70 68 6f 6e 65 24  |)........&phone$|
000001e0  3d c2 69 6e 70 75 74 24  2c a9 28 69 6e 70 75 74  |=.input$,.(input|
000001f0  24 29 2d 73 74 61 72 74  25 2b 31 29 0d 00 10 3b  |$)-start%+1)...;|
00000200  e7 20 a7 70 68 6f 6e 65  24 2c 22 70 74 72 5f 77  |. .phone$,"ptr_w|
00000210  72 69 74 65 22 29 20 3e  30 20 8c 20 69 6e 70 75  |rite") >0 . inpu|
00000220  74 24 3d 22 3f 22 3a 20  f2 65 78 69 74 28 69 6e  |t$="?": .exit(in|
00000230  70 75 74 24 2c 32 29 0d  00 11 04 0d 00 12 34 f4  |put$,2).......4.|
00000240  20 73 70 65 63 69 61 6c  20 63 61 73 65 73 20 6f  | special cases o|
00000250  66 20 63 6f 6d 70 6c 65  74 65 20 63 68 61 6e 67  |f complete chang|
00000260  65 73 20 61 6e 64 20 70  72 65 66 69 78 65 73 0d  |es and prefixes.|
00000270  00 13 17 dc 20 22 30 32  37 32 22 2c 22 30 31 31  |.... "0272","011|
00000280  37 22 2c 22 39 22 0d 00  14 17 dc 20 22 30 36 30  |7","9"..... "060|
00000290  32 22 2c 22 30 31 31 35  22 2c 22 39 22 0d 00 15  |2","0115","9"...|
000002a0  17 dc 20 22 30 35 33 33  22 2c 22 30 31 31 36 22  |.. "0533","0116"|
000002b0  2c 22 32 22 0d 00 16 17  dc 20 22 30 37 34 32 22  |,"2"..... "0742"|
000002c0  2c 22 30 31 31 34 22 2c  22 32 22 0d 00 17 17 dc  |,"0114","2".....|
000002d0  20 22 30 35 33 32 22 2c  22 30 31 31 33 22 2c 22  | "0532","0113","|
000002e0  32 22 0d 00 18 13 dc 20  22 30 31 30 22 2c 22 30  |2"..... "010","0|
000002f0  30 22 2c 22 22 0d 00 19  04 0d 00 1a 17 f4 20 6e  |0",""......... n|
00000300  6f 20 63 68 61 6e 67 65  20 6e 75 6d 62 65 72 73  |o change numbers|
00000310  0d 00 1b 37 dc 20 30 32  30 31 2c 30 32 31 30 2c  |...7. 0201,0210,|
00000320  30 32 31 31 2c 30 32 32  30 2c 30 32 32 31 2c 30  |0211,0220,0221,0|
00000330  32 33 30 2c 30 32 33 31  2c 30 32 34 30 2c 30 32  |230,0231,0240,02|
00000340  35 31 2c 30 32 38 31 0d  00 1c 37 dc 20 30 33 31  |51,0281...7. 031|
00000350  30 2c 30 33 31 31 2c 30  33 37 30 2c 30 33 37 34  |0,0311,0370,0374|
00000360  2c 30 33 37 38 2c 30 33  38 35 2c 30 33 39 30 2c  |,0378,0385,0390,|
00000370  30 33 39 31 2c 30 34 30  31 2c 30 34 30 32 0d 00  |0391,0401,0402..|
00000380  1d 37 dc 20 30 34 31 30  2c 30 34 31 31 2c 30 34  |.7. 0410,0411,04|
00000390  32 31 2c 30 34 34 31 2c  30 34 34 37 2c 30 34 38  |21,0441,0447,048|
000003a0  36 2c 30 34 39 38 2c 30  35 30 30 2c 30 35 31 30  |6,0498,0500,0510|
000003b0  2c 30 35 31 31 0d 00 1e  37 dc 20 30 35 32 31 2c  |,0511...7. 0521,|
000003c0  30 35 33 37 2c 30 35 34  31 2c 30 35 35 32 2c 30  |0537,0541,0552,0|
000003d0  35 38 35 2c 30 35 38 37  2c 30 35 38 39 2c 30 35  |585,0587,0589,05|
000003e0  39 36 2c 30 36 30 31 2c  30 36 30 35 0d 00 1f 37  |96,0601,0605...7|
000003f0  dc 20 30 36 30 37 2c 30  36 31 30 2c 30 36 31 31  |. 0607,0610,0611|
00000400  2c 30 36 33 32 2c 30 36  34 30 2c 30 36 34 35 2c  |,0632,0640,0645,|
00000410  30 36 34 39 2c 30 36 35  38 2c 30 36 36 30 2c 30  |0649,0658,0660,0|
00000420  36 37 39 0d 00 20 37 dc  20 30 36 38 32 2c 30 36  |679.. 7. 0682,06|
00000430  39 36 2c 30 36 39 39 2c  30 37 30 31 2c 30 37 31  |96,0699,0701,071|
00000440  30 2c 30 37 31 31 2c 30  37 33 35 2c 30 37 33 39  |0,0711,0735,0739|
00000450  2c 30 37 34 31 2c 30 37  35 35 0d 00 21 37 dc 20  |,0741,0755..!7. |
00000460  30 37 37 34 2c 30 37 38  31 2c 30 37 37 34 2c 30  |0774,0781,0774,0|
00000470  37 38 31 2c 30 37 38 33  2c 30 37 39 31 2c 30 38  |781,0783,0791,08|
00000480  30 30 2c 30 38 30 31 2c  30 38 30 32 2c 30 38 30  |00,0801,0802,080|
00000490  34 0d 00 22 37 dc 20 30  38 31 30 2c 30 38 31 31  |4.."7. 0810,0811|
000004a0  2c 30 38 33 31 2c 30 38  33 36 2c 30 38 33 39 2c  |,0831,0836,0839,|
000004b0  30 38 35 30 2c 30 38 36  30 2c 30 38 36 37 2c 30  |0850,0860,0867,0|
000004c0  38 38 31 2c 30 38 39 31  0d 00 23 37 dc 20 30 38  |881,0891..#7. 08|
000004d0  39 34 2c 30 38 39 37 2c  30 38 39 38 2c 30 39 30  |94,0897,0898,090|
000004e0  31 2c 30 39 30 37 2c 30  39 31 30 2c 30 39 31 31  |1,0907,0910,0911|
000004f0  2c 30 39 32 31 2c 30 39  32 37 2c 30 39 33 30 0d  |,0921,0927,0930.|
00000500  00 24 37 dc 20 30 39 34  31 2c 30 39 35 36 2c 30  |.$7. 0941,0956,0|
00000510  39 35 38 2c 30 39 36 31  2c 30 39 36 35 2c 30 39  |958,0961,0965,09|
00000520  37 33 2c 30 39 37 36 2c  30 39 37 39 2c 30 39 38  |73,0976,0979,098|
00000530  37 2c 30 39 39 30 0d 00  25 1f dc 20 30 39 39 31  |7,0990..%.. 0991|
00000540  2c 30 39 39 36 2c 30 39  39 38 2c 30 39 39 39 2c  |,0996,0998,0999,|
00000550  30 38 33 36 34 0d 00 26  04 0d 00 27 20 de 20 66  |08364..&...' . f|
00000560  72 6f 6d 24 28 36 29 2c  74 6f 24 28 36 29 2c 70  |rom$(6),to$(6),p|
00000570  72 65 66 69 78 24 28 36  29 0d 00 28 11 e3 20 6c  |refix$(6)..(.. l|
00000580  6f 6f 70 25 3d 31 20 b8  20 36 0d 00 29 2c f3 20  |oop%=1 . 6..),. |
00000590  66 72 6f 6d 24 28 6c 6f  6f 70 25 29 2c 74 6f 24  |from$(loop%),to$|
000005a0  28 6c 6f 6f 70 25 29 2c  70 72 65 66 69 78 24 28  |(loop%),prefix$(|
000005b0  6c 6f 6f 70 25 29 0d 00  2a 05 ed 0d 00 2b 04 0d  |loop%)..*....+..|
000005c0  00 2c 04 0d 00 2d 29 f4  20 63 68 65 63 6b 20 66  |.,...-). check f|
000005d0  6f 72 20 74 68 65 73 65  20 73 70 65 63 69 61 6c  |or these special|
000005e0  20 63 61 73 65 73 20 66  69 72 73 74 0d 00 2e 0b  | cases first....|
000005f0  66 6c 61 67 25 3d a3 0d  00 2f 11 e3 20 6c 6f 6f  |flag%=.../.. loo|
00000600  70 25 3d 31 20 b8 20 36  0d 00 30 24 20 63 68 65  |p%=1 . 6..0$ che|
00000610  63 6b 24 3d c0 70 68 6f  6e 65 24 2c a9 28 66 72  |ck$=.phone$,.(fr|
00000620  6f 6d 24 28 6c 6f 6f 70  25 29 29 29 0d 00 31 30  |om$(loop%)))..10|
00000630  20 e7 20 63 68 65 63 6b  24 3d 66 72 6f 6d 24 28  | . check$=from$(|
00000640  6c 6f 6f 70 25 29 20 8c  20 66 6c 61 67 25 3d 6c  |loop%) . flag%=l|
00000650  6f 6f 70 25 3a 6c 6f 6f  70 25 3d 36 0d 00 32 05  |oop%:loop%=6..2.|
00000660  ed 0d 00 33 0f e7 20 66  6c 61 67 25 3e 30 20 8c  |...3.. flag%>0 .|
00000670  0d 00 34 2a 20 74 6f 24  3d 74 6f 24 28 66 6c 61  |..4* to$=to$(fla|
00000680  67 25 29 3a 70 72 65 66  69 78 24 3d 70 72 65 66  |g%):prefix$=pref|
00000690  69 78 24 28 66 6c 61 67  25 29 0d 00 35 10 20 6c  |ix$(flag%)..5. l|
000006a0  65 6e 25 3d a9 28 74 6f  24 29 0d 00 36 22 20 6c  |en%=.(to$)..6" l|
000006b0  69 6e 65 24 3d c2 70 68  6f 6e 65 24 2c a9 28 70  |ine$=.phone$,.(p|
000006c0  68 6f 6e 65 24 29 2d 6c  65 6e 25 29 0d 00 37 38  |hone$)-len%)..78|
000006d0  20 e7 20 66 6c 61 67 25  3d 36 20 8c 20 63 75 74  | . flag%=6 . cut|
000006e0  24 3d 22 22 3a 6c 69 6e  65 24 3d a4 73 74 72 69  |$="":line$=.stri|
000006f0  70 6f 75 74 5f 6c 65 66  74 63 68 61 72 28 6c 69  |pout_leftchar(li|
00000700  6e 65 24 29 0d 00 38 13  20 63 75 74 25 3d a3 3a  |ne$)..8. cut%=.:|
00000710  63 75 74 24 3d 22 22 0d  00 39 28 20 c8 95 20 c0  |cut$=""..9( .. .|
00000720  6c 69 6e 65 24 2c 31 29  20 3c 22 30 22 20 84 20  |line$,1) <"0" . |
00000730  c0 6c 69 6e 65 24 2c 31  29 20 3e 20 22 39 22 0d  |.line$,1) > "9".|
00000740  00 3a 2c 20 20 6c 69 6e  65 24 3d a4 73 74 72 69  |.:,  line$=.stri|
00000750  70 6f 75 74 5f 6c 65 66  74 63 68 61 72 28 6c 69  |pout_leftchar(li|
00000760  6e 65 24 29 3a 63 75 74  25 3d b9 0d 00 3b 06 20  |ne$):cut%=...;. |
00000770  ce 0d 00 3c 21 20 6c 69  6e 65 24 3d 74 6f 24 2b  |...<! line$=to$+|
00000780  63 75 74 24 2b 70 72 65  66 69 78 24 2b 6c 69 6e  |cut$+prefix$+lin|
00000790  65 24 0d 00 3d 13 20 f2  65 78 69 74 28 6c 69 6e  |e$..=. .exit(lin|
000007a0  65 24 2c 31 29 0d 00 3e  05 cd 0d 00 3f 04 0d 00  |e$,1)..>....?...|
000007b0  40 21 f4 20 63 68 65 63  6b 20 66 6f 72 20 6e 6f  |@!. check for no|
000007c0  20 63 68 61 6e 67 65 20  6e 75 6d 62 65 72 73 0d  | change numbers.|
000007d0  00 41 14 de 20 6e 6f 63  68 61 6e 67 65 24 28 31  |.A.. nochange$(1|
000007e0  30 35 29 0d 00 42 13 e3  20 6c 6f 6f 70 25 3d 31  |05)..B.. loop%=1|
000007f0  20 b8 20 31 30 35 0d 00  43 16 f3 20 6e 6f 63 68  | . 105..C.. noch|
00000800  61 6e 67 65 24 28 6c 6f  6f 70 25 29 0d 00 44 05  |ange$(loop%)..D.|
00000810  ed 0d 00 45 0b 66 6c 61  67 25 3d a3 0d 00 46 13  |...E.flag%=...F.|
00000820  e3 20 6c 6f 6f 70 25 3d  31 20 b8 20 31 30 35 0d  |. loop%=1 . 105.|
00000830  00 47 28 20 63 68 65 63  6b 24 3d c0 70 68 6f 6e  |.G( check$=.phon|
00000840  65 24 2c a9 28 6e 6f 63  68 61 6e 67 65 24 28 6c  |e$,.(nochange$(l|
00000850  6f 6f 70 25 29 29 29 0d  00 48 36 20 e7 20 63 68  |oop%)))..H6 . ch|
00000860  65 63 6b 24 3d 6e 6f 63  68 61 6e 67 65 24 28 6c  |eck$=nochange$(l|
00000870  6f 6f 70 25 29 20 8c 20  66 6c 61 67 25 3d 6c 6f  |oop%) . flag%=lo|
00000880  6f 70 25 3a 6c 6f 6f 70  25 3d 31 30 35 0d 00 49  |op%:loop%=105..I|
00000890  05 ed 0d 00 4a 0f e7 20  66 6c 61 67 25 3e 30 20  |....J.. flag%>0 |
000008a0  8c 0d 00 4b 0d 20 73 74  61 72 74 25 3d 31 0d 00  |...K. start%=1..|
000008b0  4c 14 20 f2 65 78 69 74  28 69 6e 70 75 74 24 2c  |L. .exit(input$,|
000008c0  30 29 0d 00 4d 05 cd 0d  00 4e 04 0d 00 4f 04 0d  |0)..M....N...O..|
000008d0  00 50 2e f4 20 63 68 65  63 6b 20 75 6e 69 71 75  |.P.. check uniqu|
000008e0  65 20 6a 65 72 73 65 79  20 63 61 73 65 20 6f 66  |e jersey case of|
000008f0  20 27 30 35 33 34 20 37  58 58 58 58 27 0d 00 51  | '0534 7XXXX'..Q|
00000900  19 e7 20 c0 70 68 6f 6e  65 24 2c 34 29 3d 22 30  |.. .phone$,4)="0|
00000910  35 33 34 22 20 8c 0d 00  52 1c 20 73 24 3d c2 70  |534" ...R. s$=.p|
00000920  68 6f 6e 65 24 2c a9 28  70 68 6f 6e 65 24 29 2d  |hone$,.(phone$)-|
00000930  34 29 0d 00 53 22 20 c8  95 20 c0 73 24 2c 31 29  |4)..S" .. .s$,1)|
00000940  20 3c 20 22 30 22 20 84  20 c0 73 24 2c 31 29 3e  | < "0" . .s$,1)>|
00000950  20 22 39 22 0d 00 54 15  20 20 73 24 3d c2 73 24  | "9"..T.  s$=.s$|
00000960  2c a9 28 73 24 29 2d 31  29 0d 00 55 06 20 ce 0d  |,.(s$)-1)..U. ..|
00000970  00 56 1e 20 e7 20 c0 73  24 2c 31 29 3d 22 37 22  |.V. . .s$,1)="7"|
00000980  20 80 20 a9 28 73 24 29  3d 20 35 20 8c 0d 00 57  | . .(s$)= 5 ...W|
00000990  18 20 20 6c 69 6e 65 24  3d 22 30 31 35 33 34 20  |.  line$="01534 |
000009a0  38 22 2b 73 24 0d 00 58  14 20 20 f2 65 78 69 74  |8"+s$..X.  .exit|
000009b0  28 6c 69 6e 65 24 2c 31  29 0d 00 59 06 20 cc 0d  |(line$,1)..Y. ..|
000009c0  00 5a 21 20 20 20 70 61  72 74 24 3d c2 70 68 6f  |.Z!   part$=.pho|
000009d0  6e 65 24 2c a9 28 70 68  6f 6e 65 24 29 2d 31 29  |ne$,.(phone$)-1)|
000009e0  0d 00 5b 17 20 20 20 6c  69 6e 65 24 3d 22 30 31  |..[.   line$="01|
000009f0  22 2b 70 61 72 74 24 0d  00 5c 15 20 20 20 f2 65  |"+part$..\.   .e|
00000a00  78 69 74 28 6c 69 6e 65  24 2c 31 29 0d 00 5d 06  |xit(line$,1)..].|
00000a10  20 cd 0d 00 5e 06 cd 20  0d 00 5f 04 0d 00 60 04  | ...^.. .._...`.|
00000a20  0d 00 61 05 20 0d 00 62  56 f4 20 6e 6f 77 20 63  |..a. ..bV. now c|
00000a30  68 65 63 6b 20 69 66 20  74 68 65 20 6e 75 6d 62  |heck if the numb|
00000a40  65 72 20 73 74 61 72 74  73 20 27 30 31 27 2c 20  |er starts '01', |
00000a50  74 68 69 73 20 69 6e 64  69 63 61 74 65 73 20 69  |this indicates i|
00000a60  74 20 68 61 73 20 61 6c  72 65 61 64 79 20 62 65  |t has already be|
00000a70  65 6e 20 63 68 61 6e 67  65 64 21 0d 00 63 3e f4  |en changed!..c>.|
00000a80  20 69 66 20 6e 6f 74 20  61 6e 64 20 74 68 65 20  | if not and the |
00000a90  66 69 72 73 74 20 64 69  67 69 74 20 69 73 20 61  |first digit is a|
00000aa0  20 27 30 27 20 74 68 65  6e 20 64 6f 20 74 68 65  | '0' then do the|
00000ab0  20 63 68 61 6e 67 65 21  20 0d 00 64 17 e7 20 c0  | change! ..d.. .|
00000ac0  70 68 6f 6e 65 24 2c 32  29 3d 22 30 31 22 20 8c  |phone$,2)="01" .|
00000ad0  0d 00 65 15 20 f2 65 78  69 74 28 69 6e 70 75 74  |..e. .exit(input|
00000ae0  24 2c 33 29 20 0d 00 66  05 cd 0d 00 67 16 e7 20  |$,3) ..f....g.. |
00000af0  c0 70 68 6f 6e 65 24 2c  31 29 3d 22 30 22 20 8c  |.phone$,1)="0" .|
00000b00  0d 00 68 1f 20 70 61 72  74 24 3d c2 70 68 6f 6e  |..h. part$=.phon|
00000b10  65 24 2c a9 28 70 68 6f  6e 65 24 29 2d 31 29 0d  |e$,.(phone$)-1).|
00000b20  00 69 15 20 6c 69 6e 65  24 3d 22 30 31 22 2b 70  |.i. line$="01"+p|
00000b30  61 72 74 24 0d 00 6a 13  20 f2 65 78 69 74 28 6c  |art$..j. .exit(l|
00000b40  69 6e 65 24 2c 31 29 0d  00 6b 05 cd 0d 00 6c 04  |ine$,1)..k....l.|
00000b50  0d 00 6d 04 0d 00 6e 05  20 0d 00 6f 3c f4 20 69  |..m...n. ..o<. i|
00000b60  66 20 69 6e 70 75 74 24  20 69 73 20 62 6c 61 6e  |f input$ is blan|
00000b70  6b 20 6f 72 20 6e 6f 74  20 61 6e 79 20 6f 66 20  |k or not any of |
00000b80  74 68 65 20 61 62 6f 76  65 2c 20 64 6f 20 6e 6f  |the above, do no|
00000b90  74 68 69 6e 67 0d 00 70  13 f2 65 78 69 74 28 69  |thing..p..exit(i|
00000ba0  6e 70 75 74 24 2c 32 29  0d 00 71 05 e0 0d 00 72  |nput$,2)..q....r|
00000bb0  05 3a 0d 00 73 1f dd 20  a4 73 74 72 69 70 6f 75  |.:..s.. .stripou|
00000bc0  74 5f 6c 65 66 74 63 68  61 72 28 77 6f 72 64 24  |t_leftchar(word$|
00000bd0  29 0d 00 74 13 63 75 74  24 2b 3d c0 77 6f 72 64  |)..t.cut$+=.word|
00000be0  24 2c 31 29 0d 00 75 17  3d c2 77 6f 72 64 24 2c  |$,1)..u.=.word$,|
00000bf0  a9 28 77 6f 72 64 24 29  2d 31 29 0d 00 76 05 3a  |.(word$)-1)..v.:|
00000c00  0d 00 77 1f dd 20 f2 65  78 69 74 28 66 69 6e 69  |..w.. .exit(fini|
00000c10  73 68 65 64 24 2c 61 6c  74 65 72 65 64 25 29 0d  |shed$,altered%).|
00000c20  00 78 04 0d 00 79 11 c8  8e 20 61 6c 74 65 72 65  |.x...y... altere|
00000c30  64 25 20 ca 0d 00 7a 04  0d 00 7b 0a 20 c9 20 30  |d% ...z...{. . 0|
00000c40  20 3a 0d 00 7c 1d 20 ff  28 22 53 65 74 20 4b 53  | :..|. .("Set KS|
00000c50  50 68 6f 6e 65 20 22 2b  69 6e 70 75 74 24 29 0d  |Phone "+input$).|
00000c60  00 7d 17 20 ff 28 22 53  65 74 20 4b 53 6d 61 74  |.}. .("Set KSmat|
00000c70  63 68 20 30 22 29 0d 00  7e 05 20 0d 00 7f 0a 20  |ch 0")..~. .... |
00000c80  c9 20 31 20 3a 0d 00 80  1d 20 70 61 72 74 31 24  |. 1 :.... part1$|
00000c90  3d c0 69 6e 70 75 74 24  2c 73 74 61 72 74 25 2d  |=.input$,start%-|
00000ca0  31 29 0d 00 81 27 20 ff  28 22 53 65 74 20 4b 53  |1)...' .("Set KS|
00000cb0  50 68 6f 6e 65 20 22 2b  70 61 72 74 31 24 2b 66  |Phone "+part1$+f|
00000cc0  69 6e 69 73 68 65 64 24  29 0d 00 82 17 20 ff 28  |inished$).... .(|
00000cd0  22 53 65 74 20 4b 53 6d  61 74 63 68 20 31 22 29  |"Set KSmatch 1")|
00000ce0  0d 00 83 05 20 0d 00 84  0a 20 c9 20 32 20 3a 0d  |.... .... . 2 :.|
00000cf0  00 85 1d 20 ff 28 22 53  65 74 20 4b 53 50 68 6f  |... .("Set KSPho|
00000d00  6e 65 20 22 2b 69 6e 70  75 74 24 29 0d 00 86 17  |ne "+input$)....|
00000d10  20 ff 28 22 53 65 74 20  4b 53 6d 61 74 63 68 20  | .("Set KSmatch |
00000d20  32 22 29 0d 00 87 04 0d  00 88 0a 20 c9 20 33 20  |2")........ . 3 |
00000d30  3a 0d 00 89 1d 20 ff 28  22 53 65 74 20 4b 53 50  |:.... .("Set KSP|
00000d40  68 6f 6e 65 20 22 2b 69  6e 70 75 74 24 29 0d 00  |hone "+input$)..|
00000d50  8a 17 20 ff 28 22 53 65  74 20 4b 53 6d 61 74 63  |.. .("Set KSmatc|
00000d60  68 20 33 22 29 0d 00 8b  05 cb 0d 00 8c 06 c8 98  |h 3")...........|
00000d70  0d 00 8d 05 3a 0d 00 8e  16 dd 20 a4 67 65 74 73  |....:..... .gets|
00000d80  74 72 69 6e 67 28 70 74  72 25 29 0d 00 8f 09 70  |tring(ptr%)....p|
00000d90  24 3d 22 22 0d 00 90 2a  20 c8 95 20 28 3f 70 74  |$=""...* .. (?pt|
00000da0  72 25 3e 33 31 20 80 20  3f 70 74 72 25 3c 32 35  |r%>31 . ?ptr%<25|
00000db0  36 29 20 80 20 a9 28 70  24 29 3c 32 35 35 0d 00  |6) . .(p$)<255..|
00000dc0  91 0e 20 20 63 25 3d 3f  70 74 72 25 0d 00 92 0e  |..  c%=?ptr%....|
00000dd0  20 20 70 24 2b 3d bd 20  63 25 0d 00 93 0d 20 20  |  p$+=. c%....  |
00000de0  70 74 72 25 2b 3d 31 0d  00 94 06 20 ce 0d 00 95  |ptr%+=1.... ....|
00000df0  07 3d 70 24 0d 00 96 05  3a 0d ff                 |.=p$....:..|
00000dfb