1、| System start ! MASS2 DB 0DH,0AH,| System off !MASS3 DB 0DH,0AH,| Wellcom !MASS4 DB 0DH,0AH,| Temperature !MASS5 DB 0DH,0AH,| Increment !MASS6 DB 0DH,0AH,| Reduction !MASS7 DB 0DH,0AH,| Contrlling !MASS8 DB 0DH,0AH,| Cool !MASS9 DB 0DH,0AH,| Heating !MASS10 DB 0DH,0AH,| Wind !MASS11 DB 0DH,0AH,| Up
2、 prepurge !MASS12 DB 0DH,0AH,| Down prepurge !MASS13 DB 0DH,0AH,| Sleep !MASS14 DB 0DH,0AH,| Quit !MASS15 DB 0DH,0AH,| Error !MASS16 DB 0DH,0AH,| Please enter:MASS17 DB 0DH,0AH,| T P W S E C MASS18 DB 0DH,0AH,| MASS19 DB 0DH,0AH, / DB 0DH,0AH, / / MASS20 DB 0DH,0AH, MASS21 DB 0DH,0AH, */* *-*-* */*
3、MASS22 DB 0DH,0AH, . (+ +)! - MASS23 DB 0DH,0AH, Z MASS231 DB 0DH,0AH,MASS232 DB 0DH,0AH,MASS24 DB 0DH,0AH,MASS25 DB 0DH,0AH, | - -| _ MODE DB ?DATA ENDSPRTSTR MACRO X;输出字符串 LEA DX,X MOV AH,09H INT 21HENDMSCANSTR MACRO MOV AH,08HENDM SETXY MACRO X,Y;设置光标位置,X=行,Y=列 XOR BH,BH MOV AH,02H MOV DH,X MOV D
4、L,Y INT 10HMASSS MACRO SETXY 5,5 PRTSTR MASS18MASS121 MACRO SETXY 16,10 PRTSTR MASS21 CALL DELAY PRTSTR MASS211 DRAWWINDOW MACRO ATTR,TOP,LEFT,BOTTOM,RIGHT ;建立窗口 PUSH AX PUSH BX PUSH CX PUSH DX MOV AH,06H MOV AL,0 MOV BH,ATTR MOV CH,TOP MOV CL,LEFT MOV DH,BOTTOM MOV DL,RIGHT POP DX POP CX POP BX POP
5、 AXCODE SEGMENTASSUME CS:CODE,DS:DATA START:MOV AX,DATA MOV DS,AX MOV AH,0FH INT 10H MOV BYTE PTRMODE,AL MOV AH,00 MOV AL,02 DRAWWINDOW 81H,0,0,24,200;窗口背景色设置 DRAWWINDOW 3EH,3,1,7,20 PRTSTR MASSLOP: SCANSTR ;按下按键 CMP AL,O ;判断是否打开空调 JZ OPEN SETXY 4,4 PRTSTR MASS15 ;输入错误重新输入 PRTSTR MASS25 JMP LOPOPEN:
6、SETXY 4,4 PRTSTR MASS1 ;打开空调 PRTSTR MASS24 SCANSTRM判断是否进入菜单 JZ MENU SETXY 4,4 PRTSTR MASS15 JMP OPENMENU:SETXY 4,4 PRTSTR MASS3 ;进入菜单 PRTSTR MASS16 ;显示功能 PRTSTR MASS17T判断是否选择温度控制 JNZ LOP1 CALL TEM JMP MENULOP1:CMP AL,P判断是否选择制冷制热 JNZ LOP2 CALL PROLOP2:W判断是否选择扫风 JNZ LOP3 CALL WINDLOP3:S判断是否选择择睡眠 JNZ L
7、OP4 CALL SLEEPLOP4:E判断是否选择返回菜单 JNZ LOP5 PRTSTR MASS14 MASSSLOP5:C判断是否选择关闭空调 JZ EXITEXIT: PRTSTR MASS2 MOV AH,0 MOV AL,BYTE PTRMODETEM PROC NEAR ;温度控制 PRTSTR MASS4 SETXY 5,15 MOV CH,32H MOV DL,CH MOV CL,35H MOV DL,CLAGAIN:SCANSTRI JZ M5D JZ M6 JZ QUIT JMP AGAINQUIT: JMP LOM5: SETXY 4,4 ;增加温度 PRTSTR M
8、ASS5 INC CL CMP CL,39H JNA M51 INC CH MOV CL,30H M51: INT 21H MOV DL,CL M6:降低温度 PRTSTR MASS6 DEC CL CMP CL,30H JA M61 DEC CH MOV CL,39H M61:LO: RETTEM ENDPSLEEP PROC NEAR ;进入睡眠状态 MOV CX,1 SETXY 4,5 PRTSTR MASS13 MASSS PRTSTR MASS23 SETXY 16,12 PRTSTR MASS231 SETXY 16,14 PRTSTR MASS232SLEEP ENDP PRO
9、PROC NEAR ;进入制冷制热 PRTSTR MASS7AGAIN1:H JZ M9L JZ M8 JZ QUIT1 JMP AGAIN1M8:制冷 PRTSTR MASS8M9: PRTSTR MASS9 ;制热 PRTSTR MASS22QUIT1:PRO ENDPWIND PROC NEAR ;进入扫风功能 PRTSTR MASS10AGAIN2:SCANSTR U JZ M11N JZ M12 JZ QUIT2 JMP AGAIN2M11:上扫风 PRTSTR MASS11 PRTSTR MASS19M12:下扫风 PRTSTR MASS12 PRTSTR MASS20QUIT2:WIND ENDPDELAY PROCGOT: MOV AH,00H INT 1AH ADD DL,9 MOV BL,DLWAITING: CMP DL,BL JNZ WAITINGDELAY ENDPCODE ENDSEND START (注:可编辑下载,若有不当之处,请指正,谢谢!)
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1