Thanks for your replies. I've spent quite a lot of time trying to install a profiler. I've got Mandrake Linux on my pc and I've installed other things (like Firefox and Thunderbird) without any problems, but I'm still trying to get a profiler to work! Anwyay, I recently decided to take David's advice and changed all the code to use two 64-bit longs to represent the black and white board positions. The program now runs faster than it did, which is great, but from what I've read I think it could be a bit better. My pc is a Pentium II, with 500MB of RAM and the game can only really look 4 moves ahead (if it tries to search any deeper than this, it takes a long time to determine the next move). I'm already using alpha-beta pruning - good suggestion though. I'd say using alpha-beta pruning has had the biggest effect on the game speed so far.
I've recently read that a particular board position can potentially be reached by more than one sequence of moves. This means that a board might be evaluated more than once, but this can be avoided by storing boards (and the best move for the board) in a hashtable. Before a board is evaluated, the hash table is searched and if the board is found the best move is just read from the table, saving time. On one website I read this can speed up a program by 20 to 50% :-)