用8255A控制一组红、绿、黄灯,如下图所示。要求用K1、K2的闭合与断开来控制红、绿、黄三灯点亮,对应关系如题表所示。设8255A的端口地址范围为60H~63H,请设计完整的程序。
CODESEGMENTASSUMECS:CODESTART:MOVAX,DATAMOVDS,AXMOVAL,82HOUT63H,AL;8255A初始化AGAIN:INAL,61HCMPAL,00HJEL2;K1、K2全闭合,转L2CMPAL,03HJEL2;K1、K2全断开,转L2CMPAL,02HJEL1;K1闭合、K2断开MOVAL,02H;亮绿灯OUT60H,ALJMPAGAINL1:MOV