code: def print_hex(self, value, justify_right=True):
          
          if value < 0 or value > 0xFFFF:
              # Ignore out of range values.
              return
          self.print_str('{0:X}'.format(value), justify_right)
docs: Print a numeric value in hexadecimal.  Value should be from 0 to FFFF.