def inhexrange(hsa, hsz, addr):
  """Check if addr within hex range."""
  staddr = int(hsa, 16)
  enaddr = int(hsa, 16) + int(hsz, 16)
  if addr >= staddr and addr <= enaddr:
    return True
  return False