%include "moose:mouse.inc"
%include "sys:ether.inc"
%include "sys:util.imp"

%ownbytearray buff(1:532)
%Begin
   %integer x,i

   %on 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 %start
      printstring("Listen-".event_message);newline
!      ether free port (0)
      %Stop
   %finish

   open output (0,":t");selectoutput(0)
   Printstring ("Port 0 listener running");newline
   ether allocate zero
   %cycle
      ether receive block (0,532,x,buff(1))
      PrintString ("Message on port 0 from ");
      phex2(buff(1));printstring(" - ")
      PrintString (string(addr(buff(7))))
      newline
   %Repeat
%End
