Edzol Heinkl asked:
Would a compass work on Mars?
No, it would not. Unfortunately Mars does not have a magnetic field anymore. The magnetic field on Earth is generated by the core rotating inside the Earth and Mars has just cooled down too much and that whole process has just been frozen. So it has lost its magnetic field. Some rocks are still magnetised but the planet itself has no overall field.