save registers in the debug output code (return value is overwritten too)