We solve the problem of constructing separately continuous functions on the product of compact spaces with a given set of discontinuity points. We obtain the following results. For arbitrary. Cech complete spaces X, Y, and a separable compact perfect projectively nowhere dense zero set E subset of X x Y there exists a separately continuous function f : X x Y -> R the set of discontinuity points, which coincides with E. For arbitrary. Cech complete spaces X, Y, and nowhere dense zero sets A subset of X and B subset of Y there exists a separately continuous function f : X x Y -> R such that the projections of the set of discontinuity points of f coincides with A and B, respectively. We construct an example of Eberlein compacts X, Y, and nowhere dense zero sets A subset of X and B subset of Y such that the set of discontinuity points of every separately continuous function f : XxY -> R does not coincide with AxB, and a CH-example of separable Valdivia compacts X, Y and separable nowhere dense zero sets A subset of X and B subset of Y such that the set of discontinuity points of every separately continuous function f : X x Y -> R does not coincide with A x B.