int类型的数至少会有16bit,你想送8bit,这样写P2OUT = (DATA & 0xFF);还不行的话用P2OUT = (unsigned char)(DATA & 0xFF).
DATA 是系统关键字! 不能用作变量名!
unsigned char DATA;P2OUT=DATA;