initial
begin
a = 0;
b = 0;
add_en = 1;
#5 a = 8'h34;
#5 b = 8'h10;
#5 add_en = 0;
end
always @(a,b,add_en)
begin
if(add_en==1)
begin
if(result==a+b)
$display($time,"%h+%h=%h",a,b,result);
else
$display($time,"error! %h+%h!=%h",a,b,result);
end
else
begin
if(result==a-b)
$display($time,"%h-%h=%h",a,b,result);
else
$display($time,"error! %h-%h!=%h",a,b,result);
end
end