DIV A B; ALA SO HIEN RA SE LAY TU 31H DEN 34H MOV 38H,A ; CAT TAM PHAN NGUYEN VAO 38H (CHUC)
MOV 38H,A ;DAT VAO 38H MA CHU SO CHUC RET
RET ;--- LOOK_UP: INC A MOVC A,@A+PC RET DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH,01H,02H,04H,08H ;tuong ung voi 0,1,2,3,4,5,6,7,8,9
;--- HIEN: HIEN:
;--- HIEN: HIEN: RET ;--- TEMPO: NOP XOAY: NOP NOP NOP NOP NOP NOP NOP DJNZ R6,XOAY RET ;--- XLNHIET:
MOV A,40H ;GIOI HAN NHIET THU 1 SUBB A,3AH SUBB A,3AH
MOV 36H,A ; T1 - E MOV A,40H MOV A,40H
AĐ A,3AH
MOV 35H,A ; T1 + E
MOV A,31H ; NHIET HIEN THOI SUBB A,35H SUBB A,35H
JNC MCMQ ; 00001010 MOV A,36H MOV A,36H
SUBB A,31H JC KHONGDOI JC KHONGDOI
MOV A,41H ;GIOI HAN NHIET THU 2 SUBB A,3AH SUBB A,3AH
MOV 36H,A ; T2 - E MOV A,41H MOV A,41H