DS:[SI+2]MOVBH,0 ;取出电压值小数点后第二位LEASI,TABLEADDSI,BXMOVBL,CS:[SI];得到电压值小数点后第二位的数码管显示码MOVDX,04B4HMOVAL,0E0HOUTDX,AL;选通LED1数码管MOVDX,04B2HMOVAL,BLOUTDX,AL ;通过B口送入显示码CALLDELAYMOVSI,2000HMOVBL,DS:[SI+1]MOVBH,0 ;取出电压值小数点后第一位LEASI,TABLEADDSI,BXMOVBL,CS:[SI] ;得到电压值小数点后第一位的数码管显示码MOVAL,0D0HMOVDX,04B4HOUTDX,AL ;选通LED2数码管MOVDX,04B2HMOVAL,BLOUTDX,AL ;通过B口送入显示码CALLDELAYMOVSI,2000HMOVBL,DS:[SI]MOVBH,0 ;取出电压值个位值LEASI,TABLE1ADDSI,BXMOVBL,CS:[SI] ;得到电压值个位值的数码管显示码MOVAL,0B0HMOVDX,04B4HOUTDX,AL ;选通LED3数码管MOVDX,04B2HMOVAL,BLOUTDX,AL ;通过B口送入显示码CALLDELAYMOVDX,04B0HINAL,DXANDAL,00000001CMPAL,0 ;PA0是否接收到一低电平JNZL1 ;PA0没有接收到低电平,跳到数码管显示程序JMPL2 ;PA0接收到低电平,跳到电压采集程序DELAY:MOVBP,100H ;延时程序DELAY1:DECBPCMPBP,0JNEDELAY1RETGETAD:PUSHDXMOVAX,34H ;启动A/DOUTDX,AXCALLDELAYMOVDX,04B4H;指向8255C口地址WAIT1:INAX,DX;读进EOC状态TESTAX,1JZWAIT1POPDX