10 ON ERROR REPORT:OSCLI"FX2":END
20 MODE0
30 PRINT'"Econet Monitor Packet Descriptor. (C)1987 HCE"
40 PRINT"Connect this station to another station with the RS232 link, then type:"
50 PRINT" *FX5,2"'" VDU2:*NETMON"'" On the other station."
60 *FX2,1
70 GOTO330
80 DEFFN_byte(flg)
90 A=GET:IF A=105 =-1
100 IF A=118 AND flg THEN =-2
110 IF A=100 PRINT'"No Clock ";
120 IF A<48 OR A>70 GOTO90
130 B=GET:=EVAL("&"+CHR$(A)+CHR$(B))
140 :
150 DEFFN_FRAME
160 a=FN_byte(0):IF a<0 THEN =-1
170 b=FN_byte(0):IF b<0 THEN =-1 ELSE PRINT" from ";b;".";a;
180 a=FN_byte(0):IF a<0 THEN =-1
190 b=FN_byte(0):IF b<0 THEN =-1 ELSE PRINT" to ";b;".";a;" ";:=0
200 :
210
220 PRINT" Aborted."
230 PRINT"Scout";:IF FN_FRAME GOTO220
240 a=FN_byte(0):IF a<0 GOTO220 ELSE PRINT"Code ";~a;
250 a=FN_byte(0):IF a<0 GOTO220 ELSE PRINT" Channel ";~a
260 PRINT" Acknowledgement";:IF FN_FRAME GOTO220
270 PRINT'" Data";:IF FN_FRAME GOTO220
280 REPEAT a=FN_byte(-1):IF a>31 VDUa
290 IF a<32 AND a>0 PRINT"(";~a;")";
300 UNTIL a<0:IF a=-1 GOTO220
310 a=FN_byte(0)
320 PRINT'" Reply ack.";:IF FN_FRAME GOTO220
330 REPEAT:UNTILFN_byte(0)=-1
340 PRINT:GOTO230