DI ADD?SI,360SUB?SI,CXMOV?BL,[SI]MOV?AL,127SUB?AL,BLOUT?DX,ALINC?CXMOV?DS:[0602H],CX?RETquadrant5:MOV?WORDPTRDS:[0602H],0?RETINIT:?MOVAL,89HMOVDX,IOCONPTOUTDX,ALMOV?BYTEPTRDS:[JUMP],3;SINMOV?BYTEPTRDS:[VAL],0MOV?WORDPTRDS:[0602H],0MOV?SI,OFFSETSINADD?SI,1000HMOV?DI,SIMOV?DX,DAPORT?RETDELE:?PUSH?CXMOV?CX,60HDACON2:LOOP?DACON2POP?CX?RETLEDDISP:PUSH?DXPUSH?AXPUSH?BX MOV?AL,90HMOV?DX,CONTPORTOUT?DX,ALMOV?BX,0LED1:?CMP?BX,7JA?LED2MOV?AL,DS:[BX+DATA]MOV?DX,DATAPORTOUT?DX,ALINC?BXJMP?LED1LED2:?POP?BXPOP?AXPOP?DX RET?FORMAT:MOVBX,0MOVWORDPTRDS:[BX+0500H],3F06H?;显示01ADDBX,2MOVWORDPTRDS:[BX+0500H],4040H?;显示--ADDBX,2MOVWORDPTRDS:[BX+0500H],4F5BH?;显示32ADDBX,2MOVWORDPTRDS:[BX+0500H],3F7FH?;显示08ADDBX,2RETCODE?ENDSEND?START四、实验结果(可以抓图粘贴)(一)开关状态为00时,其截图如下:图一:数码管显示截图图二:两个灯的状态,此时不亮图三:显示的方波(二)开关状态为01时,其截图如下: