Translate function now sets the value of source and target registers.