Home » Archimedes archive » Acorn User » AU 1997-04 B.adf » PD » PDScheme/Newshound/NewsHound/NewsHound/status

PDScheme/Newshound/NewsHound/NewsHound/status

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 1997-04 B.adf » PD
Filename: PDScheme/Newshound/NewsHound/NewsHound/status
Read OK:
File size: 01AA bytes
Load address: 0000
Exec address: 0000
File contents
   10REM>status
   20REM return transport status
   30REM 1=active, 0=inactive
   40DIMq%20
   50r0%=0:found%=0
   60REPEAT
   70SYS"TaskManager_EnumerateTasks",r0%,q%,20 TOr0%
   80A$=FNstr(q%!4):IFLEFT$(A$,LEN("NewsHound"))="NewsHound":found%=1
   90UNTILr0%<0ORfound%<>0
  100PROCexit(found%,"")
  110END
  120
  130DEFPROCexit(n%,a$)
  140OSCLI("set NewsBase$ReturnCode "+STR$n%)
  150IFa$>""THENOSCLI("set NewsBase$ReturnInfo "+a$)
  160END
  170
  180DEFFNstr(a%)
  190LOCALa$:WHILE ?a%>31ANDLENa$<255:a$+=CHR$?a%:a%+=1:ENDWHILE
  200=a$

�>status
� return transport status
� 1=active, 0=inactive
(	�q%20
2r0%=0:found%=0
<�
F1ș"TaskManager_EnumerateTasks",r0%,q%,20 �r0%
P;A$=�str(q%!4):�A$,�("NewsHound"))="NewsHound":found%=1
Z�r0%<0�found%<>0
d�exit(found%,"")
n�
x
���exit(n%,a$)
�%�("set NewsBase$ReturnCode "+�n%)
�+�a$>""��("set NewsBase$ReturnInfo "+a$)
��
�
�
ݤstr(a%)
�*�a$:ȕ ?a%>31��a$<255:a$+=�?a%:a%+=1:�
�=a$
�
00000000  0d 00 0a 0c f4 3e 73 74  61 74 75 73 0d 00 14 1d  |.....>status....|
00000010  f4 20 72 65 74 75 72 6e  20 74 72 61 6e 73 70 6f  |. return transpo|
00000020  72 74 20 73 74 61 74 75  73 0d 00 1e 1a f4 20 31  |rt status..... 1|
00000030  3d 61 63 74 69 76 65 2c  20 30 3d 69 6e 61 63 74  |=active, 0=inact|
00000040  69 76 65 0d 00 28 09 de  71 25 32 30 0d 00 32 12  |ive..(..q%20..2.|
00000050  72 30 25 3d 30 3a 66 6f  75 6e 64 25 3d 30 0d 00  |r0%=0:found%=0..|
00000060  3c 05 f5 0d 00 46 31 c8  99 22 54 61 73 6b 4d 61  |<....F1.."TaskMa|
00000070  6e 61 67 65 72 5f 45 6e  75 6d 65 72 61 74 65 54  |nager_EnumerateT|
00000080  61 73 6b 73 22 2c 72 30  25 2c 71 25 2c 32 30 20  |asks",r0%,q%,20 |
00000090  b8 72 30 25 0d 00 50 3b  41 24 3d a4 73 74 72 28  |.r0%..P;A$=.str(|
000000a0  71 25 21 34 29 3a e7 c0  41 24 2c a9 28 22 4e 65  |q%!4):..A$,.("Ne|
000000b0  77 73 48 6f 75 6e 64 22  29 29 3d 22 4e 65 77 73  |wsHound"))="News|
000000c0  48 6f 75 6e 64 22 3a 66  6f 75 6e 64 25 3d 31 0d  |Hound":found%=1.|
000000d0  00 5a 14 fd 72 30 25 3c  30 84 66 6f 75 6e 64 25  |.Z..r0%<0.found%|
000000e0  3c 3e 30 0d 00 64 14 f2  65 78 69 74 28 66 6f 75  |<>0..d..exit(fou|
000000f0  6e 64 25 2c 22 22 29 0d  00 6e 05 e0 0d 00 78 04  |nd%,"")..n....x.|
00000100  0d 00 82 11 dd f2 65 78  69 74 28 6e 25 2c 61 24  |......exit(n%,a$|
00000110  29 0d 00 8c 25 ff 28 22  73 65 74 20 4e 65 77 73  |)...%.("set News|
00000120  42 61 73 65 24 52 65 74  75 72 6e 43 6f 64 65 20  |Base$ReturnCode |
00000130  22 2b c3 6e 25 29 0d 00  96 2b e7 61 24 3e 22 22  |"+.n%)...+.a$>""|
00000140  8c ff 28 22 73 65 74 20  4e 65 77 73 42 61 73 65  |..("set NewsBase|
00000150  24 52 65 74 75 72 6e 49  6e 66 6f 20 22 2b 61 24  |$ReturnInfo "+a$|
00000160  29 0d 00 a0 05 e0 0d 00  aa 04 0d 00 b4 0d dd a4  |)...............|
00000170  73 74 72 28 61 25 29 0d  00 be 2a ea 61 24 3a c8  |str(a%)...*.a$:.|
00000180  95 20 3f 61 25 3e 33 31  80 a9 61 24 3c 32 35 35  |. ?a%>31..a$<255|
00000190  3a 61 24 2b 3d bd 3f 61  25 3a 61 25 2b 3d 31 3a  |:a$+=.?a%:a%+=1:|
000001a0  ce 0d 00 c8 07 3d 61 24  0d ff                    |.....=a$..|
000001aa