We present a theory to study the relation between compositional order and m
agnetocrystalline anisotropy of ferromagnetic alloys. The ordering phenomen
on is represented by static concentration waves. The electronic part is des
cribed within the spin-polarized relativistic Korringa-Kohn-Rostoker cohere
nt-potential approximation. This scheme can be used to investigate the chan
ge in the magnitude as well as the direction of magnetic anisotropy in an a
lloy at the onset of ordering. The same framework can also be used to study
directional chemical order produced by magnetic annealing. We have calcula
ted the magnetocrystalline anisotropy energy of ordered fcc-Co0.5Pt0.5 allo
y using this method. We find that the magnetocrystalline anisotropy energy
of the ordered phase is two orders of magnitude larger than that of the dis
ordered phase. Also, that the direction of 'easy' magnetization in the orde
red phase depends on the type of ordering. These results are in good agreem
ent with the experimental observations.