REG4 EQU 24H DAT EQU P0.7 TOUTOU: LCALL CHUSHI LCALL RDTEMP MOV A,TEMPL ANL A,# B MOV TEMPL,A MOV A,TEMPH ANL A,# B ORL A,TEMPL SWAP A MOV 25H,A MOV A,25H MOV B,#64H DIV AB MOV A,B MOV B,#0AH DIV AB SWAP A ORL A,B MOV 10H,A RET CHUSHI: LCALL RESET
MOV A,#0CCH LCALL WRITE111 MOV A,#4EH LCALL WRITE111 MOV A,#CONFIG12 LCALL WRITE111 RET RDTEMP: LCALL RESET MOV A,#0CCH LCALL WRITE111 MOV A,#44H LCALL WRITE111 LCALL DL1MS LCALL RESET MOV A,#0CCH LCALL WRITE111 MOV A,#0BEH LCALL WRITE111 LCALL ERAD111 MOV TEMPL,A LCALL ERAD111 MOV TEMPH,A RET RESET:
LA: SETB DAT MOV 52H,#200 LB: CLR DAT DJNZ 52H,LB SETB DAT MOV 52H,#30 LC:
DJNZ 52H,LC CLR C ORL C,DAT JC LB MOV 58H,#80 LD:
ORL C,DAT JC LP DJNZ 58H,LD SJMP LA LP:
MOV 52H,#250 LF:
DJNZ 52H,LF RET WRITE111:
MOV 53H,#8 W51HA: SETB DAT MOV 54H,#8 RRC A CLR DAT W52HA:
DJNZ 54H,W52HA MOV DAT,C MOV 54H,#30 W53HA:
DJNZ 54H,W53HA DJNZ 53H,W51HA SETB DAT RET ERAD111: CLR EA MOV 58H,#8 RD1A: CLR DAT MOV 54H,#6 NOP SETB DAT RD2A:
DJNZ 54H,RD2A