  We determine the partition functions of ${\cal N}=4$ super Yang-Mills gauge
theory for some $ADE$ gauge groups on $K3$, under the assumption that they are
holomorphic. Our partition functions satisfy the gap condition and
Montonen-Olive duality at the same time, like the SU(N) partition functions of
Vafa and Witten. As a result we find a close relation between Hecke operator
and $S$-duality of ${\cal N}=4$ super Yang-Mills for $ADE$ gauge group on $K3$.
