12. Given that the orthocenter of $\triangle A B C$ is $H$. If $B(0,0)$, $C(2,0)$, and point $H$ moves on the circle
$$
(x-1)^{2}+(y+1)^{2}=2
$$

then the locus of the moving point $A$ is $\qquad$ .
12. The circle $(x-1)^{2}+(y-1)^{2}=2(y \neq 0)$ and the lines $x=0(y \neq 0)$ or $x=2(y \neq 0)$.
Let $A(x, y), H\left(x, y_{1}\right)$.
When $x \neq 0, x \neq 2$,
$$
\frac{y_{1}}{x} \cdot \frac{y}{x-2}=-1, y_{1}=-\frac{x^{2}-2 x}{y} \text {. }
$$

Since point $H$ is on the circle $(x-1)^{2}+(y+1)^{2}=2$, we have
$$
(x-1)^{2}+\left(-\frac{x^{2}-2 x}{y}+1\right)^{2}=2,
$$

which simplifies to $\left(x^{2}-2 x\right)\left(y^{2}-2 y+x^{2}-2 x\right)=0$.
Since $x \neq 0, x \neq 2$, it follows that $x^{2}-2 x \neq 0$.
Thus, $(x-1)^{2}+(y-1)^{2}=2$.
When $x=0$ or 2, as long as $y \neq 0$, $\triangle A B C$ is a right triangle, with its orthocenter at point $B$ or $C$, both of which lie on the circle $(x-1)^{2}+(y+1)^{2}=2$.
In summary, the locus of point $A$ is the circle
$$
(x-1)^{2}+(y-1)^{2}=2(y \neq 0)
$$

and the lines
$$
x=0(y \neq 0) \text { or } x=2(y \neq 0) \text {. }
$$