1、R1 DW ?R2 DW ?R3 DW ?R4 DW ?R5 DW ?R6 DW ?R7 DB ?R8 DW ?DATA ENDSCODE SEGMENT ASSUME CS:CODE,DS:DATASTART: MOV AX,DATA MOV DS,AXMAIN: CALL SYSTEM CALL INIT STIM1: MOV AL,TS SUB AL,TC JNC M1 MOV TC,00H MOV AL,ZVV MOV AH,00H MOV YK,AX CALL PID MOV AL,CK SUB AL,80H JC IS0 MOV AAA,AL JMP COUIS0: MOV AL,
2、10H COU: MOV AL,7FH SUB AL,AAA MOV BBB,AL MOV AX,SPEC MOV CH1,AL MOV AX,YK MOV CH2,AL CALL PUT_COM JMP M1 PUT_COM: MOV AL,31H OUT 0C1H,AL MOV AL,CH1 OUT 0C0H,ALWAIT1: IN AL,0C1H TEST AL,01H JZ WAIT1 MOV AL,CH2WAIT2: JZ WAIT2 MOV AL,34H OUT 0C1H,AL RETINIT: NOP PUSH DS XOR AX,AX MOV DS,AX MOV AX,OFFS
3、ET IRQ6 ADD AX,2000H MOV SI,0038H MOV SI,AX MOV AX,0000H MOV SI,003AH MOV AX,OFFSET IRQ7 MOV SI,003CH MOV SI,003EH CLI POP DS IN AL,21H AND AL,3FH OUT 21H,AL MOV VADD,0000H MOV ZV,00H MOV ZVV,00H MOV CK,00H MOV YK,0000H MOV CK_1,00H MOV EK_1,0000H MOV AEK_1,0000H MOV BEK,0000H MOV BBB,00H MOV VBB,00
4、H MOV R0,0000H MOV R1,0000H MOV R2,0000H MOV R3,0000H MOV R4,0000H MOV R5,0000H MOV R6,0000H MOV R7,00H MOV R8,0000H MOV MARK,00H MOV FPWM,01H MOV AAA,7FH MOV VAA,7FH MOV TC,00H MOV AL,80H OUT 63H,AL MOV AL,00H OUT 61H,AL MOV AL,0B6H OUT 43H,AL MOV AL,8FH OUT 42H,AL MOV AL,04H RET SYSTEM: MOV AL,76H
5、 MOV AL,0CH OUT 41H,AL MOV AL,00H CALL DLY1 OUT 0C0H,AL MOV AL,40H CALL DLY1 MOV AL,7EH OUT 0C1H,AL MOV AL,34H CALL DLY1 OR AL,01H OUT 21H,ALDLY1: PUSH CX MOV CX,3000HB2: PUSH AX POP AX LOOP B2 POP CXIRQ7: PUSH BX PUSH CX PUSH DX PUSHF MOV AL,MARK CMP AL,01H JZ IN1 MOV MARK,01H IN2: MOV AL,20H OUT 2
6、0H,AL POPF POP DX POP CX POP BX IRETIN1: CALL VV MOV AL,ZV MOV ZVV,AL JMP IN2VV: MOV DX,0000H MOV AX,03E8H MOV CX,VADD CMP CX,0000H JZ MM1 DIV CXMM: MOV ZV,ALMM1:IRQ6: NOP INC TC CALL KJ CLC CMP MARK,01H JC TT1 INC VADD CMP VADD,0700H MOV VADD,0700HTT1: MOV AL,20H ;Close IRQ6KJ: CMP FPWM,01H JNZ TES
7、T2 CMP VAA,00H JNZ ANOT0 MOV FPWM,02H MOV AL,BBB RCR AL,01H MOV VBB,AL JMP TEST2ANOT0: DEC VAA MOV AL,01HTEST2: CMP FPWM,02H JNZ OUTT CMP VBB,00H JNZ BNOT0 MOV AL,AAA MOV VAA,AL JMP OUTTBNOT0: DEC VBB OUT 61H,AL OUTT:PID: MOV AX,SPEC SUB AX,YK MOV R0,AX MOV R1,AX SUB AX,EK_1 MOV R2,AX SUB AX,AEK_1 M
8、OV BEK,AX MOV R8,AX MOV AX,R1 MOV EK_1,AX MOV AX,R2 MOV AEK_1,AX TEST R1,8000H JZ EK1 NEG R1 EK1: SUB AX,IBAND JC II MOV R3,00H JMP DDDII: MOV AL,TS MOV CX,R1 MUL CX MOV CX,KII MOV R3,AX TEST R0,8000H JZ DDD NEG R3DDD: TEST BEK,8000H JZ DDD1 NEG BEKDDD1: MOV AX,BEK MOV CX,KDD MUL CX MOV CX,0008H MOV
9、 CX,AX MOV R4,AX TEST R8,8000H JZ DD1 NEG R4DD1: MOV AX,R3 ADD AX,R4 MOV R5,AX JO L9L2: MOV AX,R5 ADD AX,R2 MOV R6,AX JO L3 L5: MOV AX,R6 MOV CX,KPP IMUL CX MOV CX,1000H IDIV CX MOV CX,AX RCL AH,01H RCR AL,01H JC LLL1 CMP CH,00H JZ LLL2 MOV AL,7FH JMP LLL2LLL1: CMP CH,0FFH MOV AL,80HLLL2: MOV R7,AL ADD AL,CK_1 JO L8L18: MOV CK_1,AL ADD AL,80H MOV CK,ALL8: TEST R7,80H JNZ L17 JMP L18L17: MOV AL,80H JMP L18 L9: TEST R3,8000H JNZ L1 MOV R5,7FFFH JMP L2L1: MOV R5,8000HL3: TEST R2,8000H JNZ L4 MOV R6,7FFFH JMP L5L4: MOV R6,8000HCODE ENDS END START
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1