Fixed anomaly (remember to check sizes when comparing between a register
and memory, folks!) and added a routine to print a hexadecimal int.