ret ; * 4. Ôóíêöèß ITOA, ïåðåâîäßùàß ÷èñëî â ñòðîêó è âûâîäßùàß åãî íà LCD-äèñïëåé * ITOA: MOV R4, R12 MOV.W #00d, R6 ;MOV.W #-09d, R6 CMP #1, R15 JNZ lp MOV #9d, R6 CMP #19, R13 JGE vstabka JMP CYCLE lp MOV #19d, R6 MOV #2, R13 MOV.B LCD_Tab(R13), 90h(R6) INC R6 INC R13 MOV.B LCD_Tab(R13), 90h(R6) MOV.B #2, &1033;Save 1 number of hour to 1033 MOV #17d, R6 MOV #10, R13 MOV.B LCD_Tab(R13), 90h(R6) INC R6 INC R13 MOV.B LCD_Tab(R13), 90h(R6) MOV.B #10, &1031;Save 1 number of minute to 1031 MOV #15d, R6 MOV #18, R13 MOV.B LCD_Tab(R13), 90h(R6) INC R6 INC R13 MOV.B LCD_Tab(R13), 90h(R6) MOV.B #18, &1029;Save last number of minute to 1029 MOV #13d, R6 MOV #10, R13 MOV.B LCD_Tab(R13), 90h(R6) INC R6 INC R13 MOV.B LCD_Tab(R13), 90h(R6) MOV.B #10, &1026;Save 1 number of second to 1026 MOV #11d, R6 MOV #18, R13 MOV.B LCD_Tab(R13), 90h(R6) INC R6 INC R13 MOV.B LCD_Tab(R13), 90h(R6) MOV.B #9, &1024 ;Save last number of second to 1024 MOV #9d, R6 MOV #14, R13 MOV.B LCD_Tab(R13), 90h(R6) INC R6 INC R13 MOV.B LCD_Tab(R13), 90h(R6) DEC R6 MOV.B #9, &1027 MOV.B #10, &1028 MOV.B #18, &1030 MOV.B #10, &1032; MOV.B #18, &1034; MOV #1,R15 CYCLE: INC R13 MOV.B LCD_Tab(R13), 90h(R6) INC R6 INC R13 MOV.B LCD_Tab(R13), 90h(R6) DEC R6 JMP ext vstabka: ; MOYA VSTAVKA MOV #0, R13 MOV.B LCD_Tab(R13), 90h(R6) INC R6 INC R13 MOV.B LCD_Tab(R13), 90h(R6)
Достарыңызбен бөлісу: |