coding kernel for S/R and OS compatability