[tst1.py] Added function to write 32bit registers and added writing to file