,[BX] 将 TAB 中的数字一次赋给 AL, 再输出正弦波 INC BX INC CX MOV DX,DA0832 OUT DX,AL CALL DELAY PUSH AX MOV DX,B8255 再次读入开关信号,进行比较 IN AL,DX CMP AL,04H JNZ BG2 POP AX CMP CX,256 JNE ZX2 JMP ZXB BG2: JMP BG ZX0 ENDP TXO PROC NEAR 梯形波 LOOP1:MOV CX,0100H MOV AL,00H LL0: MOV DX,DA0832 低电平段 OUT DX,AL CALL DELAY DEC CX JNZ LL0 LL1: INC AL 上升段 MOV DX,DA0832 OUT DX,AL 武汉科技大学《微机原理》课程设计说明书 10 CALL DELAY CMP AL,7FH JNE LL1 MOV CX,0100H LL2: OUT 00H,AL 高电平段 CALL DELAY DEC CX JNZ LL2 LL3: DEC AL 下降段 MOV DX,DA0832 OUT DX,AL CALL DELAY CMP AL,00H JNZ LL3 MOV DX,B8255 再次读入开关信号,进行比较 IN AL,DX CMP AL,05H JNZ BG3 JMP LOOP1 BG3: JMP BG TXO ENDP EXIT:MOV AH,4CH 调用 DOS, 推出 INT 21H DELAY PROC NEAR PUSH CX PUSH AX MOV CL,2 MOV AL,BL SHR AL,CL MOV AH,00H MOV CX,0090H MUL CL MOV CX,AX DEL1:PUSH AX POP AX LOOP DEL1 POP AX POP CX RET