Added debugging function to print all register values.