module reg_for_mouse(clk,rst,en,set0,din,dout);
   input clk,rst,en,set0;
   input [7:0] din;
   output reg [7:0] dout;
   always@(posedge clk)
     if(rst)
       dout<=0;
     else if(set0)
       dout<=0;
     else if(en)
       dout<=din;
     else
       dout<=dout;
endmodule // reg_for_mouse

   