What is the problem with below code?

In reply to rustyguru:

Try:

initial begin
//fork
write();
read();
//join
#100
$finish;
end

It should work