seldi
if(LASTSTATE!=seldi) {
STATE=seldi;
if((stat0 & SELDI) && STATE!=seldi && !dataphase) {
} else if(STATE==seldi) {