Home » Personal collection » Acorn hard disk » apps » Econet » Oddments/!NetCom/!RunImage2

Oddments/!NetCom/!RunImage2

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 » Personal collection » Acorn hard disk » apps » Econet
Filename: Oddments/!NetCom/!RunImage2
Read OK:
File size: 073F bytes
Load address: 0000
Exec address: 0000
File contents
   10PROCinit
   20REPEAT:REPEAT
   30PRINT "1) NetComm"
   40PRINT "2) OSCLI"
   50PRINT "3) Notify"
   60PRINT "4) Ping"
   70PRINT "5) Error"
   80PRINT "6) Exit"
   90INPUT "Which option? "o%
  100UNTIL o%>0 AND o%<7
  110CASE o% OF
  120 WHEN 1 :PROCnetcomm
  130 WHEN 2 :PROCcomm
  140 WHEN 3 :PROCnotify
  150 WHEN 4 :PROCping
  160 WHEN 5 :PROCerror
  170ENDCASE
  180UNTIL o%=6
  190END
  200
  210DEF PROCnetcomm
  220 PROCinput(&100)
  230 $buf%=com$+CHR$13
  240 SYS "Econet_StartTransmit",0,99,stn%,net%,buf%,LEN($buf%),3,50 TO hand%
  250 PROCpoll_end
  260ENDPROC
  270
  280DEF PROCinput(s%)
  290 INPUT "Message: "com$
  300 INPUT "Destination: "dest$
  310 SYS "Econet_ReadStationNumber",,dest$ TO ,,stn%,net%
  320 IF s%>0 :SYS "OS_Module",6,,,s%+8 TO ,,buf%
  330 buf%+=8
  340ENDPROC
  350
  360DEF PROCpoll_end
  370 IF err%=0 THEN
  380$buf2%=STRING$(255,CHR$0)
  390  REPEAT
  400 SYS "Econet_PollTransmit",hand% TO st%
  410  UNTIL st%<5
  420  PRINT "Done"
  430
  440  SYS "Econet_ConvertStatusToString",st%,buf2%,&100,stn%,net% TO ob%
  450  PRINT "'"$ob%"'"'st%
  460 ENDIF
  470 IF hand%<>0 :SYS "Econet_AbandonTransmit",hand%:hand%=0
  480 IF buf%<>0 :SYS "OS_Module",7,,buf%-8:buf%=0
  490ENDPROC
  500
  510DEF PROCinit
  520 DIM buf2% &200
  530 buf%=0:hand%=0:err%=0
  540REM ON ERROR PROCerr:RUN
  550ENDPROC
  560
  570DEF PROCerr
  580err%+=1:PROCpoll_end
  590PRINT "Error Level";err%
  600REPORT:PRINT " @ ";ERL
  610ENDPROC
  620
  630DEF PROCcomm
  640 PROCinput(&200)
  650 P%=buf%
  660 [OPT2
  670  ADD R0,R1,#16:SWI "OS_CLI"
  680  MOV RC,R14:MOVNV R0,R0
  690  EQUS com$+CHR$0
  700 ]
  710SYS "Econet_StartImmediate",3,-1,stn%,net%,buf%,P%-buf%,3,100 TO hand%
  720PROCpoll_end
  730ENDPROC
  740
  750DEFPROCnotify
  760PROCinput(&100)
  770$buf%=com$+CHR$0
  780SYS"Econet_StartImmediate",5,0,stn%,net%,buf%,len($buf%),3,100 to hand%
  790PROCpoll_end
  800ENDPROC
  810
  820DEFPROCerror
  830PROCinput(&100)
  840$(buf%)="    "+com$+CHR$0
  850SYS "Econet_StartImmediate",5,3,stn%,net%,buf%,LEN($buf%),20,500 TO hand%
  860PROCpoll_end
  870ENDPROC
  880
  890DEFPROCping
  900PROCinput(0)
  910SYS "OS_File",5,com$ TO t%,,,,len%
  920SYS "OS_Module",6,,,len%+8 TO ,,buf%
  930buf%+=8
  940SYS "OS_File",255,com$,buf%,0
  950SYS "Econet_StartImmediate",3,-1,stn%,net%,buf%,len%,3,100 TO hand%
  960PROCpoll_end
  970ENDPROC

	�init
�:�
� "1) NetComm"
(� "2) OSCLI"
2� "3) Notify"
<� "4) Ping"
F� "5) Error"
P� "6) Exit"
Z� "Which option? "o%
d� o%>0 � o%<7
nȎ o% �
x � 1 :�netcomm
� � 2 :�comm
� � 3 :�notify
� � 4 :�ping
� � 5 :�error
��
�
� o%=6
��
�
�� �netcomm
� �input(&100)
� $buf%=com$+�13
�H ș "Econet_StartTransmit",0,99,stn%,net%,buf%,�($buf%),3,50 � hand%
� �poll_end
�

� �input(s%)
" � "Message: "com$
, � "Destination: "dest$
67 ș "Econet_ReadStationNumber",,dest$ � ,,stn%,net%
@- � s%>0 :ș "OS_Module",6,,,s%+8 � ,,buf%
J buf%+=8
T�
^
h� �poll_end
r � err%=0 �
|$buf2%=�255,�0)
�  �
�) ș "Econet_PollTransmit",hand% � st%
�
  � st%<5
�  � "Done"
�
�F  ș "Econet_ConvertStatusToString",st%,buf2%,&100,stn%,net% � ob%
�  � "'"$ob%"'"'st%
� �
�: � hand%<>0 :ș "Econet_AbandonTransmit",hand%:hand%=0
�/ � buf%<>0 :ș "OS_Module",7,,buf%-8:buf%=0
��
�
�� �init
 � buf2% &200
 buf%=0:hand%=0:err%=0
� ON ERROR PROCerr:RUN
&�
0
:
� �err
Derr%+=1:�poll_end
N� "Error Level";err%
X�:� " @ ";�
b�
l
v� �comm
� �input(&200)
� P%=buf%
�
 [OPT2
�   ADD R0,R1,#16:SWI "OS_CLI"
�  MOV RC,R14:MOVNV R0,R0
�  EQUS com$+�0
� ]
�Hș "Econet_StartImmediate",3,-1,stn%,net%,buf%,P%-buf%,3,100 � hand%
�
�poll_end
��
�
���notify
��input(&100)
$buf%=com$+�0
Jș"Econet_StartImmediate",5,0,stn%,net%,buf%,len($buf%),3,100 to hand%

�poll_end
 �
*
4��error
>�input(&100)
H$(buf%)="    "+com$+�0
RIș "Econet_StartImmediate",5,3,stn%,net%,buf%,�($buf%),20,500 � hand%
\
�poll_end
f�
p
z
��ping
�
�input(0)
�$ș "OS_File",5,com$ � t%,,,,len%
�&ș "OS_Module",6,,,len%+8 � ,,buf%
�buf%+=8
� ș "OS_File",255,com$,buf%,0
�Eș "Econet_StartImmediate",3,-1,stn%,net%,buf%,len%,3,100 � hand%
�
�poll_end
��
�
00000000  0d 00 0a 09 f2 69 6e 69  74 0d 00 14 07 f5 3a f5  |.....init.....:.|
00000010  0d 00 1e 12 f1 20 22 31  29 20 4e 65 74 43 6f 6d  |..... "1) NetCom|
00000020  6d 22 0d 00 28 10 f1 20  22 32 29 20 4f 53 43 4c  |m"..(.. "2) OSCL|
00000030  49 22 0d 00 32 11 f1 20  22 33 29 20 4e 6f 74 69  |I"..2.. "3) Noti|
00000040  66 79 22 0d 00 3c 0f f1  20 22 34 29 20 50 69 6e  |fy"..<.. "4) Pin|
00000050  67 22 0d 00 46 10 f1 20  22 35 29 20 45 72 72 6f  |g"..F.. "5) Erro|
00000060  72 22 0d 00 50 0f f1 20  22 36 29 20 45 78 69 74  |r"..P.. "6) Exit|
00000070  22 0d 00 5a 18 e8 20 22  57 68 69 63 68 20 6f 70  |"..Z.. "Which op|
00000080  74 69 6f 6e 3f 20 22 6f  25 0d 00 64 11 fd 20 6f  |tion? "o%..d.. o|
00000090  25 3e 30 20 80 20 6f 25  3c 37 0d 00 6e 0b c8 8e  |%>0 . o%<7..n...|
000000a0  20 6f 25 20 ca 0d 00 78  12 20 c9 20 31 20 3a f2  | o% ...x. . 1 :.|
000000b0  6e 65 74 63 6f 6d 6d 0d  00 82 0f 20 c9 20 32 20  |netcomm.... . 2 |
000000c0  3a f2 63 6f 6d 6d 0d 00  8c 11 20 c9 20 33 20 3a  |:.comm.... . 3 :|
000000d0  f2 6e 6f 74 69 66 79 0d  00 96 0f 20 c9 20 34 20  |.notify.... . 4 |
000000e0  3a f2 70 69 6e 67 0d 00  a0 10 20 c9 20 35 20 3a  |:.ping.... . 5 :|
000000f0  f2 65 72 72 6f 72 0d 00  aa 05 cb 0d 00 b4 0a fd  |.error..........|
00000100  20 6f 25 3d 36 0d 00 be  05 e0 0d 00 c8 04 0d 00  | o%=6...........|
00000110  d2 0e dd 20 f2 6e 65 74  63 6f 6d 6d 0d 00 dc 11  |... .netcomm....|
00000120  20 f2 69 6e 70 75 74 28  26 31 30 30 29 0d 00 e6  | .input(&100)...|
00000130  13 20 24 62 75 66 25 3d  63 6f 6d 24 2b bd 31 33  |. $buf%=com$+.13|
00000140  0d 00 f0 48 20 c8 99 20  22 45 63 6f 6e 65 74 5f  |...H .. "Econet_|
00000150  53 74 61 72 74 54 72 61  6e 73 6d 69 74 22 2c 30  |StartTransmit",0|
00000160  2c 39 39 2c 73 74 6e 25  2c 6e 65 74 25 2c 62 75  |,99,stn%,net%,bu|
00000170  66 25 2c a9 28 24 62 75  66 25 29 2c 33 2c 35 30  |f%,.($buf%),3,50|
00000180  20 b8 20 68 61 6e 64 25  0d 00 fa 0e 20 f2 70 6f  | . hand%.... .po|
00000190  6c 6c 5f 65 6e 64 0d 01  04 05 e1 0d 01 0e 04 0d  |ll_end..........|
000001a0  01 18 10 dd 20 f2 69 6e  70 75 74 28 73 25 29 0d  |.... .input(s%).|
000001b0  01 22 16 20 e8 20 22 4d  65 73 73 61 67 65 3a 20  |.". . "Message: |
000001c0  22 63 6f 6d 24 0d 01 2c  1b 20 e8 20 22 44 65 73  |"com$..,. . "Des|
000001d0  74 69 6e 61 74 69 6f 6e  3a 20 22 64 65 73 74 24  |tination: "dest$|
000001e0  0d 01 36 37 20 c8 99 20  22 45 63 6f 6e 65 74 5f  |..67 .. "Econet_|
000001f0  52 65 61 64 53 74 61 74  69 6f 6e 4e 75 6d 62 65  |ReadStationNumbe|
00000200  72 22 2c 2c 64 65 73 74  24 20 b8 20 2c 2c 73 74  |r",,dest$ . ,,st|
00000210  6e 25 2c 6e 65 74 25 0d  01 40 2d 20 e7 20 73 25  |n%,net%..@- . s%|
00000220  3e 30 20 3a c8 99 20 22  4f 53 5f 4d 6f 64 75 6c  |>0 :.. "OS_Modul|
00000230  65 22 2c 36 2c 2c 2c 73  25 2b 38 20 b8 20 2c 2c  |e",6,,,s%+8 . ,,|
00000240  62 75 66 25 0d 01 4a 0c  20 62 75 66 25 2b 3d 38  |buf%..J. buf%+=8|
00000250  0d 01 54 05 e1 0d 01 5e  04 0d 01 68 0f dd 20 f2  |..T....^...h.. .|
00000260  70 6f 6c 6c 5f 65 6e 64  0d 01 72 0f 20 e7 20 65  |poll_end..r. . e|
00000270  72 72 25 3d 30 20 8c 0d  01 7c 13 24 62 75 66 32  |rr%=0 ...|.$buf2|
00000280  25 3d c4 32 35 35 2c bd  30 29 0d 01 86 07 20 20  |%=.255,.0)....  |
00000290  f5 0d 01 90 29 20 c8 99  20 22 45 63 6f 6e 65 74  |....) .. "Econet|
000002a0  5f 50 6f 6c 6c 54 72 61  6e 73 6d 69 74 22 2c 68  |_PollTransmit",h|
000002b0  61 6e 64 25 20 b8 20 73  74 25 0d 01 9a 0d 20 20  |and% . st%....  |
000002c0  fd 20 73 74 25 3c 35 0d  01 a4 0e 20 20 f1 20 22  |. st%<5....  . "|
000002d0  44 6f 6e 65 22 0d 01 ae  04 0d 01 b8 46 20 20 c8  |Done".......F  .|
000002e0  99 20 22 45 63 6f 6e 65  74 5f 43 6f 6e 76 65 72  |. "Econet_Conver|
000002f0  74 53 74 61 74 75 73 54  6f 53 74 72 69 6e 67 22  |tStatusToString"|
00000300  2c 73 74 25 2c 62 75 66  32 25 2c 26 31 30 30 2c  |,st%,buf2%,&100,|
00000310  73 74 6e 25 2c 6e 65 74  25 20 b8 20 6f 62 25 0d  |stn%,net% . ob%.|
00000320  01 c2 16 20 20 f1 20 22  27 22 24 6f 62 25 22 27  |...  . "'"$ob%"'|
00000330  22 27 73 74 25 0d 01 cc  06 20 cd 0d 01 d6 3a 20  |"'st%.... ....: |
00000340  e7 20 68 61 6e 64 25 3c  3e 30 20 3a c8 99 20 22  |. hand%<>0 :.. "|
00000350  45 63 6f 6e 65 74 5f 41  62 61 6e 64 6f 6e 54 72  |Econet_AbandonTr|
00000360  61 6e 73 6d 69 74 22 2c  68 61 6e 64 25 3a 68 61  |ansmit",hand%:ha|
00000370  6e 64 25 3d 30 0d 01 e0  2f 20 e7 20 62 75 66 25  |nd%=0.../ . buf%|
00000380  3c 3e 30 20 3a c8 99 20  22 4f 53 5f 4d 6f 64 75  |<>0 :.. "OS_Modu|
00000390  6c 65 22 2c 37 2c 2c 62  75 66 25 2d 38 3a 62 75  |le",7,,buf%-8:bu|
000003a0  66 25 3d 30 0d 01 ea 05  e1 0d 01 f4 04 0d 01 fe  |f%=0............|
000003b0  0b dd 20 f2 69 6e 69 74  0d 02 08 11 20 de 20 62  |.. .init.... . b|
000003c0  75 66 32 25 20 26 32 30  30 0d 02 12 1a 20 62 75  |uf2% &200.... bu|
000003d0  66 25 3d 30 3a 68 61 6e  64 25 3d 30 3a 65 72 72  |f%=0:hand%=0:err|
000003e0  25 3d 30 0d 02 1c 1a f4  20 4f 4e 20 45 52 52 4f  |%=0..... ON ERRO|
000003f0  52 20 50 52 4f 43 65 72  72 3a 52 55 4e 0d 02 26  |R PROCerr:RUN..&|
00000400  05 e1 0d 02 30 04 0d 02  3a 0a dd 20 f2 65 72 72  |....0...:.. .err|
00000410  0d 02 44 15 65 72 72 25  2b 3d 31 3a f2 70 6f 6c  |..D.err%+=1:.pol|
00000420  6c 5f 65 6e 64 0d 02 4e  18 f1 20 22 45 72 72 6f  |l_end..N.. "Erro|
00000430  72 20 4c 65 76 65 6c 22  3b 65 72 72 25 0d 02 58  |r Level";err%..X|
00000440  0f f6 3a f1 20 22 20 40  20 22 3b 9e 0d 02 62 05  |..:. " @ ";...b.|
00000450  e1 0d 02 6c 04 0d 02 76  0b dd 20 f2 63 6f 6d 6d  |...l...v.. .comm|
00000460  0d 02 80 11 20 f2 69 6e  70 75 74 28 26 32 30 30  |.... .input(&200|
00000470  29 0d 02 8a 0c 20 50 25  3d 62 75 66 25 0d 02 94  |).... P%=buf%...|
00000480  0a 20 5b 4f 50 54 32 0d  02 9e 20 20 20 41 44 44  |. [OPT2...   ADD|
00000490  20 52 30 2c 52 31 2c 23  31 36 3a 53 57 49 20 22  | R0,R1,#16:SWI "|
000004a0  4f 53 5f 43 4c 49 22 0d  02 a8 1c 20 20 4d 4f 56  |OS_CLI"....  MOV|
000004b0  20 52 43 2c 52 31 34 3a  4d 4f 56 4e 56 20 52 30  | RC,R14:MOVNV R0|
000004c0  2c 52 30 0d 02 b2 12 20  20 45 51 55 53 20 63 6f  |,R0....  EQUS co|
000004d0  6d 24 2b bd 30 0d 02 bc  06 20 5d 0d 02 c6 48 c8  |m$+.0.... ]...H.|
000004e0  99 20 22 45 63 6f 6e 65  74 5f 53 74 61 72 74 49  |. "Econet_StartI|
000004f0  6d 6d 65 64 69 61 74 65  22 2c 33 2c 2d 31 2c 73  |mmediate",3,-1,s|
00000500  74 6e 25 2c 6e 65 74 25  2c 62 75 66 25 2c 50 25  |tn%,net%,buf%,P%|
00000510  2d 62 75 66 25 2c 33 2c  31 30 30 20 b8 20 68 61  |-buf%,3,100 . ha|
00000520  6e 64 25 0d 02 d0 0d f2  70 6f 6c 6c 5f 65 6e 64  |nd%.....poll_end|
00000530  0d 02 da 05 e1 0d 02 e4  04 0d 02 ee 0c dd f2 6e  |...............n|
00000540  6f 74 69 66 79 0d 02 f8  10 f2 69 6e 70 75 74 28  |otify.....input(|
00000550  26 31 30 30 29 0d 03 02  11 24 62 75 66 25 3d 63  |&100)....$buf%=c|
00000560  6f 6d 24 2b bd 30 0d 03  0c 4a c8 99 22 45 63 6f  |om$+.0...J.."Eco|
00000570  6e 65 74 5f 53 74 61 72  74 49 6d 6d 65 64 69 61  |net_StartImmedia|
00000580  74 65 22 2c 35 2c 30 2c  73 74 6e 25 2c 6e 65 74  |te",5,0,stn%,net|
00000590  25 2c 62 75 66 25 2c 6c  65 6e 28 24 62 75 66 25  |%,buf%,len($buf%|
000005a0  29 2c 33 2c 31 30 30 20  74 6f 20 68 61 6e 64 25  |),3,100 to hand%|
000005b0  0d 03 16 0d f2 70 6f 6c  6c 5f 65 6e 64 0d 03 20  |.....poll_end.. |
000005c0  05 e1 0d 03 2a 04 0d 03  34 0b dd f2 65 72 72 6f  |....*...4...erro|
000005d0  72 0d 03 3e 10 f2 69 6e  70 75 74 28 26 31 30 30  |r..>..input(&100|
000005e0  29 0d 03 48 1a 24 28 62  75 66 25 29 3d 22 20 20  |)..H.$(buf%)="  |
000005f0  20 20 22 2b 63 6f 6d 24  2b bd 30 0d 03 52 49 c8  |  "+com$+.0..RI.|
00000600  99 20 22 45 63 6f 6e 65  74 5f 53 74 61 72 74 49  |. "Econet_StartI|
00000610  6d 6d 65 64 69 61 74 65  22 2c 35 2c 33 2c 73 74  |mmediate",5,3,st|
00000620  6e 25 2c 6e 65 74 25 2c  62 75 66 25 2c a9 28 24  |n%,net%,buf%,.($|
00000630  62 75 66 25 29 2c 32 30  2c 35 30 30 20 b8 20 68  |buf%),20,500 . h|
00000640  61 6e 64 25 0d 03 5c 0d  f2 70 6f 6c 6c 5f 65 6e  |and%..\..poll_en|
00000650  64 0d 03 66 05 e1 0d 03  70 04 0d 03 7a 0a dd f2  |d..f....p...z...|
00000660  70 69 6e 67 0d 03 84 0d  f2 69 6e 70 75 74 28 30  |ping.....input(0|
00000670  29 0d 03 8e 24 c8 99 20  22 4f 53 5f 46 69 6c 65  |)...$.. "OS_File|
00000680  22 2c 35 2c 63 6f 6d 24  20 b8 20 74 25 2c 2c 2c  |",5,com$ . t%,,,|
00000690  2c 6c 65 6e 25 0d 03 98  26 c8 99 20 22 4f 53 5f  |,len%...&.. "OS_|
000006a0  4d 6f 64 75 6c 65 22 2c  36 2c 2c 2c 6c 65 6e 25  |Module",6,,,len%|
000006b0  2b 38 20 b8 20 2c 2c 62  75 66 25 0d 03 a2 0b 62  |+8 . ,,buf%....b|
000006c0  75 66 25 2b 3d 38 0d 03  ac 20 c8 99 20 22 4f 53  |uf%+=8... .. "OS|
000006d0  5f 46 69 6c 65 22 2c 32  35 35 2c 63 6f 6d 24 2c  |_File",255,com$,|
000006e0  62 75 66 25 2c 30 0d 03  b6 45 c8 99 20 22 45 63  |buf%,0...E.. "Ec|
000006f0  6f 6e 65 74 5f 53 74 61  72 74 49 6d 6d 65 64 69  |onet_StartImmedi|
00000700  61 74 65 22 2c 33 2c 2d  31 2c 73 74 6e 25 2c 6e  |ate",3,-1,stn%,n|
00000710  65 74 25 2c 62 75 66 25  2c 6c 65 6e 25 2c 33 2c  |et%,buf%,len%,3,|
00000720  31 30 30 20 b8 20 68 61  6e 64 25 0d 03 c0 0d f2  |100 . hand%.....|
00000730  70 6f 6c 6c 5f 65 6e 64  0d 03 ca 05 e1 0d ff     |poll_end.......|
0000073f