Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet » StarterPak/!Newsbase/Transports/ka9q/setremote

StarterPak/!Newsbase/Transports/ka9q/setremote

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet
Filename: StarterPak/!Newsbase/Transports/ka9q/setremote
Read OK:
File size: 047F bytes
Load address: 0000
Exec address: 0000
File contents
   10DIM buf% 1024
   20ON ERROR PRINTREPORT$;" at ";ERL:END
   30d1$="<TCPIP$Dir>"
   40in%=0
   50SYS"XOS_File",17,d1$TOt%;F%
   60IFt%=0OR(F%AND1)<>0 PROCexit("!TCPIP not found")
   70host$=""
   80C%=OPENIN(d1$+".autoexec")
   90IFC%<>0THEN
  100  REPEATa$=GET$#C%
  110  a$=FNlower(a$)
  120  IFhost$=""ANDLEFT$(a$,4)="smtp"ANDINSTR(a$,"gateway")>0 THEN
  130    l%=INSTR(a$,"["):l2%=INSTR(a$,"]",l%)
  140    IFl%>0ANDl2%>l%THEN
  150      host$=MID$(a$,l%+1,l2%-l%-1)
  160      ELSE
  170      l%=INSTR(a$,"gateway"):host$=MID$(a$,l%+8)
  180    ENDIF
  190  ENDIF
  200  UNTILEOF#C%:CLOSE#C%
  210ENDIF
  220IFhost$=""THEN
  230C%=OPENIN(d1$+".config")
  240IFC%<>0THEN
  250  REPEATa$=GET$#C%
  260  a$=FNlower(a$)
  270  IFhost$=""ANDLEFT$(a$,4)="smtp"ANDINSTR(a$,"gateway")>0 THEN
  280    l%=INSTR(a$,"["):l2%=INSTR(a$,"]",l%)
  290    IFl%>0ANDl2%>l%THEN
  300      host$=MID$(a$,l%+1,l2%-l%-1)
  310      ELSE
  320      l%=INSTR(a$,"gateway"):host$=MID$(a$,l%+8)
  330    ENDIF
  340  ENDIF
  350  UNTILEOF#C%:CLOSE#C%
  360ENDIF
  370h$="--"
  380ENDIF
  390IFhost$>""THEN
  400  h$=host$
  410ENDIF
  420SYS"OS_CLI","set NewsBase$ReturnInfo "+h$
  430END
  440
  450DEFFNend(a$)
  460l%=LENa$
  470REPEATl%=l%-1:UNTILMID$(a$,l%,1)=" "ORl%<=1
  480=MID$(a$,l%+1)
  490
  500DEFFNlower(A$)
  510LOCALB$,L%,C%:B$=""
  520FORL%=1TOLENA$:C%=ASC(MID$(A$,L%,1))
  530IFC%>64ANDC%<91 THENC%=C%+32
  540B$+=CHR$C%
  550NEXT:=B$
  560
  570DEFPROCexit(n%,a$)
  580OSCLI("set NewsBase$ReturnCode "+STR$n%)
  590OSCLI("set NewsBase$ReturnInfo "+a$)
  600END
  610

� buf% 1024
� � �$;" at ";�:�
d1$="<TCPIP$Dir>"
(	in%=0
2ș"XOS_File",17,d1$�t%;F%
<-�t%=0�(F%�1)<>0 �exit("!TCPIP not found")
Fhost$=""
PC%=�(d1$+".autoexec")
Z�C%<>0�
d  �a$=�#C%
n  a$=�lower(a$)
x0  �host$=""��a$,4)="smtp"��a$,"gateway")>0 �
�#    l%=�a$,"["):l2%=�a$,"]",l%)
�    �l%>0�l2%>l%�
�"      host$=�a$,l%+1,l2%-l%-1)
�      �
�+      l%=�a$,"gateway"):host$=�a$,l%+8)
�	    �
�  �
�  ��#C%:�#C%
��
��host$=""�
�C%=�(d1$+".config")
��C%<>0�
�  �a$=�#C%
  a$=�lower(a$)
0  �host$=""��a$,4)="smtp"��a$,"gateway")>0 �
#    l%=�a$,"["):l2%=�a$,"]",l%)
"    �l%>0�l2%>l%�
,"      host$=�a$,l%+1,l2%-l%-1)
6      �
@+      l%=�a$,"gateway"):host$=�a$,l%+8)
J	    �
T  �
^  ��#C%:�#C%
h�
rh$="--"
|�
��host$>""�
�  h$=host$
��
�,ș"OS_CLI","set NewsBase$ReturnInfo "+h$
��
�
�
ݤend(a$)
�
l%=�a$
�!�l%=l%-1:��a$,l%,1)=" "�l%<=1
�=�a$,l%+1)
�
�ݤlower(A$)
��B$,L%,C%:B$=""
�L%=1��A$:C%=�(�A$,L%,1))
�C%>64�C%<91 �C%=C%+32
B$+=�C%
&	�:=B$
0
:��exit(n%,a$)
D%�("set NewsBase$ReturnCode "+�n%)
N$�("set NewsBase$ReturnInfo "+a$)
X�
b
�
00000000  0d 00 0a 0f de 20 62 75  66 25 20 31 30 32 34 0d  |..... buf% 1024.|
00000010  00 14 16 ee 20 85 20 f1  f6 24 3b 22 20 61 74 20  |.... . ..$;" at |
00000020  22 3b 9e 3a e0 0d 00 1e  15 64 31 24 3d 22 3c 54  |";.:.....d1$="<T|
00000030  43 50 49 50 24 44 69 72  3e 22 0d 00 28 09 69 6e  |CPIP$Dir>"..(.in|
00000040  25 3d 30 0d 00 32 1d c8  99 22 58 4f 53 5f 46 69  |%=0..2..."XOS_Fi|
00000050  6c 65 22 2c 31 37 2c 64  31 24 b8 74 25 3b 46 25  |le",17,d1$.t%;F%|
00000060  0d 00 3c 2d e7 74 25 3d  30 84 28 46 25 80 31 29  |..<-.t%=0.(F%.1)|
00000070  3c 3e 30 20 f2 65 78 69  74 28 22 21 54 43 50 49  |<>0 .exit("!TCPI|
00000080  50 20 6e 6f 74 20 66 6f  75 6e 64 22 29 0d 00 46  |P not found")..F|
00000090  0c 68 6f 73 74 24 3d 22  22 0d 00 50 19 43 25 3d  |.host$=""..P.C%=|
000000a0  8e 28 64 31 24 2b 22 2e  61 75 74 6f 65 78 65 63  |.(d1$+".autoexec|
000000b0  22 29 0d 00 5a 0b e7 43  25 3c 3e 30 8c 0d 00 64  |")..Z..C%<>0...d|
000000c0  0e 20 20 f5 61 24 3d be  23 43 25 0d 00 6e 13 20  |.  .a$=.#C%..n. |
000000d0  20 61 24 3d a4 6c 6f 77  65 72 28 61 24 29 0d 00  | a$=.lower(a$)..|
000000e0  78 30 20 20 e7 68 6f 73  74 24 3d 22 22 80 c0 61  |x0  .host$=""..a|
000000f0  24 2c 34 29 3d 22 73 6d  74 70 22 80 a7 61 24 2c  |$,4)="smtp"..a$,|
00000100  22 67 61 74 65 77 61 79  22 29 3e 30 20 8c 0d 00  |"gateway")>0 ...|
00000110  82 23 20 20 20 20 6c 25  3d a7 61 24 2c 22 5b 22  |.#    l%=.a$,"["|
00000120  29 3a 6c 32 25 3d a7 61  24 2c 22 5d 22 2c 6c 25  |):l2%=.a$,"]",l%|
00000130  29 0d 00 8c 15 20 20 20  20 e7 6c 25 3e 30 80 6c  |)....    .l%>0.l|
00000140  32 25 3e 6c 25 8c 0d 00  96 22 20 20 20 20 20 20  |2%>l%...."      |
00000150  68 6f 73 74 24 3d c1 61  24 2c 6c 25 2b 31 2c 6c  |host$=.a$,l%+1,l|
00000160  32 25 2d 6c 25 2d 31 29  0d 00 a0 0b 20 20 20 20  |2%-l%-1)....    |
00000170  20 20 cc 0d 00 aa 2b 20  20 20 20 20 20 6c 25 3d  |  ....+      l%=|
00000180  a7 61 24 2c 22 67 61 74  65 77 61 79 22 29 3a 68  |.a$,"gateway"):h|
00000190  6f 73 74 24 3d c1 61 24  2c 6c 25 2b 38 29 0d 00  |ost$=.a$,l%+8)..|
000001a0  b4 09 20 20 20 20 cd 0d  00 be 07 20 20 cd 0d 00  |..    .....  ...|
000001b0  c8 10 20 20 fd c5 23 43  25 3a d9 23 43 25 0d 00  |..  ..#C%:.#C%..|
000001c0  d2 05 cd 0d 00 dc 0e e7  68 6f 73 74 24 3d 22 22  |........host$=""|
000001d0  8c 0d 00 e6 17 43 25 3d  8e 28 64 31 24 2b 22 2e  |.....C%=.(d1$+".|
000001e0  63 6f 6e 66 69 67 22 29  0d 00 f0 0b e7 43 25 3c  |config").....C%<|
000001f0  3e 30 8c 0d 00 fa 0e 20  20 f5 61 24 3d be 23 43  |>0.....  .a$=.#C|
00000200  25 0d 01 04 13 20 20 61  24 3d a4 6c 6f 77 65 72  |%....  a$=.lower|
00000210  28 61 24 29 0d 01 0e 30  20 20 e7 68 6f 73 74 24  |(a$)...0  .host$|
00000220  3d 22 22 80 c0 61 24 2c  34 29 3d 22 73 6d 74 70  |=""..a$,4)="smtp|
00000230  22 80 a7 61 24 2c 22 67  61 74 65 77 61 79 22 29  |"..a$,"gateway")|
00000240  3e 30 20 8c 0d 01 18 23  20 20 20 20 6c 25 3d a7  |>0 ....#    l%=.|
00000250  61 24 2c 22 5b 22 29 3a  6c 32 25 3d a7 61 24 2c  |a$,"["):l2%=.a$,|
00000260  22 5d 22 2c 6c 25 29 0d  01 22 15 20 20 20 20 e7  |"]",l%)..".    .|
00000270  6c 25 3e 30 80 6c 32 25  3e 6c 25 8c 0d 01 2c 22  |l%>0.l2%>l%...,"|
00000280  20 20 20 20 20 20 68 6f  73 74 24 3d c1 61 24 2c  |      host$=.a$,|
00000290  6c 25 2b 31 2c 6c 32 25  2d 6c 25 2d 31 29 0d 01  |l%+1,l2%-l%-1)..|
000002a0  36 0b 20 20 20 20 20 20  cc 0d 01 40 2b 20 20 20  |6.      ...@+   |
000002b0  20 20 20 6c 25 3d a7 61  24 2c 22 67 61 74 65 77  |   l%=.a$,"gatew|
000002c0  61 79 22 29 3a 68 6f 73  74 24 3d c1 61 24 2c 6c  |ay"):host$=.a$,l|
000002d0  25 2b 38 29 0d 01 4a 09  20 20 20 20 cd 0d 01 54  |%+8)..J.    ...T|
000002e0  07 20 20 cd 0d 01 5e 10  20 20 fd c5 23 43 25 3a  |.  ...^.  ..#C%:|
000002f0  d9 23 43 25 0d 01 68 05  cd 0d 01 72 0b 68 24 3d  |.#C%..h....r.h$=|
00000300  22 2d 2d 22 0d 01 7c 05  cd 0d 01 86 0e e7 68 6f  |"--"..|.......ho|
00000310  73 74 24 3e 22 22 8c 0d  01 90 0e 20 20 68 24 3d  |st$>"".....  h$=|
00000320  68 6f 73 74 24 0d 01 9a  05 cd 0d 01 a4 2c c8 99  |host$........,..|
00000330  22 4f 53 5f 43 4c 49 22  2c 22 73 65 74 20 4e 65  |"OS_CLI","set Ne|
00000340  77 73 42 61 73 65 24 52  65 74 75 72 6e 49 6e 66  |wsBase$ReturnInf|
00000350  6f 20 22 2b 68 24 0d 01  ae 05 e0 0d 01 b8 04 0d  |o "+h$..........|
00000360  01 c2 0d dd a4 65 6e 64  28 61 24 29 0d 01 cc 0a  |.....end(a$)....|
00000370  6c 25 3d a9 61 24 0d 01  d6 21 f5 6c 25 3d 6c 25  |l%=.a$...!.l%=l%|
00000380  2d 31 3a fd c1 61 24 2c  6c 25 2c 31 29 3d 22 20  |-1:..a$,l%,1)=" |
00000390  22 84 6c 25 3c 3d 31 0d  01 e0 0e 3d c1 61 24 2c  |".l%<=1....=.a$,|
000003a0  6c 25 2b 31 29 0d 01 ea  04 0d 01 f4 0f dd a4 6c  |l%+1)..........l|
000003b0  6f 77 65 72 28 41 24 29  0d 01 fe 13 ea 42 24 2c  |ower(A$).....B$,|
000003c0  4c 25 2c 43 25 3a 42 24  3d 22 22 0d 02 08 1d e3  |L%,C%:B$="".....|
000003d0  4c 25 3d 31 b8 a9 41 24  3a 43 25 3d 97 28 c1 41  |L%=1..A$:C%=.(.A|
000003e0  24 2c 4c 25 2c 31 29 29  0d 02 12 1a e7 43 25 3e  |$,L%,1)).....C%>|
000003f0  36 34 80 43 25 3c 39 31  20 8c 43 25 3d 43 25 2b  |64.C%<91 .C%=C%+|
00000400  33 32 0d 02 1c 0b 42 24  2b 3d bd 43 25 0d 02 26  |32....B$+=.C%..&|
00000410  09 ed 3a 3d 42 24 0d 02  30 04 0d 02 3a 11 dd f2  |..:=B$..0...:...|
00000420  65 78 69 74 28 6e 25 2c  61 24 29 0d 02 44 25 ff  |exit(n%,a$)..D%.|
00000430  28 22 73 65 74 20 4e 65  77 73 42 61 73 65 24 52  |("set NewsBase$R|
00000440  65 74 75 72 6e 43 6f 64  65 20 22 2b c3 6e 25 29  |eturnCode "+.n%)|
00000450  0d 02 4e 24 ff 28 22 73  65 74 20 4e 65 77 73 42  |..N$.("set NewsB|
00000460  61 73 65 24 52 65 74 75  72 6e 49 6e 66 6f 20 22  |ase$ReturnInfo "|
00000470  2b 61 24 29 0d 02 58 05  e0 0d 02 62 04 0d ff     |+a$)..X....b...|
0000047f