部分源程序如下:#include#include#defineucharunsignedcharsbitBUSY=P2^6;sbitSTB=P2^7;voidtopin(uchar*p){while(*p!='\0'){while(BUSY!=0);//查询打印机状态P0=*p;//输出字符STB=0;//模拟STB脉冲p++;}}voidmain(){ucharidataprn[]="welcome";