Program works as a 32bit counter and its state is written on ports A,B,D,E (where A is the highest and E is the lowest byte). When counter overflow it is cleared and counts upward again.