全文预览

微机原理与接口技术-8254电子发声器 课程设计 BY(凉)

上传者:hnxzy51 |  格式:doc  |  页数:7 |  大小:168KB

文档介绍
Р MOV DX,MY8255_AР OUT DX,ALР MOV DX,MY8255_CР IN AL,DXРL1:TEST AL,01HР?JNZ L2Р?MOV AL,00HР?JMP KCODEРL2:TEST AL,02HР?JNZ L3Р?MOV AL,04HР?JMP KCODE РL3:TEST AL,04HР?JNZ L4Р?MOV AL,08HР?JMP KCODEРL4:TEST AL,08HР?JNZ NEXTР?MOV AL,0CHРKCODE: ADD AL,CLР CALL PLAYР Р PUSH AXРKON:CALL DALLYР?SCANР?JNZ KONР?POP AXР?JMP BEGIN1РNEXT:INC CLР MOV AL,CHР?TEST AL,08HР?JZ KERRР?ROL AL,1Р?MOV CH,ALР?JMP COLUMРKERR:JMP BEGIN1РCCSCAN:MOV AL,00HР MOV DX,MY8255_AР OUT DX,ALР MOV DX,MY8255_CР?IN AL,DXР?NOT ALР?AND AL,0FHР?RETР?РPLAY PROCР MOV AH,0Р MOV SI,AXР SHL SI,1Р MOV DX,0FHР MOV AX,4240HР DIV WORD PTR [SI]Р MOV DX,MY8254_COUNT0Р OUT?DX,ALР MOV AL,AHР OUT?DX,ALР RETРPLAY ENDP РDALLY PROCР D0: MOV CX,0010HР D1: MOV AX,02HР D2: DEC AXР JNZ D2Р LOOP D1Р DEC DLР JNZ D0?Р RET РDALLY ENDP РCODE ENDSР END START

收藏

分享

举报
下载此文档