Concept:
Using the identity
\[
x^2-y^2=(x-y)(x+y)
\]
the equation becomes
\[
(x-y)(x+y)=512
\]
Let
\[
x-y=u,\qquad x+y=v
\]
Then,
\[
uv=512
\]
Step 1: Apply conditions for integer solutions.
Since \(x\) and \(y\) are positive integers,
\[
x=\frac{u+v}{2}, \qquad y=\frac{v-u}{2}
\]
Therefore, \(u\) and \(v\) must both be even.
Also,
\[
v>u>0
\]
Step 2: Find factor pairs of \(512=2^9\).
Possible even factor pairs are:
\[
(2,256),\ (4,128),\ (8,64),\ (16,32)
\]
These give:
\[
(x,y)=(129,127)
\]
\[
(x,y)=(66,62)
\]
\[
(x,y)=(36,28)
\]
\[
(x,y)=(24,8)
\]
Thus, total positive integral solutions are:
\[
4
\]
\[
\boxed{4}
\]