fixed 1980's function declaration style; as well as fixed memsets (the size was just given in bytes, instead of 16 bit words, because I didn't multiplied the sizes by the array data type)