Here is the code below. Text between double asterisks needs to be replaced with what they meen. e.g. there must be table of types and there size in memory and there min and max