C hardway codes