9. In a $4 \times 4$ table, place 4 chess pieces such that each row, each column, and each diagonal contains exactly 1 piece. How many ways are there to do this?

Place the above text in English, preserving the original text's line breaks and format, and output the translation result directly.
【Analysis】Enumeration method, when the piece in the first row is in the first column, there are 2 ways to place it,
when the piece in the first row is in the second column, there are 2 ways to place it,
when the piece in the first row is in the third column, it is the same as in the second column, there are 2 ways to place it, when the piece in the first row is in the fourth column, it is the same as in the first column, there are 2 ways to place it, a total of 8 ways